comparison mercurial/commands.py @ 14362:8c740a850ad7

commands: replace 'x = f(); return x' with 'return f()'
author Martin Geisler <mg@lazybytes.net>
date Wed, 18 May 2011 19:25:34 +0200
parents ea7081645987
children 82f3b0f3f0a5
comparison
equal deleted inserted replaced
14361:ea7081645987 14362:8c740a850ad7
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 repo._subtoppath = ui.expandpath(source) 3205 repo._subtoppath = ui.expandpath(source)
3206 try: 3206 try:
3207 ret = hg.incoming(ui, repo, source, opts) 3207 return hg.incoming(ui, repo, source, opts)
3208 return ret
3209 finally: 3208 finally:
3210 del repo._subtoppath 3209 del repo._subtoppath
3211 3210
3212 3211
3213 @command('^init', remoteopts, _('[-e CMD] [--remotecmd CMD] [DEST]')) 3212 @command('^init', remoteopts, _('[-e CMD] [--remotecmd CMD] [DEST]'))
3542 ui.status(_('comparing with %s\n') % util.hidepassword(dest)) 3541 ui.status(_('comparing with %s\n') % util.hidepassword(dest))
3543 return bookmarks.diff(ui, other, repo) 3542 return bookmarks.diff(ui, other, repo)
3544 3543
3545 repo._subtoppath = ui.expandpath(dest or 'default-push', dest or 'default') 3544 repo._subtoppath = ui.expandpath(dest or 'default-push', dest or 'default')
3546 try: 3545 try:
3547 ret = hg.outgoing(ui, repo, dest, opts) 3546 return hg.outgoing(ui, repo, dest, opts)
3548 return ret
3549 finally: 3547 finally:
3550 del repo._subtoppath 3548 del repo._subtoppath
3551 3549
3552 @command('parents', 3550 @command('parents',
3553 [('r', 'rev', '', _('show parents of the specified revision'), _('REV')), 3551 [('r', 'rev', '', _('show parents of the specified revision'), _('REV')),