Patchwork [1,of,7,V2] revset: remove a rare usage of "%d" for a non-revision item

mail settings
Submitter Boris Feld
Date Jan. 14, 2019, 12:13 p.m.
Message ID <15458ddc966d002a781d.1547467991@localhost.localdomain>
Download mbox | patch
Permalink /patch/37721/
State Superseded
Headers show


Boris Feld - Jan. 14, 2019, 12:13 p.m.
# HG changeset patch
# User Boris Feld <>
# Date 1547132233 -3600
#      Thu Jan 10 15:57:13 2019 +0100
# Node ID 15458ddc966d002a781d0be59cf2fa961790aa4c
# Parent  c339a01acd9a5fda3ea9ed15b4342a0d08af5f96
# EXP-Topic revs-efficiency
# Available At
#              hg pull -r 15458ddc966d
revset: remove a rare usage of "%d" for a non-revision item

In order to fix an important bug, we are about to narrow the semantic of "%d"
in revset. This is one of the few exceptions that we need to get rid of before
being able to fix the bug.

See the later semantic narrowing changeset for full rationale on the semantic


diff --git a/mercurial/ b/mercurial/
--- a/mercurial/
+++ b/mercurial/
@@ -823,8 +823,8 @@  def resolvenodes(repo, revisions):
                         '%s key not present in changesetexplicitdepth revision '
                         'specifier', (key,))
-            for rev in repo.revs(b'ancestors(%ln, %d)', spec[b'nodes'],
-                                 spec[b'depth'] - 1):
+            query = b'ancestors(%ln, %s)'
+            for rev in repo.revs(query, spec[b'nodes'], spec[b'depth'] - 1):
                 node = cl.node(rev)
                 if node not in seen: