# HG changeset patch # User Martin von Zweigbergk # Date 2018-04-04 22:06:32 # Node ID 5bcd5859b505de68d94e25ce9113c1c69587adb5 # Parent a6014392837e5d474cb3b229a9a629627f4c631d perf: make perfmanifest and perfnodelookup work with revsets They were using repo[rev], which only works with a single symbol (e.g. "." or "my-bookmark"), not general revsets. Switch them to scmutil.revsingle() so they can also be used with e.g. ".^". I don't actually care about these commands, but I want to remove uses of repo[]. Differential Revision: https://phab.mercurial-scm.org/D3083 diff --git a/contrib/perf.py b/contrib/perf.py --- a/contrib/perf.py +++ b/contrib/perf.py @@ -767,7 +767,7 @@ def perfmanifest(ui, repo, rev, **opts): @command('perfchangeset', formatteropts) def perfchangeset(ui, repo, rev, **opts): timer, fm = gettimer(ui, opts) - n = repo[rev].node() + n = scmutil.revsingle(repo, rev).node() def d(): repo.changelog.read(n) #repo.changelog._cache = None @@ -853,7 +853,7 @@ def perfnodelookup(ui, repo, rev, **opts timer, fm = gettimer(ui, opts) import mercurial.revlog mercurial.revlog._prereadsize = 2**24 # disable lazy parser in old hg - n = repo[rev].node() + n = scmutil.revsingle(repo, rev).node() cl = mercurial.revlog.revlog(getsvfs(repo), "00changelog.i") def d(): cl.rev(n)