Show More
@@ -483,6 +483,7 b' test-push-checkheads-unpushed-D5.t' | |||
|
483 | 483 | test-push-checkheads-unpushed-D6.t |
|
484 | 484 | test-push-checkheads-unpushed-D7.t |
|
485 | 485 | test-push-http.t |
|
486 | test-push-race.t | |
|
486 | 487 | test-push-warn.t |
|
487 | 488 | test-push.t |
|
488 | 489 | test-pushvars.t |
@@ -28,31 +28,31 b' A set of extension and shell functions e' | |||
|
28 | 28 | > configtable = {} |
|
29 | 29 | > configitem = registrar.configitem(configtable) |
|
30 | 30 | > |
|
31 | > configitem('delaypush', 'ready-path', | |
|
31 | > configitem(b'delaypush', b'ready-path', | |
|
32 | 32 | > default=None, |
|
33 | 33 | > ) |
|
34 | > configitem('delaypush', 'release-path', | |
|
34 | > configitem(b'delaypush', b'release-path', | |
|
35 | 35 | > default=None, |
|
36 | 36 | > ) |
|
37 | 37 | > |
|
38 | 38 | > def delaypush(orig, pushop): |
|
39 | 39 | > # notify we are done preparing |
|
40 | 40 | > ui = pushop.repo.ui |
|
41 | > readypath = ui.config('delaypush', 'ready-path') | |
|
41 | > readypath = ui.config(b'delaypush', b'ready-path') | |
|
42 | 42 | > if readypath is not None: |
|
43 | 43 | > with open(readypath, 'w') as r: |
|
44 | 44 | > r.write('foo') |
|
45 | > ui.status('wrote ready: %s\n' % readypath) | |
|
45 | > ui.status(b'wrote ready: %s\n' % readypath) | |
|
46 | 46 | > # now wait for the other process to be done |
|
47 | > watchpath = ui.config('delaypush', 'release-path') | |
|
47 | > watchpath = ui.config(b'delaypush', b'release-path') | |
|
48 | 48 | > if watchpath is not None: |
|
49 | > ui.status('waiting on: %s\n' % watchpath) | |
|
49 | > ui.status(b'waiting on: %s\n' % watchpath) | |
|
50 | 50 | > limit = 100 |
|
51 | 51 | > while 0 < limit and not os.path.exists(watchpath): |
|
52 | 52 | > limit -= 1 |
|
53 | 53 | > time.sleep(0.1) |
|
54 | 54 | > if limit <= 0: |
|
55 | > ui.warn('exiting without watchfile: %s' % watchpath) | |
|
55 | > ui.warn(b'exiting without watchfile: %s' % watchpath) | |
|
56 | 56 | > else: |
|
57 | 57 | > # delete the file at the end of the push |
|
58 | 58 | > def delete(): |
@@ -65,7 +65,7 b' A set of extension and shell functions e' | |||
|
65 | 65 | > return orig(pushop) |
|
66 | 66 | > |
|
67 | 67 | > def uisetup(ui): |
|
68 | > extensions.wrapfunction(exchange, '_pushbundle2', delaypush) | |
|
68 | > extensions.wrapfunction(exchange, b'_pushbundle2', delaypush) | |
|
69 | 69 | > EOF |
|
70 | 70 | |
|
71 | 71 | $ waiton () { |
General Comments 0
You need to be logged in to leave comments.
Login now