Show More
@@ -121,8 +121,10 b' We build a server side extension for thi' | |||||
121 | > import atexit |
|
121 | > import atexit | |
122 | > from mercurial import error, extensions, bookmarks |
|
122 | > from mercurial import error, extensions, bookmarks | |
123 | > |
|
123 | > | |
124 | > def wait(): |
|
124 | > def wait(repo): | |
125 | > if not os.path.exists('push-A-started'): |
|
125 | > if not os.path.exists('push-A-started'): | |
|
126 | > assert repo._currentlock(repo._lockref) is None | |||
|
127 | > assert repo._currentlock(repo._wlockref) is None | |||
126 | > print('setting raced push up') |
|
128 | > print('setting raced push up') | |
127 | > with open('push-A-started', 'w'): |
|
129 | > with open('push-A-started', 'w'): | |
128 | > pass |
|
130 | > pass | |
@@ -134,7 +136,7 b' We build a server side extension for thi' | |||||
134 | > time.sleep(0.1) |
|
136 | > time.sleep(0.1) | |
135 | > |
|
137 | > | |
136 | > def wrapinit(orig, self, repo): |
|
138 | > def wrapinit(orig, self, repo): | |
137 | > wait() |
|
139 | > wait(repo) | |
138 | > return orig(self, repo) |
|
140 | > return orig(self, repo) | |
139 | > def uisetup(ui): |
|
141 | > def uisetup(ui): | |
140 | > extensions.wrapfunction(bookmarks.bmstore, '__init__', wrapinit) |
|
142 | > extensions.wrapfunction(bookmarks.bmstore, '__init__', wrapinit) |
General Comments 0
You need to be logged in to leave comments.
Login now