##// END OF EJS Templates
subrepo: use sharepath if available when locating the source repo...
Matt Harbison -
r18510:f254ab62 stable
parent child Browse files
Show More
@@ -264,6 +264,9 b' def _abssource(repo, push=False, abort=T'
264 return repo.ui.config('paths', 'default-push')
264 return repo.ui.config('paths', 'default-push')
265 if repo.ui.config('paths', 'default'):
265 if repo.ui.config('paths', 'default'):
266 return repo.ui.config('paths', 'default')
266 return repo.ui.config('paths', 'default')
267 if repo.sharedpath != repo.path:
268 # chop off the .hg component to get the default path form
269 return os.path.dirname(repo.sharedpath)
267 if abort:
270 if abort:
268 raise util.Abort(_("default path for subrepository not found"))
271 raise util.Abort(_("default path for subrepository not found"))
269
272
@@ -725,6 +725,19 b' Check that share works with subrepo'
725 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
725 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
726 $ test -f ../shared/subrepo-1/.hg/sharedpath
726 $ test -f ../shared/subrepo-1/.hg/sharedpath
727 [1]
727 [1]
728 $ hg -R ../shared in
729 comparing with $TESTTMP/subrepo-status (glob)
730 searching for changes
731 no changes found
732 [1]
733 $ hg -R ../shared/subrepo-2 showconfig paths
734 paths.default=$TESTTMP/subrepo-status/subrepo-2
735 $ hg -R ../shared/subrepo-1 sum --remote
736 parent: -1:000000000000 tip (empty repository)
737 branch: default
738 commit: (clean)
739 update: (current)
740 remote: (synced)
728
741
729 Check hg update --clean
742 Check hg update --clean
730 $ cd $TESTTMP/t
743 $ cd $TESTTMP/t
General Comments 0
You need to be logged in to leave comments. Login now