Since hg share is mostly like clone, do the same changes there.
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
pulkit |
hg-reviewers |
Since hg share is mostly like clone, do the same changes there.
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/hg.py (5 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
9a5290e9a5e4 | bc633af3baf0 | Pierre-Yves David | Apr 14 2021, 12:37 PM |
'''create a shared repository''' | '''create a shared repository''' | ||||
if not islocal(source): | if not islocal(source): | ||||
raise error.Abort(_(b'can only share local repositories')) | raise error.Abort(_(b'can only share local repositories')) | ||||
if not dest: | if not dest: | ||||
dest = defaultdest(source) | dest = defaultdest(source) | ||||
else: | else: | ||||
dest = ui.expandpath(dest) | dest = urlutil.get_clone_path(ui, dest)[1] | ||||
if isinstance(source, bytes): | if isinstance(source, bytes): | ||||
origsource = ui.expandpath(source) | origsource, source, branches = urlutil.get_clone_path(ui, source) | ||||
source, branches = urlutil.parseurl(origsource) | |||||
srcrepo = repository(ui, source) | srcrepo = repository(ui, source) | ||||
rev, checkout = addbranchrevs(srcrepo, srcrepo, branches, None) | rev, checkout = addbranchrevs(srcrepo, srcrepo, branches, None) | ||||
else: | else: | ||||
srcrepo = source.local() | srcrepo = source.local() | ||||
checkout = None | checkout = None | ||||
shareditems = set() | shareditems = set() | ||||
if bookmarks: | if bookmarks: |