Mercurial > hg
comparison tests/test-hook.t @ 42897:d7304434390f
changegroup: move message about added changes to transaction summary
Before that, applying multiple changegroups in the same transaction issued the
message multiple time. This result in a confusing output:
adding changesets
adding manifests
adding file changes
added 32768 changesets with 60829 changes to 2668 files
adding changesets
adding manifests
adding file changes
added 8192 changesets with 16885 changes to 1553 files
adding changesets
adding manifests
adding file changes
added 1020 changesets with 1799 changes to 536 files
adding changesets
adding manifests
...
Instead, we now only issue the message once at the end of the transaction,
summing up all added changesets, changes and files. The line is identical, but
happens sightly later in the output.
There are other suboptimal behavior around issue multiple changegroup (eg:
progress bar). We'll cover them later.
This impact of lot of test as one would expect, but a two pass check show they
are just the order change we expected.
To deal with "under the hood" bundle application by internal code, we had to
take a slightly hacky move. We could clean that up with a more official way to
enter "under the hood" section, however I want to keep this series simple to get
it landed. This kind of change have a very high bit rot rate since it impact a
lot of test output.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 08 Sep 2019 09:42:53 +0200 |
parents | 94faa2e84094 |
children | 2372284d9457 |
comparison
equal
deleted
inserted
replaced
42896:7e19b640c53e | 42897:d7304434390f |
---|---|
718 pulling from ../a | 718 pulling from ../a |
719 searching for changes | 719 searching for changes |
720 adding changesets | 720 adding changesets |
721 adding manifests | 721 adding manifests |
722 adding file changes | 722 adding file changes |
723 added 1 changesets with 1 changes to 1 files | |
724 4:539e4b31b6dc | 723 4:539e4b31b6dc |
725 pretxnchangegroup.forbid hook: HG_HOOKNAME=pretxnchangegroup.forbid1 | 724 pretxnchangegroup.forbid hook: HG_HOOKNAME=pretxnchangegroup.forbid1 |
726 HG_HOOKTYPE=pretxnchangegroup | 725 HG_HOOKTYPE=pretxnchangegroup |
727 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 | 726 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 |
728 HG_NODE_LAST=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 | 727 HG_NODE_LAST=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 |
761 HG_SOURCE=pull | 760 HG_SOURCE=pull |
762 | 761 |
763 adding changesets | 762 adding changesets |
764 adding manifests | 763 adding manifests |
765 adding file changes | 764 adding file changes |
765 adding remote bookmark quux | |
766 added 1 changesets with 1 changes to 1 files | 766 added 1 changesets with 1 changes to 1 files |
767 adding remote bookmark quux | |
768 new changesets 539e4b31b6dc | 767 new changesets 539e4b31b6dc |
769 (run 'hg update' to get a working copy) | 768 (run 'hg update' to get a working copy) |
770 $ hg rollback | 769 $ hg rollback |
771 repository tip rolled back to revision 3 (undo pull) | 770 repository tip rolled back to revision 3 (undo pull) |
772 | 771 |
993 hooktype preoutgoing | 992 hooktype preoutgoing |
994 source pull | 993 source pull |
995 adding changesets | 994 adding changesets |
996 adding manifests | 995 adding manifests |
997 adding file changes | 996 adding file changes |
997 adding remote bookmark quux | |
998 added 1 changesets with 1 changes to 1 files | 998 added 1 changesets with 1 changes to 1 files |
999 adding remote bookmark quux | |
1000 new changesets 539e4b31b6dc | 999 new changesets 539e4b31b6dc |
1001 (run 'hg update' to get a working copy) | 1000 (run 'hg update' to get a working copy) |
1002 | 1001 |
1003 post- python hooks that fail to *run* don't cause an abort | 1002 post- python hooks that fail to *run* don't cause an abort |
1004 $ rm ../a/.hg/hgrc | 1003 $ rm ../a/.hg/hgrc |
1233 summary: a | 1232 summary: a |
1234 | 1233 |
1235 adding changesets | 1234 adding changesets |
1236 adding manifests | 1235 adding manifests |
1237 adding file changes | 1236 adding file changes |
1238 added 1 changesets with 1 changes to 1 files | |
1239 changeset: 1:9836a07b9b9d | 1237 changeset: 1:9836a07b9b9d |
1240 tag: tip | 1238 tag: tip |
1241 user: test | 1239 user: test |
1242 date: Thu Jan 01 00:00:00 1970 +0000 | 1240 date: Thu Jan 01 00:00:00 1970 +0000 |
1243 summary: b | 1241 summary: b |
1244 | 1242 |
1243 added 1 changesets with 1 changes to 1 files | |
1245 | 1244 |
1246 pretxnclose hook failure should abort the transaction | 1245 pretxnclose hook failure should abort the transaction |
1247 | 1246 |
1248 $ hg init txnfailure | 1247 $ hg init txnfailure |
1249 $ cd txnfailure | 1248 $ cd txnfailure |