Show More
@@ -1455,8 +1455,9 b' class localrepository(object):' | |||
|
1455 | 1455 | match.explicitdir = vdirs.append |
|
1456 | 1456 | match.bad = fail |
|
1457 | 1457 | |
|
1458 |
wlock = |
|
|
1458 | wlock = lock = tr = None | |
|
1459 | 1459 | try: |
|
1460 | wlock = self.wlock() | |
|
1460 | 1461 | wctx = self[None] |
|
1461 | 1462 | merge = len(wctx.parents()) > 1 |
|
1462 | 1463 | |
@@ -1591,23 +1592,26 b' class localrepository(object):' | |||
|
1591 | 1592 | subrepo.writestate(self, newstate) |
|
1592 | 1593 | |
|
1593 | 1594 | p1, p2 = self.dirstate.parents() |
|
1595 | lock = self.lock() | |
|
1594 | 1596 | hookp1, hookp2 = hex(p1), (p2 != nullid and hex(p2) or '') |
|
1595 | 1597 | try: |
|
1596 | 1598 | self.hook("precommit", throw=True, parent1=hookp1, |
|
1597 | 1599 | parent2=hookp2) |
|
1600 | tr = self.transaction('commit') | |
|
1598 | 1601 | ret = self.commitctx(cctx, True) |
|
1599 | 1602 | except: # re-raises |
|
1600 | 1603 | if edited: |
|
1601 | 1604 | self.ui.write( |
|
1602 | 1605 | _('note: commit message saved in %s\n') % msgfn) |
|
1603 | 1606 | raise |
|
1604 | ||
|
1605 | 1607 | # update bookmarks, dirstate and mergestate |
|
1606 | 1608 | bookmarks.update(self, [p1, p2], ret) |
|
1607 | 1609 | cctx.markcommitted(ret) |
|
1608 | 1610 | ms.reset() |
|
1611 | tr.close() | |
|
1612 | ||
|
1609 | 1613 | finally: |
|
1610 |
|
|
|
1614 | lockmod.release(tr, lock, wlock) | |
|
1611 | 1615 | |
|
1612 | 1616 | def commithook(node=hex(ret), parent1=hookp1, parent2=hookp2): |
|
1613 | 1617 | # hack for command that use a temporary commit (eg: histedit) |
@@ -96,6 +96,7 b' Non store repo:' | |||
|
96 | 96 | .hg/phaseroots |
|
97 | 97 | .hg/requires |
|
98 | 98 | .hg/undo |
|
99 | .hg/undo.backup.dirstate | |
|
99 | 100 | .hg/undo.backupfiles |
|
100 | 101 | .hg/undo.bookmarks |
|
101 | 102 | .hg/undo.branch |
@@ -132,6 +133,7 b' Non fncache repo:' | |||
|
132 | 133 | .hg/store/undo |
|
133 | 134 | .hg/store/undo.backupfiles |
|
134 | 135 | .hg/store/undo.phaseroots |
|
136 | .hg/undo.backup.dirstate | |
|
135 | 137 | .hg/undo.bookmarks |
|
136 | 138 | .hg/undo.branch |
|
137 | 139 | .hg/undo.desc |
@@ -223,6 +225,7 b' Aborting lock does not prevent fncache w' | |||
|
223 | 225 | $ touch y |
|
224 | 226 | $ hg ci -qAm y |
|
225 | 227 | abort: forced lock failure |
|
228 | Exception mercurial.error.Abort: Abort('forced lock failure',) in <bound method lock.__del__ of <mercurial.lock.lock object at *>> ignored (glob) | |
|
226 | 229 | [255] |
|
227 | 230 | $ cat .hg/store/fncache |
|
228 | 231 | data/y.i |
@@ -229,6 +229,7 b' r4 has hardlinks in the working dir (not' | |||
|
229 | 229 | 2 r4/.hg/store/undo.backup.phaseroots |
|
230 | 230 | 2 r4/.hg/store/undo.backupfiles |
|
231 | 231 | 2 r4/.hg/store/undo.phaseroots |
|
232 | 2 r4/.hg/undo.backup.dirstate | |
|
232 | 233 | 2 r4/.hg/undo.bookmarks |
|
233 | 234 | 2 r4/.hg/undo.branch |
|
234 | 235 | 2 r4/.hg/undo.desc |
@@ -264,6 +265,7 b' Update back to revision 11 in r4 should ' | |||
|
264 | 265 | 2 r4/.hg/store/undo.backup.phaseroots |
|
265 | 266 | 2 r4/.hg/store/undo.backupfiles |
|
266 | 267 | 2 r4/.hg/store/undo.phaseroots |
|
268 | 2 r4/.hg/undo.backup.dirstate | |
|
267 | 269 | 2 r4/.hg/undo.bookmarks |
|
268 | 270 | 2 r4/.hg/undo.branch |
|
269 | 271 | 2 r4/.hg/undo.desc |
@@ -364,9 +364,9 b' check saving last-message.txt, at first' | |||
|
364 | 364 | HG: branch 'default' |
|
365 | 365 | HG: added f |
|
366 | 366 | ==== |
|
367 | note: commit message saved in .hg/last-message.txt | |
|
367 | 368 | transaction abort! |
|
368 | 369 | rollback completed |
|
369 | note: commit message saved in .hg/last-message.txt | |
|
370 | 370 | abort: pretxncommit.unexpectedabort hook exited with status 1 |
|
371 | 371 | [255] |
|
372 | 372 | $ cat .hg/last-message.txt |
@@ -388,9 +388,9 b' action)' | |||
|
388 | 388 | HG: user: test |
|
389 | 389 | HG: branch 'default' |
|
390 | 390 | HG: added f |
|
391 | note: commit message saved in .hg/last-message.txt | |
|
391 | 392 | transaction abort! |
|
392 | 393 | rollback completed |
|
393 | note: commit message saved in .hg/last-message.txt | |
|
394 | 394 | abort: pretxncommit.unexpectedabort hook exited with status 1 |
|
395 | 395 | [255] |
|
396 | 396 |
@@ -83,6 +83,7 b' new directories are setgid' | |||
|
83 | 83 | 00660 ./.hg/store/undo |
|
84 | 84 | 00660 ./.hg/store/undo.backupfiles |
|
85 | 85 | 00660 ./.hg/store/undo.phaseroots |
|
86 | 00660 ./.hg/undo.backup.dirstate | |
|
86 | 87 | 00660 ./.hg/undo.bookmarks |
|
87 | 88 | 00660 ./.hg/undo.branch |
|
88 | 89 | 00660 ./.hg/undo.desc |
@@ -229,9 +229,9 b" and that combination of '--edit' and '--" | |||
|
229 | 229 | HG: added aa |
|
230 | 230 | HG: changed a |
|
231 | 231 | ==== |
|
232 | note: commit message saved in .hg/last-message.txt | |
|
232 | 233 | transaction abort! |
|
233 | 234 | rollback completed |
|
234 | note: commit message saved in .hg/last-message.txt | |
|
235 | 235 | qrefresh interrupted while patch was popped! (revert --all, qpush to recover) |
|
236 | 236 | abort: pretxncommit.unexpectedabort hook exited with status 1 |
|
237 | 237 | [255] |
@@ -299,9 +299,9 b' Test saving last-message.txt' | |||
|
299 | 299 | HG: branch 'default' |
|
300 | 300 | HG: no files changed |
|
301 | 301 | ==== |
|
302 | note: commit message saved in .hg/last-message.txt | |
|
302 | 303 | transaction abort! |
|
303 | 304 | rollback completed |
|
304 | note: commit message saved in .hg/last-message.txt | |
|
305 | 305 | abort: pretxncommit.unexpectedabort hook exited with status 1 |
|
306 | 306 | [255] |
|
307 | 307 | $ cat .hg/last-message.txt |
@@ -185,9 +185,9 b' Test saving last-message.txt:' | |||
|
185 | 185 | HG: branch 'default' |
|
186 | 186 | HG: added file2 |
|
187 | 187 | ==== |
|
188 | note: commit message saved in .hg/last-message.txt | |
|
188 | 189 | transaction abort! |
|
189 | 190 | rollback completed |
|
190 | note: commit message saved in .hg/last-message.txt | |
|
191 | 191 | qrefresh interrupted while patch was popped! (revert --all, qpush to recover) |
|
192 | 192 | abort: pretxncommit.unexpectedabort hook exited with status 1 |
|
193 | 193 | [255] |
@@ -228,9 +228,9 b' external process' | |||
|
228 | 228 | 0:25e397dabed2 |
|
229 | 229 | A file2 |
|
230 | 230 | ==== |
|
231 | note: commit message saved in .hg/last-message.txt | |
|
231 | 232 | transaction abort! |
|
232 | 233 | rollback completed |
|
233 | note: commit message saved in .hg/last-message.txt | |
|
234 | 234 | qrefresh interrupted while patch was popped! (revert --all, qpush to recover) |
|
235 | 235 | abort: pretxncommit.unexpectedabort hook exited with status 1 |
|
236 | 236 | [255] |
@@ -113,9 +113,9 b' same thing, but run $EDITOR' | |||
|
113 | 113 | > echo "another precious commit message" > "$1" |
|
114 | 114 | > __EOF__ |
|
115 | 115 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg --config hooks.pretxncommit=false commit 2>&1 |
|
116 | note: commit message saved in .hg/last-message.txt | |
|
116 | 117 | transaction abort! |
|
117 | 118 | rollback completed |
|
118 | note: commit message saved in .hg/last-message.txt | |
|
119 | 119 | abort: pretxncommit hook exited with status * (glob) |
|
120 | 120 | [255] |
|
121 | 121 | $ cat .hg/last-message.txt |
@@ -272,9 +272,9 b" regardless of '--message')" | |||
|
272 | 272 | HG: branch 'tag-and-branch-same-name' |
|
273 | 273 | HG: changed .hgtags |
|
274 | 274 | ==== |
|
275 | note: commit message saved in .hg/last-message.txt | |
|
275 | 276 | transaction abort! |
|
276 | 277 | rollback completed |
|
277 | note: commit message saved in .hg/last-message.txt | |
|
278 | 278 | abort: pretxncommit.unexpectedabort hook exited with status 1 |
|
279 | 279 | [255] |
|
280 | 280 | $ cat .hg/last-message.txt |
General Comments 0
You need to be logged in to leave comments.
Login now