mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
clone: make default path absolute for all local paths
This fixes the default path when cloning local repositories with hg-git, since hg-git cancopy() is false even for local repositories.
This commit is contained in:
parent
2bda8cbde2
commit
b1b428c2d8
@ -243,13 +243,15 @@ def clone(ui, source, dest=None, pull=False, rev=None, update=True,
|
||||
|
||||
src_lock = dest_lock = dir_cleanup = None
|
||||
try:
|
||||
abspath = origsource
|
||||
if islocal(origsource):
|
||||
abspath = os.path.abspath(util.localpath(origsource))
|
||||
|
||||
if islocal(dest):
|
||||
dir_cleanup = DirCleanup(dest)
|
||||
|
||||
abspath = origsource
|
||||
copy = False
|
||||
if src_repo.cancopy() and islocal(dest):
|
||||
abspath = os.path.abspath(util.localpath(origsource))
|
||||
copy = not pull and not rev
|
||||
|
||||
if copy:
|
||||
|
Loading…
Reference in New Issue
Block a user