equal
deleted
inserted
replaced
894 $ hg bookmarks |
894 $ hg bookmarks |
895 * mybook 0:867bc5792c8c |
895 * mybook 0:867bc5792c8c |
896 $ touch $TESTTMP/unpause |
896 $ touch $TESTTMP/unpause |
897 |
897 |
898 $ cd .. |
898 $ cd .. |
|
899 |
|
900 check whether HG_PENDING makes pending changes only in related |
|
901 repositories visible to an external hook. |
|
902 |
|
903 (emulate a transaction running concurrently by copied |
|
904 .hg/bookmarks.pending in subsequent test) |
|
905 |
|
906 $ cat > $TESTTMP/savepending.sh <<EOF |
|
907 > cp .hg/bookmarks.pending .hg/bookmarks.pending.saved |
|
908 > exit 1 # to avoid adding new bookmark for subsequent tests |
|
909 > EOF |
|
910 |
|
911 $ hg init unrelated |
|
912 $ cd unrelated |
|
913 $ echo a > a |
|
914 $ hg add a |
|
915 $ hg commit -m '#0' |
|
916 $ hg --config hooks.pretxnclose="sh $TESTTMP/savepending.sh" bookmarks INVISIBLE |
|
917 transaction abort! |
|
918 rollback completed |
|
919 abort: pretxnclose hook exited with status 1 |
|
920 [255] |
|
921 $ cp .hg/bookmarks.pending.saved .hg/bookmarks.pending |
|
922 |
|
923 (check visible bookmarks while transaction running in repo) |
|
924 |
|
925 $ cat > $TESTTMP/checkpending.sh <<EOF |
|
926 > echo "@repo" |
|
927 > hg -R $TESTTMP/repo bookmarks |
|
928 > echo "@unrelated" |
|
929 > hg -R $TESTTMP/unrelated bookmarks |
|
930 > exit 1 # to avoid adding new bookmark for subsequent tests |
|
931 > EOF |
|
932 |
|
933 $ cd ../repo |
|
934 $ hg --config hooks.pretxnclose="sh $TESTTMP/checkpending.sh" bookmarks NEW |
|
935 @repo |
|
936 * NEW 6:81dcce76aa0b |
|
937 X2 1:925d80f479bb |
|
938 Y 4:125c9a1d6df6 |
|
939 Z 5:5fb12f0f2d51 |
|
940 Z@1 1:925d80f479bb |
|
941 Z@2 4:125c9a1d6df6 |
|
942 foo 3:9ba5f110a0b3 |
|
943 foo@1 0:f7b1eb17ad24 |
|
944 foo@2 2:db815d6d32e6 |
|
945 four 3:9ba5f110a0b3 |
|
946 should-end-on-two 2:db815d6d32e6 |
|
947 x y 2:db815d6d32e6 |
|
948 @unrelated |
|
949 no bookmarks set |
|
950 transaction abort! |
|
951 rollback completed |
|
952 abort: pretxnclose hook exited with status 1 |
|
953 [255] |