[PATCH 2 of 6 path intent] commands: define intent for pull

Gregory Szorc gregory.szorc at gmail.com
Mon Sep 29 00:30:22 CDT 2014


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1411967373 25200
#      Sun Sep 28 22:09:33 2014 -0700
# Node ID f564a480645468b7172de5a4a3b4198f3beff64a
# Parent  2f06625fe4d502f43294e9087d9a83398a36fe9f
commands: define intent for pull

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4911,9 +4911,10 @@ def pull(ui, repo, source="default", **o
     See :hg:`help urls` for more information.
 
     Returns 0 on success, 1 if an update had unresolved files.
     """
-    source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch'))
+    source, branches = hg.parseurl(ui.expandpath(source, intent='pull'),
+        opts.get('branch'))
     other = hg.peer(repo, opts, source)
     try:
         ui.status(_('pulling from %s\n') % util.hidepassword(source))
         revs, checkout = hg.addbranchrevs(repo, other, branches,


More information about the Mercurial-devel mailing list