Show More
@@ -273,7 +273,7 b' def clone(ui, source, dest = None, **opt' | |||
|
273 | 273 | |
|
274 | 274 | if source in paths: source = paths[source] |
|
275 | 275 | |
|
276 | created = False | |
|
276 | created = success = False | |
|
277 | 277 | |
|
278 | 278 | if dest is None: |
|
279 | 279 | dest = os.getcwd() |
@@ -314,12 +314,15 b' def clone(ui, source, dest = None, **opt' | |||
|
314 | 314 | |
|
315 | 315 | if not opts['no-update']: |
|
316 | 316 | update(ui, repo) |
|
317 | except: | |
|
318 | if created: | |
|
317 | ||
|
318 | success = True | |
|
319 | ||
|
320 | finally: | |
|
321 | if not success: | |
|
322 | del repo | |
|
319 | 323 | import shutil |
|
320 | 324 | shutil.rmtree(dest, True) |
|
321 | raise | |
|
322 | ||
|
325 | ||
|
323 | 326 | def commit(ui, repo, *files, **opts): |
|
324 | 327 | """commit the specified files or all outstanding changes""" |
|
325 | 328 | text = opts['text'] |
@@ -904,5 +907,6 b' def dispatch(args):' | |||
|
904 | 907 | u.debug(inst, "\n") |
|
905 | 908 | u.warn("%s: invalid arguments\n" % i[0].__name__) |
|
906 | 909 | help(u, cmd) |
|
907 | sys.exit(-1) | |
|
908 | 910 | |
|
911 | sys.exit(-1) | |
|
912 |
@@ -43,5 +43,7 b' class lock:' | |||
|
43 | 43 | def release(self): |
|
44 | 44 | if self.held: |
|
45 | 45 | self.held = 0 |
|
46 | os.unlink(self.f) | |
|
46 | try: | |
|
47 | os.unlink(self.f) | |
|
48 | except: pass | |
|
47 | 49 |
@@ -1,11 +1,8 b'' | |||
|
1 | #!/bin/bash | |
|
1 | #!/bin/bash -x | |
|
2 | 2 | |
|
3 | 3 | hg clone http://localhost:20059/ copy |
|
4 | cd copy | |
|
5 | hg verify | |
|
6 | hg co | |
|
7 | cat foo | |
|
8 | hg manifest | |
|
4 | echo $? | |
|
5 | ls copy | |
|
9 | 6 | |
|
10 | 7 | cat > dumb.py <<EOF |
|
11 | 8 | import BaseHTTPServer, SimpleHTTPServer, signal |
@@ -23,10 +20,7 b' EOF' | |||
|
23 | 20 | python dumb.py 2>/dev/null & |
|
24 | 21 | |
|
25 | 22 | hg clone http://localhost:20059/foo copy2 |
|
26 | cd copy2 | |
|
27 | hg verify | |
|
28 | hg co | |
|
29 | cat foo | |
|
30 | hg manifest | |
|
23 | echo $? | |
|
31 | 24 | |
|
25 | set +x | |
|
32 | 26 | kill $! |
@@ -1,22 +1,25 b'' | |||
|
1 | + hg clone http://localhost:20059/ copy | |
|
1 | 2 | requesting all changes |
|
2 | 3 | adding changesets |
|
3 | 4 | abort: error 111: Connection refused |
|
4 | 5 | transaction abort! |
|
6 | failed to truncate 00changelog.d | |
|
7 | failed to truncate 00changelog.i | |
|
5 | 8 | rollback completed |
|
6 | checking changesets | |
|
7 | checking manifests | |
|
8 | crosschecking files in changesets and manifests | |
|
9 | checking files | |
|
10 | 0 files, 0 changesets, 0 total revisions | |
|
11 | cat: foo: No such file or directory | |
|
9 | + echo 255 | |
|
10 | 255 | |
|
11 | + ls copy | |
|
12 | ls: copy: No such file or directory | |
|
13 | + cat | |
|
14 | + python dumb.py | |
|
15 | + hg clone http://localhost:20059/foo copy2 | |
|
12 | 16 | requesting all changes |
|
13 | 17 | adding changesets |
|
14 | 18 | abort: HTTP Error 404: File not found |
|
15 | 19 | transaction abort! |
|
20 | failed to truncate 00changelog.d | |
|
21 | failed to truncate 00changelog.i | |
|
16 | 22 | rollback completed |
|
17 | checking changesets | |
|
18 | checking manifests | |
|
19 | crosschecking files in changesets and manifests | |
|
20 | checking files | |
|
21 | 0 files, 0 changesets, 0 total revisions | |
|
22 | cat: foo: No such file or directory | |
|
23 | + echo 255 | |
|
24 | 255 | |
|
25 | + set +x |
General Comments 0
You need to be logged in to leave comments.
Login now