Patchwork [4,of,6,path,intent] commands: define intent for incoming

login
register
mail settings
Submitter Gregory Szorc
Date Sept. 29, 2014, 5:30 a.m.
Message ID <5b4239b38103222c6152.1411968624@3.1.168.192.in-addr.arpa>
Download mbox | patch
Permalink /patch/6023/
State Changes Requested
Headers show

Comments

Gregory Szorc - Sept. 29, 2014, 5:30 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1411967531 25200
#      Sun Sep 28 22:12:11 2014 -0700
# Node ID 5b4239b38103222c61525f86866a17bc8b929736
# Parent  531f7761fb3883566b9f0ba34642bc8e52929042
commands: define intent for incoming

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4212,18 +4212,18 @@  def incoming(ui, repo, source="default",
     if opts.get('bundle') and opts.get('subrepos'):
         raise util.Abort(_('cannot combine --bundle and --subrepos'))
 
     if opts.get('bookmarks'):
-        source, branches = hg.parseurl(ui.expandpath(source),
+        source, branches = hg.parseurl(ui.expandpath(source, intent='incoming'),
                                        opts.get('branch'))
         other = hg.peer(repo, opts, source)
         if 'bookmarks' not in other.listkeys('namespaces'):
             ui.warn(_("remote doesn't support bookmarks\n"))
             return 0
         ui.status(_('comparing with %s\n') % util.hidepassword(source))
         return bookmarks.diff(ui, repo, other)
 
-    repo._subtoppath = ui.expandpath(source)
+    repo._subtoppath = ui.expandpath(source, intent='incoming')
     try:
         return hg.incoming(ui, repo, source, opts)
     finally:
         del repo._subtoppath