Skip to content
Snippets Groups Projects
Commit 972d14a5a227 authored by Benoit Boissinot's avatar Benoit Boissinot
Browse files

don't use localrepo.__init__ to create the dest repo with clone+hardlinks

parent 2aef481ac73c
No related branches found
No related tags found
No related merge requests found
......@@ -127,6 +127,4 @@
if self.dir_:
self.rmtree(self.dir_, True)
dest_repo = repository(ui, dest, create=True)
dir_cleanup = None
......@@ -132,6 +130,6 @@
dir_cleanup = None
if dest_repo.local():
dir_cleanup = DirCleanup(os.path.realpath(dest_repo.root))
if islocal(dest):
dir_cleanup = DirCleanup(dest)
abspath = source
copy = False
......@@ -135,7 +133,7 @@
abspath = source
copy = False
if src_repo.local() and dest_repo.local():
if src_repo.local() and islocal(dest):
abspath = os.path.abspath(source)
copy = not pull and not rev
......@@ -153,7 +151,11 @@
if copy:
# we lock here to avoid premature writing to the target
src_store = os.path.realpath(src_repo.spath)
dest_store = os.path.realpath(dest_repo.spath)
dest_path = os.path.realpath(os.path.join(dest, ".hg"))
dest_store = dest_path
if not os.path.exists(dest):
os.mkdir(dest)
os.mkdir(dest_path)
dest_lock = lock.lock(os.path.join(dest_store, "lock"))
files = ("data",
......@@ -173,6 +175,8 @@
dest_repo = repository(ui, dest)
else:
dest_repo = repository(ui, dest, create=True)
revs = None
if rev:
if 'lookup' not in src_repo.capabilities:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment