Show More
@@ -171,14 +171,11 def share(ui, source, dest=None, update= | |||||
171 | r = repository(ui, root) |
|
171 | r = repository(ui, root) | |
172 |
|
172 | |||
173 | default = srcrepo.ui.config('paths', 'default') |
|
173 | default = srcrepo.ui.config('paths', 'default') | |
174 |
if |
|
174 | if default: | |
175 | # set default to source for being able to clone subrepos |
|
|||
176 | default = os.path.abspath(util.urllocalpath(origsource)) |
|
|||
177 | fp = r.opener("hgrc", "w", text=True) |
|
175 | fp = r.opener("hgrc", "w", text=True) | |
178 | fp.write("[paths]\n") |
|
176 | fp.write("[paths]\n") | |
179 | fp.write("default = %s\n" % default) |
|
177 | fp.write("default = %s\n" % default) | |
180 | fp.close() |
|
178 | fp.close() | |
181 | r.ui.setconfig('paths', 'default', default) |
|
|||
182 |
|
179 | |||
183 | if update: |
|
180 | if update: | |
184 | r.ui.status(_("updating working directory\n")) |
|
181 | r.ui.status(_("updating working directory\n")) |
@@ -726,10 +726,8 Check that share works with subrepo | |||||
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 |
|
728 | $ hg -R ../shared in | |
729 | comparing with $TESTTMP/subrepo-status (glob) |
|
729 | abort: repository default not found! | |
730 | searching for changes |
|
730 | [255] | |
731 | no changes found |
|
|||
732 | [1] |
|
|||
733 | $ hg -R ../shared/subrepo-2 showconfig paths |
|
731 | $ hg -R ../shared/subrepo-2 showconfig paths | |
734 | paths.default=$TESTTMP/subrepo-status/subrepo-2 |
|
732 | paths.default=$TESTTMP/subrepo-status/subrepo-2 | |
735 | $ hg -R ../shared/subrepo-1 sum --remote |
|
733 | $ hg -R ../shared/subrepo-1 sum --remote |
General Comments 0
You need to be logged in to leave comments.
Login now