Mercurial > public > mercurial-scm > hg-stable
comparison hgext/git/gitutil.py @ 47055:d55b71393907
node: replace nullid and friends with nodeconstants class
The introduction of 256bit hashes require changes to nullid and other
constant magic values. Start pushing them down from repository and
revlog where sensible.
Differential Revision: https://phab.mercurial-scm.org/D9465
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Mon, 29 Mar 2021 01:52:06 +0200 |
parents | c7c1efdfd4de |
children | 6000f5b25c9b |
comparison
equal
deleted
inserted
replaced
46992:5fa019ceb499 | 47055:d55b71393907 |
---|---|
1 """utilities to assist in working with pygit2""" | 1 """utilities to assist in working with pygit2""" |
2 from __future__ import absolute_import | 2 from __future__ import absolute_import |
3 | 3 |
4 from mercurial.node import bin, hex, nullid | 4 from mercurial.node import bin, hex, sha1nodeconstants |
5 | 5 |
6 from mercurial import pycompat | 6 from mercurial import pycompat |
7 | 7 |
8 pygit2_module = None | 8 pygit2_module = None |
9 | 9 |
48 if pycompat.ispy3: | 48 if pycompat.ispy3: |
49 return bin(n.encode('ascii')) | 49 return bin(n.encode('ascii')) |
50 return bin(n) | 50 return bin(n) |
51 | 51 |
52 | 52 |
53 nullgit = togitnode(nullid) | 53 nullgit = togitnode(sha1nodeconstants.nullid) |