On Fri, 11 Jan 2019 12:29:06 +0100, Boris Feld wrote: > # HG changeset patch > # User Boris Feld <boris.f...@octobus.net> > # Date 1547130238 -3600 > # Thu Jan 10 15:23:58 2019 +0100 > # Node ID 38733dd85595782676175141111a42f253efabb6 > # Parent 427247e84e29c144321d21a825d371458b5d3e1a > # EXP-Topic revs-efficiency > # Available At https://bitbucket.org/octobus/mercurial-devel/ > # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r > 38733dd85595 > revset: enforce "%d" to be interpreted as literal revision number (API)
New behavior looks saner. Please also flag this as (BC). It's exposed as revset() template function. > %r = revset expression, parenthesized > - %d = int(arg), no quoting > + %d = rev(int(arg)), no quoting 'rev(n)' returns an empty set if n is out of range, whereas 'n' aborts. Suppose it's pretty much a coding error to pass in an invalid revision to repo.revs(), we'll probably want aborts. Maybe we'll need an internal '_rev()' function? > %s = string(arg), escaped and single-quoted > %b = arg.branch(), escaped and single-quoted > %n = hex(arg), single-quoted We might want to map %n to _node() as well, but that isn't required in this series. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel