Show More
@@ -273,10 +273,16 b' def clone(ui, source, dest = None, **opt' | |||||
273 |
|
273 | |||
274 | if source in paths: source = paths[source] |
|
274 | if source in paths: source = paths[source] | |
275 |
|
275 | |||
|
276 | created = False | |||
|
277 | ||||
276 | if dest is None: |
|
278 | if dest is None: | |
277 | dest = os.getcwd() |
|
279 | dest = os.getcwd() | |
278 | elif not os.path.exists(dest): |
|
280 | elif not os.path.exists(dest): | |
279 |
os.m |
|
281 | os.mkdir(dest) | |
|
282 | created = True | |||
|
283 | ||||
|
284 | try: | |||
|
285 | dest = os.path.realpath(dest) | |||
280 |
|
286 | |||
281 | link = 0 |
|
287 | link = 0 | |
282 | if not source.startswith("http://"): |
|
288 | if not source.startswith("http://"): | |
@@ -308,6 +314,11 b' def clone(ui, source, dest = None, **opt' | |||||
308 |
|
314 | |||
309 | if not opts['no-update']: |
|
315 | if not opts['no-update']: | |
310 | update(ui, repo) |
|
316 | update(ui, repo) | |
|
317 | except: | |||
|
318 | if created: | |||
|
319 | import shutil | |||
|
320 | shutil.rmtree(dest, True) | |||
|
321 | raise | |||
311 |
|
322 | |||
312 | def commit(ui, repo, *files, **opts): |
|
323 | def commit(ui, repo, *files, **opts): | |
313 | """commit the specified files or all outstanding changes""" |
|
324 | """commit the specified files or all outstanding changes""" |
General Comments 0
You need to be logged in to leave comments.
Login now