diff mercurial/commands.py @ 14361:ea7081645987

merge with stable
author Martin Geisler <mg@lazybytes.net>
date Wed, 18 May 2011 19:22:55 +0200
parents bf93e78f2638 ab687820c4cc
children 8c740a850ad7
line wrap: on
line diff
--- a/mercurial/commands.py	Wed May 18 15:45:57 2011 +0200
+++ b/mercurial/commands.py	Wed May 18 19:22:55 2011 +0200
@@ -3202,8 +3202,13 @@
         ui.status(_('comparing with %s\n') % util.hidepassword(source))
         return bookmarks.diff(ui, repo, other)
 
-    ret = hg.incoming(ui, repo, source, opts)
-    return ret
+    repo._subtoppath = ui.expandpath(source)
+    try:
+        ret = hg.incoming(ui, repo, source, opts)
+        return ret
+    finally:
+        del repo._subtoppath
+
 
 @command('^init', remoteopts, _('[-e CMD] [--remotecmd CMD] [DEST]'))
 def init(ui, dest=".", **opts):
@@ -3537,8 +3542,12 @@
         ui.status(_('comparing with %s\n') % util.hidepassword(dest))
         return bookmarks.diff(ui, other, repo)
 
-    ret = hg.outgoing(ui, repo, dest, opts)
-    return ret
+    repo._subtoppath = ui.expandpath(dest or 'default-push', dest or 'default')
+    try:
+        ret = hg.outgoing(ui, repo, dest, opts)
+        return ret
+    finally:
+        del repo._subtoppath
 
 @command('parents',
     [('r', 'rev', '', _('show parents of the specified revision'), _('REV')),