diff mercurial/localrepo.py @ 12847:b00eda50ad2b stable

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.
author Kevin Bullock <kbullock@ringworld.org>
date Wed, 20 Oct 2010 17:38:21 -0500
parents 18b5b6392fcf
children fabe61418a53
line wrap: on
line diff
--- a/mercurial/localrepo.py	Tue Oct 26 02:38:14 2010 +0530
+++ b/mercurial/localrepo.py	Wed Oct 20 17:38:21 2010 -0500
@@ -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