[PATCH] pull: silence spurious 'requesting all changes' message

Kevin Bullock kbullock+mercurial at ringworld.org
Wed Oct 20 16:33:59 CDT 2010


# HG changeset patch
# User Kevin Bullock <kbullock at ringworld.org>
# Date 1287610409 18000
# Node ID 6b395107f617066abaef0b3c072bed6954715997
# Parent  e8a8993b625e246dd21f6c299dae473b172348ec
pull: silence spurious 'requesting all changes' message

When issuing `hg pull -r REV` in a repo with no common ancestor with the
remote repo, the message 'requesting all changes' is printed, even though only
the changese that are ancestors of REV are actually requested. This can be
confusing for users (see
http://www.selenic.com/pipermail/mercurial/2010-October/035508.html).

This silences the message if (and only if) the '-r' option was passed.

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1272,7 +1272,7 @@
                 self.ui.status(_("no changes found\n"))
                 return 0
 
-            if fetch == [nullid]:
+            if heads is None and fetch == [nullid]:
                 self.ui.status(_("requesting all changes\n"))
             elif heads is None and remote.capable('changegroupsubset'):
                 # issue1320, avoid a race if remote changed after discovery


More information about the Mercurial-devel mailing list