mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
convert: fix convert in non-revlog backed repos
Summary: convert has code that compares two raw text manifests to check if two commits are different. These raw texts won't always exist in non-revlog backed repositories, so let's switch this to actual manifest diffs. It's probably a little slower in flat manifest repos, but we're moving to tree manifest anyway. Reviewed By: farnz Differential Revision: D10384424 fbshipit-source-id: d53e1b9f787e09e413a621879c6fa1ba56321a66
This commit is contained in:
parent
c46886e415
commit
0785c93be9
@ -376,10 +376,10 @@ class mercurial_sink(common.converter_sink):
|
||||
p2 = node
|
||||
|
||||
if self.filemapmode and nparents == 1:
|
||||
man = self.repo.manifestlog._revlog
|
||||
mfl = self.repo.manifestlog
|
||||
mnode = self.repo.changelog.read(nodemod.bin(p2))[0]
|
||||
closed = "close" in commit.extra
|
||||
if not closed and not man.cmp(m1node, man.revision(mnode)):
|
||||
if not closed and not mfl[m1node].read().diff(mfl[mnode].read()):
|
||||
self.ui.status(_("filtering out empty revision\n"))
|
||||
self.repo.rollback(force=True)
|
||||
return parent
|
||||
|
Loading…
Reference in New Issue
Block a user