Mercurial > hg
comparison tests/test-shelve.t @ 39376:5f8282f368b2
shelve: add an "internal" extra
Keeping shelve changeset around increase the risk of collision with normal
changesets. To prevent such collision and help with overall clarity, we add an
'internal' key in extra that mark the changeset as created by "shelve".
Node changes in tests are expected.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Wed, 06 Jun 2018 01:46:37 +0200 |
parents | da121c9dc0f2 |
children | da84cca65036 |
comparison
equal
deleted
inserted
replaced
39375:38373da1af02 | 39376:5f8282f368b2 |
---|---|
385 diff --git a/a/a b/a/a | 385 diff --git a/a/a b/a/a |
386 --- a/a/a | 386 --- a/a/a |
387 +++ b/a/a | 387 +++ b/a/a |
388 @@ -1,2 +1,6 @@ | 388 @@ -1,2 +1,6 @@ |
389 a | 389 a |
390 +<<<<<<< shelve: 562f7831e574 - shelve: pending changes temporary commit | 390 +<<<<<<< shelve: 2377350b6337 - shelve: pending changes temporary commit |
391 c | 391 c |
392 +======= | 392 +======= |
393 +a | 393 +a |
394 +>>>>>>> working-copy: 32c69314e062 - shelve: changes to: [mq]: second.patch | 394 +>>>>>>> working-copy: a68ec3400638 - shelve: changes to: [mq]: second.patch |
395 diff --git a/b/b b/b.rename/b | 395 diff --git a/b/b b/b.rename/b |
396 rename from b/b | 396 rename from b/b |
397 rename to b.rename/b | 397 rename to b.rename/b |
398 diff --git a/c b/c.copy | 398 diff --git a/c b/c.copy |
399 copy from c | 399 copy from c |
807 | 807 |
808 $ hg st | 808 $ hg st |
809 M f | 809 M f |
810 ? f.orig | 810 ? f.orig |
811 $ cat f | 811 $ cat f |
812 <<<<<<< shelve: 5f6b880e719b - shelve: pending changes temporary commit | 812 <<<<<<< shelve: d44eae5c3d33 - shelve: pending changes temporary commit |
813 g | 813 g |
814 ======= | 814 ======= |
815 f | 815 f |
816 >>>>>>> working-copy: 81152db69da7 - shelve: changes to: commit stuff | 816 >>>>>>> working-copy: aef214a5229c - shelve: changes to: commit stuff |
817 $ cat f.orig | 817 $ cat f.orig |
818 g | 818 g |
819 $ hg unshelve --abort -t false | 819 $ hg unshelve --abort -t false |
820 tool option will be ignored | 820 tool option will be ignored |
821 unshelve of 'default' aborted | 821 unshelve of 'default' aborted |
853 $ cat f | 853 $ cat f |
854 <<<<<<< shelve: 6b563750f973 - test: intermediate other change | 854 <<<<<<< shelve: 6b563750f973 - test: intermediate other change |
855 g | 855 g |
856 ======= | 856 ======= |
857 f | 857 f |
858 >>>>>>> working-copy: 81152db69da7 - shelve: changes to: commit stuff | 858 >>>>>>> working-copy: aef214a5229c - shelve: changes to: commit stuff |
859 $ cat f.orig | 859 $ cat f.orig |
860 g | 860 g |
861 $ hg unshelve --abort | 861 $ hg unshelve --abort |
862 unshelve of 'default' aborted | 862 unshelve of 'default' aborted |
863 $ hg st | 863 $ hg st |
1115 $ hg add jungle | 1115 $ hg add jungle |
1116 $ hg shelve | 1116 $ hg shelve |
1117 shelved as default | 1117 shelved as default |
1118 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 1118 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
1119 $ hg debugbundle .hg/shelved/*.hg | 1119 $ hg debugbundle .hg/shelved/*.hg |
1120 45993d65fe9dc3c6d8764b9c3b07fa831ee7d92d | 1120 330882a04d2ce8487636b1fb292e5beea77fa1e3 |
1121 $ cd .. | 1121 $ cd .. |
1122 | 1122 |
1123 with general delta | 1123 with general delta |
1124 | 1124 |
1125 $ hg clone --pull repo bundle2 --config format.usegeneraldelta=1 | 1125 $ hg clone --pull repo bundle2 --config format.usegeneraldelta=1 |
1138 shelved as default | 1138 shelved as default |
1139 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 1139 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
1140 $ hg debugbundle .hg/shelved/*.hg | 1140 $ hg debugbundle .hg/shelved/*.hg |
1141 Stream params: {Compression: BZ} | 1141 Stream params: {Compression: BZ} |
1142 changegroup -- {nbchanges: 1, version: 02} (mandatory: True) | 1142 changegroup -- {nbchanges: 1, version: 02} (mandatory: True) |
1143 45993d65fe9dc3c6d8764b9c3b07fa831ee7d92d | 1143 330882a04d2ce8487636b1fb292e5beea77fa1e3 |
1144 $ cd .. | 1144 $ cd .. |
1145 | 1145 |
1146 Test visibility of in-memory changes inside transaction to external hook | 1146 Test visibility of in-memory changes inside transaction to external hook |
1147 ------------------------------------------------------------------------ | 1147 ------------------------------------------------------------------------ |
1148 | 1148 |
1193 | 1193 |
1194 $ hg unshelve --keep default | 1194 $ hg unshelve --keep default |
1195 temporarily committing pending changes (restore with 'hg unshelve --abort') | 1195 temporarily committing pending changes (restore with 'hg unshelve --abort') |
1196 rebasing shelved changes | 1196 rebasing shelved changes |
1197 ==== preupdate: | 1197 ==== preupdate: |
1198 VISIBLE 6:66b86db80ee4 | 1198 VISIBLE 6:54c00d20fb3f |
1199 ACTUAL 5:703117a2acfb | 1199 ACTUAL 5:703117a2acfb |
1200 ==== | 1200 ==== |
1201 ==== preupdate: | 1201 ==== preupdate: |
1202 VISIBLE 8:92fdbb7b4de7 | 1202 VISIBLE 8:8efe6f7537dc |
1203 ACTUAL 5:703117a2acfb | 1203 ACTUAL 5:703117a2acfb |
1204 ==== | 1204 ==== |
1205 ==== preupdate: | 1205 ==== preupdate: |
1206 VISIBLE 6:66b86db80ee4 | 1206 VISIBLE 6:54c00d20fb3f |
1207 ACTUAL 5:703117a2acfb | 1207 ACTUAL 5:703117a2acfb |
1208 ==== | 1208 ==== |
1209 | 1209 |
1210 $ cat >> .hg/hgrc <<EOF | 1210 $ cat >> .hg/hgrc <<EOF |
1211 > [hooks] | 1211 > [hooks] |
1237 | 1237 |
1238 $ hg unshelve --keep default | 1238 $ hg unshelve --keep default |
1239 temporarily committing pending changes (restore with 'hg unshelve --abort') | 1239 temporarily committing pending changes (restore with 'hg unshelve --abort') |
1240 rebasing shelved changes | 1240 rebasing shelved changes |
1241 ==== update: | 1241 ==== update: |
1242 VISIBLE 6:66b86db80ee4 | 1242 VISIBLE 6:54c00d20fb3f |
1243 VISIBLE 7:206bf5d4f922 | 1243 VISIBLE 7:492ed9d705e5 |
1244 ACTUAL 5:703117a2acfb | 1244 ACTUAL 5:703117a2acfb |
1245 ==== | 1245 ==== |
1246 ==== update: | 1246 ==== update: |
1247 VISIBLE 6:66b86db80ee4 | 1247 VISIBLE 6:54c00d20fb3f |
1248 ACTUAL 5:703117a2acfb | 1248 ACTUAL 5:703117a2acfb |
1249 ==== | 1249 ==== |
1250 ==== update: | 1250 ==== update: |
1251 VISIBLE 5:703117a2acfb | 1251 VISIBLE 5:703117a2acfb |
1252 ACTUAL 5:703117a2acfb | 1252 ACTUAL 5:703117a2acfb |
1778 $ cat << EOF > .hg/shelvedstate | 1778 $ cat << EOF > .hg/shelvedstate |
1779 > 1 | 1779 > 1 |
1780 > ashelve | 1780 > ashelve |
1781 > 8b058dae057a5a78f393f4535d9e363dd5efac9d | 1781 > 8b058dae057a5a78f393f4535d9e363dd5efac9d |
1782 > 8b058dae057a5a78f393f4535d9e363dd5efac9d | 1782 > 8b058dae057a5a78f393f4535d9e363dd5efac9d |
1783 > 8b058dae057a5a78f393f4535d9e363dd5efac9d 003d2d94241cc7aff0c3a148e966d6a4a377f3a7 | 1783 > 8b058dae057a5a78f393f4535d9e363dd5efac9d f543b27db2cdb41737e2e0008dc524c471da1446 |
1784 > 003d2d94241cc7aff0c3a148e966d6a4a377f3a7 | 1784 > f543b27db2cdb41737e2e0008dc524c471da1446 |
1785 > | 1785 > |
1786 > nokeep | 1786 > nokeep |
1787 > :no-active-bookmark | 1787 > :no-active-bookmark |
1788 > EOF | 1788 > EOF |
1789 $ echo 1 > a | 1789 $ echo 1 > a |