Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 14360:ab687820c4cc stable
subrepo: respect non-default path for incoming/outgoing
Push and pull set repo._subtoppath before pushing or pulling subrepos.
The incoming and outgoing commands needed to do the same.
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Wed, 18 May 2011 15:13:26 +0200 |
parents | 42d5165975ad |
children | ea7081645987 ffcb7e4d719f |
comparison
equal
deleted
inserted
replaced
14356:02a5bebd0dc4 | 14360:ab687820c4cc |
---|---|
2514 ui.warn(_("remote doesn't support bookmarks\n")) | 2514 ui.warn(_("remote doesn't support bookmarks\n")) |
2515 return 0 | 2515 return 0 |
2516 ui.status(_('comparing with %s\n') % url.hidepassword(source)) | 2516 ui.status(_('comparing with %s\n') % url.hidepassword(source)) |
2517 return bookmarks.diff(ui, repo, other) | 2517 return bookmarks.diff(ui, repo, other) |
2518 | 2518 |
2519 ret = hg.incoming(ui, repo, source, opts) | 2519 repo._subtoppath = ui.expandpath(source) |
2520 return ret | 2520 try: |
2521 ret = hg.incoming(ui, repo, source, opts) | |
2522 return ret | |
2523 finally: | |
2524 del repo._subtoppath | |
2525 | |
2521 | 2526 |
2522 def init(ui, dest=".", **opts): | 2527 def init(ui, dest=".", **opts): |
2523 """create a new repository in the given directory | 2528 """create a new repository in the given directory |
2524 | 2529 |
2525 Initialize a new repository in the given directory. If the given | 2530 Initialize a new repository in the given directory. If the given |
2801 ui.warn(_("remote doesn't support bookmarks\n")) | 2806 ui.warn(_("remote doesn't support bookmarks\n")) |
2802 return 0 | 2807 return 0 |
2803 ui.status(_('comparing with %s\n') % url.hidepassword(dest)) | 2808 ui.status(_('comparing with %s\n') % url.hidepassword(dest)) |
2804 return bookmarks.diff(ui, other, repo) | 2809 return bookmarks.diff(ui, other, repo) |
2805 | 2810 |
2806 ret = hg.outgoing(ui, repo, dest, opts) | 2811 repo._subtoppath = ui.expandpath(dest or 'default-push', dest or 'default') |
2807 return ret | 2812 try: |
2813 ret = hg.outgoing(ui, repo, dest, opts) | |
2814 return ret | |
2815 finally: | |
2816 del repo._subtoppath | |
2808 | 2817 |
2809 def parents(ui, repo, file_=None, **opts): | 2818 def parents(ui, repo, file_=None, **opts): |
2810 """show the parents of the working directory or revision | 2819 """show the parents of the working directory or revision |
2811 | 2820 |
2812 Print the working directory's parent revisions. If a revision is | 2821 Print the working directory's parent revisions. If a revision is |