##// END OF EJS Templates
subrepo: respect non-default path for incoming/outgoing...
Martin Geisler -
r14360:ab687820 stable
parent child Browse files
Show More
@@ -2516,8 +2516,13 b' def incoming(ui, repo, source="default",'
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
@@ -2803,8 +2808,12 b' def outgoing(ui, repo, dest=None, **opts'
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
@@ -660,6 +660,26 b' Try to push from the other side'
660 adding file changes
660 adding file changes
661 added 1 changesets with 1 changes to 1 files
661 added 1 changesets with 1 changes to 1 files
662
662
663 Incoming and outgoing should not use the default path:
664
665 $ hg clone -q issue1852a issue1852d
666 $ hg -R issue1852d outgoing --subrepos issue1852c
667 comparing with issue1852c
668 searching for changes
669 no changes found
670 comparing with issue1852c/sub/repo
671 searching for changes
672 no changes found
673 [1]
674 $ hg -R issue1852d incoming --subrepos issue1852c
675 comparing with issue1852c
676 searching for changes
677 no changes found
678 comparing with issue1852c/sub/repo
679 searching for changes
680 no changes found
681 [1]
682
663 Check status of files when none of them belong to the first
683 Check status of files when none of them belong to the first
664 subrepository:
684 subrepository:
665
685
General Comments 0
You need to be logged in to leave comments. Login now