Patchwork [3,of,3] perfmanifest: allow and require passing in a rev

login
register
mail settings
Submitter Siddharth Agarwal
Date Sept. 6, 2013, 9:01 p.m.
Message ID <b36dabbc3a3aab387df0.1378501279@dev1091.prn1.facebook.com>
Download mbox | patch
Permalink /patch/2397/
State Accepted
Commit 79e5de2bfa8cd18e81e71fbba1a62eee15b5e354
Headers show

Comments

Siddharth Agarwal - Sept. 6, 2013, 9:01 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1378499729 25200
#      Fri Sep 06 13:35:29 2013 -0700
# Node ID b36dabbc3a3aab387df0a56e432e067bc1c14861
# Parent  9a82c7ceac3337c8aa7f106d51419b2051e9165e
perfmanifest: allow and require passing in a rev

Previously perfmanifest would only test tip.
Augie Fackler - Sept. 9, 2013, 3:15 a.m.
On Fri, Sep 06, 2013 at 02:01:19PM -0700, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0@fb.com>
> # Date 1378499729 25200
> #      Fri Sep 06 13:35:29 2013 -0700
> # Node ID b36dabbc3a3aab387df0a56e432e067bc1c14861
> # Parent  9a82c7ceac3337c8aa7f106d51419b2051e9165e
> perfmanifest: allow and require passing in a rev

queued, thanks

>
> Previously perfmanifest would only test tip.
>
> diff --git a/contrib/perf.py b/contrib/perf.py
> --- a/contrib/perf.py
> +++ b/contrib/perf.py
> @@ -171,10 +171,11 @@
>          copies.pathcopies(ctx1, ctx2)
>      timer(d)
>
> -@command('perfmanifest')
> -def perfmanifest(ui, repo):
> +@command('perfmanifest', [], 'REV')
> +def perfmanifest(ui, repo, rev):
> +    ctx = scmutil.revsingle(repo, rev, rev)
> +    t = ctx.manifestnode()
>      def d():
> -        t = repo.manifest.tip()
>          repo.manifest._mancache.clear()
>          repo.manifest._cache = None
>          repo.manifest.read(t)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -171,10 +171,11 @@ 
         copies.pathcopies(ctx1, ctx2)
     timer(d)
 
-@command('perfmanifest')
-def perfmanifest(ui, repo):
+@command('perfmanifest', [], 'REV')
+def perfmanifest(ui, repo, rev):
+    ctx = scmutil.revsingle(repo, rev, rev)
+    t = ctx.manifestnode()
     def d():
-        t = repo.manifest.tip()
         repo.manifest._mancache.clear()
         repo.manifest._cache = None
         repo.manifest.read(t)