# HG changeset patch # User Matt Harbison # Date 1619563199 14400 # Node ID de26b9a7ec292a3ae1a09c9c1bc02be614a3a112 # Parent ce24a00fe7f05f3eb1680808dc3a32c894a262b9 git: consistently use str for parents when rebuilding the index database The tests show no changes, but when these values are overwritten shortly after when a git commit object is available, that uses str. It seems better to use that for consistency. It does materially affect the database though, because the old value stored was `X'3030..3030'` and is now '00..00' when the changelog table is dumped in sqlite3. There is one query that specifies the parents, but it passes the non null hashes as str, so it worked as expected. That likely explains the lack of test changes. Differential Revision: https://phab.mercurial-scm.org/D10527 diff -r ce24a00fe7f0 -r de26b9a7ec29 hgext/git/index.py --- a/hgext/git/index.py Tue Apr 27 17:54:08 2021 -0400 +++ b/hgext/git/index.py Tue Apr 27 18:39:59 2021 -0400 @@ -6,7 +6,6 @@ from mercurial.i18n import _ from mercurial.node import ( - nullhex, nullid, ) @@ -281,7 +280,7 @@ for pos, commit in enumerate(walker): if prog is not None: prog.update(pos) - p1 = p2 = nullhex + p1 = p2 = gitutil.nullgit if len(commit.parents) > 2: raise error.ProgrammingError( (