Mercurial > hg
comparison tests/test-histedit-edit.t @ 41362:57c462db87fd
localrepo: use context manager for transaction in commit()
A side-effect is that the transaction is released a little earlier, so
the "commit message saved in ..." messages now comes after the
"rollback completed" message. That seems slightly better to me.
Differential Revision: https://phab.mercurial-scm.org/D5622
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 16 Jan 2019 17:33:47 -0800 |
parents | 704a3aa3dc0a |
children | 15d2afa31e57 |
comparison
equal
deleted
inserted
replaced
41361:092c5d05ba01 | 41362:57c462db87fd |
---|---|
368 HG: -- | 368 HG: -- |
369 HG: user: test | 369 HG: user: test |
370 HG: branch 'default' | 370 HG: branch 'default' |
371 HG: added f | 371 HG: added f |
372 ==== | 372 ==== |
373 note: commit message saved in .hg/last-message.txt | |
374 transaction abort! | 373 transaction abort! |
375 rollback completed | 374 rollback completed |
375 note: commit message saved in .hg/last-message.txt | |
376 abort: pretxncommit.unexpectedabort hook exited with status 1 | 376 abort: pretxncommit.unexpectedabort hook exited with status 1 |
377 [255] | 377 [255] |
378 $ cat .hg/last-message.txt | 378 $ cat .hg/last-message.txt |
379 f | 379 f |
380 | 380 |
392 HG: Leave message empty to abort commit. | 392 HG: Leave message empty to abort commit. |
393 HG: -- | 393 HG: -- |
394 HG: user: test | 394 HG: user: test |
395 HG: branch 'default' | 395 HG: branch 'default' |
396 HG: added f | 396 HG: added f |
397 note: commit message saved in .hg/last-message.txt | |
398 transaction abort! | 397 transaction abort! |
399 rollback completed | 398 rollback completed |
399 note: commit message saved in .hg/last-message.txt | |
400 abort: pretxncommit.unexpectedabort hook exited with status 1 | 400 abort: pretxncommit.unexpectedabort hook exited with status 1 |
401 [255] | 401 [255] |
402 | 402 |
403 $ cat >> .hg/hgrc <<EOF | 403 $ cat >> .hg/hgrc <<EOF |
404 > [hooks] | 404 > [hooks] |