# HG changeset patch # User Jun Wu # Date 1491525809 25200 # Node ID 433ab46f6bb4f86d8776a909d3dc180d33a868e3 # Parent 723c1ab2f77e4225b629e0731b2943f0b46ca9c3 bundlerepo: make baserevision return raw text "baserevision" returns the text that will be used to apply deltas. Since deltas are against raw texts, "baserevision" should return raw text. Now test-flagprocessor.t points us to a new error. diff -r 723c1ab2f77e -r 433ab46f6bb4 mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py Thu Apr 06 17:24:36 2017 -0700 +++ b/mercurial/bundlerepo.py Thu Apr 06 17:43:29 2017 -0700 @@ -158,7 +158,7 @@ # Revlog subclasses may override 'revision' method to modify format of # content retrieved from revlog. To use bundlerevlog with such class one # needs to override 'baserevision' and make more specific call here. - return revlog.revlog.revision(self, nodeorrev) + return revlog.revlog.revision(self, nodeorrev, raw=True) def addrevision(self, text, transaction, link, p1=None, p2=None, d=None): raise NotImplementedError @@ -186,7 +186,7 @@ oldfilter = self.filteredrevs try: self.filteredrevs = () - return changelog.changelog.revision(self, nodeorrev) + return changelog.changelog.revision(self, nodeorrev, raw=True) finally: self.filteredrevs = oldfilter @@ -210,7 +210,7 @@ if node in self.fulltextcache: result = '%s' % self.fulltextcache[node] else: - result = manifest.manifestrevlog.revision(self, nodeorrev) + result = manifest.manifestrevlog.revision(self, nodeorrev, raw=True) return result def dirlog(self, d): @@ -228,7 +228,7 @@ linkmapper) def baserevision(self, nodeorrev): - return filelog.filelog.revision(self, nodeorrev) + return filelog.filelog.revision(self, nodeorrev, raw=True) class bundlepeer(localrepo.localpeer): def canpush(self): diff -r 723c1ab2f77e -r 433ab46f6bb4 tests/test-flagprocessor.t --- a/tests/test-flagprocessor.t Thu Apr 06 17:24:36 2017 -0700 +++ b/tests/test-flagprocessor.t Thu Apr 06 17:43:29 2017 -0700 @@ -188,11 +188,10 @@ 4 changesets found $ hg --config extensions.strip= strip -r 2 --no-backup --force -q $ hg -R bundle.hg log --stat -T '{rev} {desc}\n' base64 2>&1 | egrep -v '^(\*\*| )' - Traceback (most recent call last): - mercurial.mpatch.mpatchError: invalid patch + abort: integrity check failed on data/base64.i:2! $ hg bundle -R bundle.hg --base 1 bundle-again.hg -q 2>&1 | egrep -v '^(\*\*| )' Traceback (most recent call last): - TypeError: Incorrect padding + mercurial.mpatch.mpatchError: invalid patch $ hg -R bundle-again.hg log --stat -T '{rev} {desc}\n' base64 2>&1 | egrep -v '^(\*\*| )' abort: repository bundle-again.hg not found!