perf: unbust perfbdiff --alldata
authorGregory Szorc <gregory.szorc@gmail.com>
Thu, 17 Nov 2016 08:52:52 -0800
changeset 30435 605e3b126d46
parent 30434 03f7aa2bd0e3
child 30436 ede7bc45bf0a
perf: unbust perfbdiff --alldata This broke in f84fc6a92817 due to a refactored manifest API. The fix is a bit hacky - perfbdiff doesn't yet support tree manifests for example. But it gets the job done. A test has been added for --alldata so this doesn't happen again.
contrib/perf.py
tests/test-contrib-perf.t
--- a/contrib/perf.py	Thu Nov 17 20:57:09 2016 +0900
+++ b/contrib/perf.py	Thu Nov 17 08:52:52 2016 -0800
@@ -781,9 +781,9 @@
         if opts['alldata']:
             # Load revisions associated with changeset.
             ctx = repo[rev]
-            mtext = repo.manifest.revision(ctx.manifestnode())
+            mtext = repo.manifestlog._revlog.revision(ctx.manifestnode())
             for pctx in ctx.parents():
-                pman = repo.manifest.revision(pctx.manifestnode())
+                pman = repo.manifestlog._revlog.revision(pctx.manifestnode())
                 textpairs.append((pman, mtext))
 
             # Load filelog revisions by iterating manifest delta.
--- a/tests/test-contrib-perf.t	Thu Nov 17 20:57:09 2016 +0900
+++ b/tests/test-contrib-perf.t	Thu Nov 17 08:52:52 2016 -0800
@@ -114,6 +114,7 @@
   $ hg perfancestorset 2
   $ hg perfannotate a
   $ hg perfbdiff -c 1
+  $ hg perfbdiff --alldata 1
   $ hg perfbranchmap
   $ hg perfcca
   $ hg perfchangegroupchangelog