# HG changeset patch
# User Boris Feld <boris.f...@octobus.net>
# Date 1547132587 -3600
#      Thu Jan 10 16:03:07 2019 +0100
# Node ID 427247e84e29c144321d21a825d371458b5d3e1a
# Parent  a71dd521a4a53b19e89f9ad9c20fb85e604783c6
# EXP-Topic revs-efficiency
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 
427247e84e29
revset: remove the last usage of "%d" for a non-revision entry

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
change.

diff --git a/mercurial/exchangev2.py b/mercurial/exchangev2.py
--- a/mercurial/exchangev2.py
+++ b/mercurial/exchangev2.py
@@ -98,8 +98,8 @@ def pull(pullop):
         relevantcsetnodes = set()
         clnode = repo.changelog.node
 
-        for rev in repo.revs(b'ancestors(%ln, %d)',
-                             pullheads, pullop.depth - 1):
+        query = b'ancestors(%%ln, %d)' % (pullop.depth - 1)
+        for rev in repo.revs(query, pullheads):
             relevantcsetnodes.add(clnode(rev))
 
         csetrelevantfilter = lambda n: n in relevantcsetnodes
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to