From 0785c93be96c5a31f66c6f178642de5e6d621c06 Mon Sep 17 00:00:00 2001 From: Durham Goode Date: Wed, 17 Oct 2018 08:56:09 -0700 Subject: [PATCH] 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 --- hgext/convert/hg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hgext/convert/hg.py b/hgext/convert/hg.py index c843cb6296..3c47caf595 100644 --- a/hgext/convert/hg.py +++ b/hgext/convert/hg.py @@ -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