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