Show More
@@ -104,6 +104,8 b' class pushoperation(object):' | |||
|
104 | 104 | self.outobsmarkers = set() |
|
105 | 105 | # outgoing bookmarks |
|
106 | 106 | self.outbookmarks = [] |
|
107 | # transaction manager | |
|
108 | self.trmanager = None | |
|
107 | 109 | |
|
108 | 110 | @util.propertycache |
|
109 | 111 | def futureheads(self): |
@@ -204,6 +206,10 b' def push(repo, remote, force=False, revs' | |||
|
204 | 206 | msg = 'cannot lock source repository: %s\n' % err |
|
205 | 207 | pushop.ui.debug(msg) |
|
206 | 208 | try: |
|
209 | if pushop.locallocked: | |
|
210 | pushop.trmanager = transactionmanager(repo, | |
|
211 | 'push-response', | |
|
212 | pushop.remote.url()) | |
|
207 | 213 | pushop.repo.checkpush(pushop) |
|
208 | 214 | lock = None |
|
209 | 215 | unbundle = pushop.remote.capable('unbundle') |
@@ -222,7 +228,11 b' def push(repo, remote, force=False, revs' | |||
|
222 | 228 | finally: |
|
223 | 229 | if lock is not None: |
|
224 | 230 | lock.release() |
|
231 | if pushop.trmanager: | |
|
232 | pushop.trmanager.close() | |
|
225 | 233 | finally: |
|
234 | if pushop.trmanager: | |
|
235 | pushop.trmanager.release() | |
|
226 | 236 | if locallock is not None: |
|
227 | 237 | locallock.release() |
|
228 | 238 | |
@@ -693,13 +703,11 b' def _pushsyncphase(pushop):' | |||
|
693 | 703 | |
|
694 | 704 | def _localphasemove(pushop, nodes, phase=phases.public): |
|
695 | 705 | """move <nodes> to <phase> in the local source repo""" |
|
696 |
if pushop. |
|
|
697 | tr = pushop.repo.transaction('push-phase-sync') | |
|
698 | try: | |
|
699 | phases.advanceboundary(pushop.repo, tr, phase, nodes) | |
|
700 | tr.close() | |
|
701 | finally: | |
|
702 | tr.release() | |
|
706 | if pushop.trmanager: | |
|
707 | phases.advanceboundary(pushop.repo, | |
|
708 | pushop.trmanager.transaction(), | |
|
709 | phase, | |
|
710 | nodes) | |
|
703 | 711 | else: |
|
704 | 712 | # repo is not locked, do not change any phases! |
|
705 | 713 | # Informs the user that phases should have been moved when |
@@ -176,6 +176,9 b' push' | |||
|
176 | 176 | remote: added 1 changesets with 0 changes to 0 files (-1 heads) |
|
177 | 177 | remote: 1 new obsolescence markers |
|
178 | 178 | updating bookmark book_eea1 |
|
179 | pre-close-tip:02de42196ebe draft book_02de | |
|
180 | postclose-tip:02de42196ebe draft book_02de | |
|
181 | b2x-transactionclose hook: HG_SOURCE=push-response HG_URL=file:$TESTTMP/other | |
|
179 | 182 | $ hg -R other log -G |
|
180 | 183 | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |
|
181 | 184 | |\ |
@@ -254,6 +257,9 b' push over ssh' | |||
|
254 | 257 | remote: postclose-tip:5fddd98957c8 draft book_5fdd |
|
255 | 258 | remote: b2x-transactionclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2-EXP=1 HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1 |
|
256 | 259 | remote: changegroup hook: HG_BUNDLE2-EXP=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1 |
|
260 | pre-close-tip:02de42196ebe draft book_02de | |
|
261 | postclose-tip:02de42196ebe draft book_02de | |
|
262 | b2x-transactionclose hook: HG_SOURCE=push-response HG_URL=ssh://user@dummy/other | |
|
257 | 263 | $ hg -R other log -G |
|
258 | 264 | o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C |
|
259 | 265 | | |
@@ -292,6 +298,9 b' push over http' | |||
|
292 | 298 | remote: added 1 changesets with 1 changes to 1 files |
|
293 | 299 | remote: 1 new obsolescence markers |
|
294 | 300 | updating bookmark book_32af |
|
301 | pre-close-tip:02de42196ebe draft book_02de | |
|
302 | postclose-tip:02de42196ebe draft book_02de | |
|
303 | b2x-transactionclose hook: HG_SOURCE=push-response HG_URL=http://localhost:$HGPORT2/ | |
|
295 | 304 | $ cat other-error.log |
|
296 | 305 | |
|
297 | 306 | Check final content. |
General Comments 0
You need to be logged in to leave comments.
Login now