comparison 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
comparison
equal deleted inserted replaced
14359:ad5c68a0db6a 14361:ea7081645987
3200 ui.warn(_("remote doesn't support bookmarks\n")) 3200 ui.warn(_("remote doesn't support bookmarks\n"))
3201 return 0 3201 return 0
3202 ui.status(_('comparing with %s\n') % util.hidepassword(source)) 3202 ui.status(_('comparing with %s\n') % util.hidepassword(source))
3203 return bookmarks.diff(ui, repo, other) 3203 return bookmarks.diff(ui, repo, other)
3204 3204
3205 ret = hg.incoming(ui, repo, source, opts) 3205 repo._subtoppath = ui.expandpath(source)
3206 return ret 3206 try:
3207 ret = hg.incoming(ui, repo, source, opts)
3208 return ret
3209 finally:
3210 del repo._subtoppath
3211
3207 3212
3208 @command('^init', remoteopts, _('[-e CMD] [--remotecmd CMD] [DEST]')) 3213 @command('^init', remoteopts, _('[-e CMD] [--remotecmd CMD] [DEST]'))
3209 def init(ui, dest=".", **opts): 3214 def init(ui, dest=".", **opts):
3210 """create a new repository in the given directory 3215 """create a new repository in the given directory
3211 3216
3535 ui.warn(_("remote doesn't support bookmarks\n")) 3540 ui.warn(_("remote doesn't support bookmarks\n"))
3536 return 0 3541 return 0
3537 ui.status(_('comparing with %s\n') % util.hidepassword(dest)) 3542 ui.status(_('comparing with %s\n') % util.hidepassword(dest))
3538 return bookmarks.diff(ui, other, repo) 3543 return bookmarks.diff(ui, other, repo)
3539 3544
3540 ret = hg.outgoing(ui, repo, dest, opts) 3545 repo._subtoppath = ui.expandpath(dest or 'default-push', dest or 'default')
3541 return ret 3546 try:
3547 ret = hg.outgoing(ui, repo, dest, opts)
3548 return ret
3549 finally:
3550 del repo._subtoppath
3542 3551
3543 @command('parents', 3552 @command('parents',
3544 [('r', 'rev', '', _('show parents of the specified revision'), _('REV')), 3553 [('r', 'rev', '', _('show parents of the specified revision'), _('REV')),
3545 ] + templateopts, 3554 ] + templateopts,
3546 _('[-r REV] [FILE]')) 3555 _('[-r REV] [FILE]'))