Mercurial > public > mercurial-scm > hg-stable
comparison hgext/git/gitlog.py @ 47019:03c73fc6f89a stable
git: use the proper filenode for deleted files in changelog.changelogrevision
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.
Differential Revision: https://phab.mercurial-scm.org/D10524
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 27 Apr 2021 16:58:59 -0400 |
parents | 497cedcb6504 |
children | 2a77c817d451 |
comparison
equal
deleted
inserted
replaced
47018:8d733cbc2724 | 47019:03c73fc6f89a |
---|---|
236 filesremoved = [ | 236 filesremoved = [ |
237 r[0] | 237 r[0] |
238 for r in self._db.execute( | 238 for r in self._db.execute( |
239 'SELECT filename FROM changedfiles ' | 239 'SELECT filename FROM changedfiles ' |
240 'WHERE node = ? and filenode = ?', | 240 'WHERE node = ? and filenode = ?', |
241 (hn, nullhex), | 241 (hn, gitutil.nullgit), |
242 ) | 242 ) |
243 ] | 243 ] |
244 c = self.gitrepo[hn] | 244 c = self.gitrepo[hn] |
245 return hgchangelog._changelogrevision( | 245 return hgchangelog._changelogrevision( |
246 manifest=n, # pretend manifest the same as the commit node | 246 manifest=n, # pretend manifest the same as the commit node |