changeset 31837:37e793918c07

bundlerepo: use raw revision in revdiff() This is similar to "revlog: use raw revisions in revdiff". revdiff() generates raw text used in revlog directly. This makes test-flagprocessor.t happy.
author Jun Wu <quark@fb.com>
date Mon, 03 Apr 2017 09:31:39 -0700
parents 4598e8f43e20
children c39e7c4b535c
files mercurial/bundlerepo.py tests/test-flagprocessor.t
diffstat 2 files changed, 26 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bundlerepo.py	Thu Apr 06 17:45:47 2017 -0700
+++ b/mercurial/bundlerepo.py	Mon Apr 03 09:31:39 2017 -0700
@@ -115,7 +115,8 @@
         elif rev1 <= self.repotiprev and rev2 <= self.repotiprev:
             return revlog.revlog.revdiff(self, rev1, rev2)
 
-        return mdiff.textdiff(self.revision(rev1), self.revision(rev2))
+        return mdiff.textdiff(self.revision(rev1, raw=True),
+                              self.revision(rev2, raw=True))
 
     def revision(self, nodeorrev, raw=False):
         """return an uncompressed revision of a given node or revision
--- a/tests/test-flagprocessor.t	Thu Apr 06 17:45:47 2017 -0700
+++ b/tests/test-flagprocessor.t	Mon Apr 03 09:31:39 2017 -0700
@@ -216,5 +216,27 @@
   $ hg bundle -R bundle.hg --base 1 bundle-again.hg -q 2>&1 | egrep -v '^(\*\*|  )'
   [1]
   $ hg -R bundle-again.hg log --stat -T '{rev} {desc}\n' base64 2>&1 | egrep -v '^(\*\*|  )'
-  Traceback (most recent call last):
-  TypeError: Incorrect padding
+  5 branching
+   base64 |  2 +-
+   1 files changed, 1 insertions(+), 1 deletions(-)
+  
+  4 base64-4
+   base64 |  2 +-
+   1 files changed, 1 insertions(+), 1 deletions(-)
+  
+  3 base64-three
+   base64 |  2 +-
+   1 files changed, 1 insertions(+), 1 deletions(-)
+  
+  2 base64-two
+   base64 |  2 +-
+   1 files changed, 1 insertions(+), 1 deletions(-)
+  
+  1 base64-single
+   base64 |  2 +-
+   1 files changed, 1 insertions(+), 1 deletions(-)
+  
+  0 base64-0
+   base64 |  1 +
+   1 files changed, 1 insertions(+), 0 deletions(-)
+