Patchwork D10524: git: use the proper filenode for deleted files in changelog.changelogrevision

login
register
mail settings
Submitter phabricator
Date April 28, 2021, 3:08 p.m.
Message ID <differential-rev-PHID-DREV-g54vzdn6bvcwja76ga7l-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48841/
State Superseded
Headers show

Comments

phabricator - April 28, 2021, 3:08 p.m.
mharbison72 created this revision.
Herald added a reviewer: durin42.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
pulkit accepted this revision.
This revision is now accepted and ready to land.

REVISION SUMMARY
  Inline printing shows it still doesn't find the removed file in the test, but it
  is at least a str instead of bytes like the immediate query before it that does
  find files.  Looking at the database, it doesn't look like the remove was
  recorded.  Additionally, `hg log -r 'removes("re:.*")'` stacktraces.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

REVISION DETAIL
  https://phab.mercurial-scm.org/D10524

AFFECTED FILES
  hgext/git/gitlog.py

CHANGE DETAILS




To: mharbison72, durin42, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/hgext/git/gitlog.py b/hgext/git/gitlog.py
--- a/hgext/git/gitlog.py
+++ b/hgext/git/gitlog.py
@@ -238,7 +238,7 @@ 
             for r in self._db.execute(
                 'SELECT filename FROM changedfiles '
                 'WHERE node = ? and filenode = ?',
-                (hn, nullhex),
+                (hn, gitutil.nullgit),
             )
         ]
         c = self.gitrepo[hn]