Show More
@@ -127,15 +127,13 b' def clone(ui, source, dest=None, pull=Fa' | |||
|
127 | 127 | if self.dir_: |
|
128 | 128 | self.rmtree(self.dir_, True) |
|
129 | 129 | |
|
130 | dest_repo = repository(ui, dest, create=True) | |
|
131 | ||
|
132 | 130 | dir_cleanup = None |
|
133 |
if |
|
|
134 |
dir_cleanup = DirCleanup( |
|
|
131 | if islocal(dest): | |
|
132 | dir_cleanup = DirCleanup(dest) | |
|
135 | 133 | |
|
136 | 134 | abspath = source |
|
137 | 135 | copy = False |
|
138 |
if src_repo.local() and |
|
|
136 | if src_repo.local() and islocal(dest): | |
|
139 | 137 | abspath = os.path.abspath(source) |
|
140 | 138 | copy = not pull and not rev |
|
141 | 139 | |
@@ -153,7 +151,11 b' def clone(ui, source, dest=None, pull=Fa' | |||
|
153 | 151 | if copy: |
|
154 | 152 | # we lock here to avoid premature writing to the target |
|
155 | 153 | src_store = os.path.realpath(src_repo.spath) |
|
156 |
dest_ |
|
|
154 | dest_path = os.path.realpath(os.path.join(dest, ".hg")) | |
|
155 | dest_store = dest_path | |
|
156 | if not os.path.exists(dest): | |
|
157 | os.mkdir(dest) | |
|
158 | os.mkdir(dest_path) | |
|
157 | 159 | dest_lock = lock.lock(os.path.join(dest_store, "lock")) |
|
158 | 160 | |
|
159 | 161 | files = ("data", |
@@ -173,6 +175,8 b' def clone(ui, source, dest=None, pull=Fa' | |||
|
173 | 175 | dest_repo = repository(ui, dest) |
|
174 | 176 | |
|
175 | 177 | else: |
|
178 | dest_repo = repository(ui, dest, create=True) | |
|
179 | ||
|
176 | 180 | revs = None |
|
177 | 181 | if rev: |
|
178 | 182 | if 'lookup' not in src_repo.capabilities: |
General Comments 0
You need to be logged in to leave comments.
Login now