equal
deleted
inserted
replaced
13 > """small extension orchestrate push race |
13 > """small extension orchestrate push race |
14 > |
14 > |
15 > Client with the extensions will create a file when ready and get stuck until |
15 > Client with the extensions will create a file when ready and get stuck until |
16 > a file is created.""" |
16 > a file is created.""" |
17 > |
17 > |
18 > import atexit |
|
19 > import errno |
18 > import errno |
20 > import os |
19 > import os |
21 > import time |
20 > import time |
22 > |
21 > |
23 > from mercurial import ( |
22 > from mercurial import ( |
49 > try: |
48 > try: |
50 > os.unlink(watchpath) |
49 > os.unlink(watchpath) |
51 > except OSError as exc: |
50 > except OSError as exc: |
52 > if exc.errno != errno.ENOENT: |
51 > if exc.errno != errno.ENOENT: |
53 > raise |
52 > raise |
54 > atexit.register(delete) |
53 > ui.atexit(delete) |
55 > return orig(pushop) |
54 > return orig(pushop) |
56 > |
55 > |
57 > def uisetup(ui): |
56 > def uisetup(ui): |
58 > extensions.wrapfunction(exchange, '_pushbundle2', delaypush) |
57 > extensions.wrapfunction(exchange, '_pushbundle2', delaypush) |
59 > EOF |
58 > EOF |