Mercurial > hg
annotate tests/test-shelve2.t @ 50501:4242acf5c399
store: use the new boolean property in `remotefilelogserver`
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 15 May 2023 22:11:02 +0200 |
parents | a3356ab610fc |
children |
rev | line source |
---|---|
39519
5d69e2412ec8
shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents:
39387
diff
changeset
|
1 #testcases stripbased phasebased |
42599
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
2 #testcases abortflag abortcommand |
42614
117437f3f541
continue: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42600
diff
changeset
|
3 #testcases continueflag continuecommand |
49507
f0a3aaa07d6a
shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48592
diff
changeset
|
4 #testcases dirstate-v1 dirstate-v2 |
f0a3aaa07d6a
shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48592
diff
changeset
|
5 |
f0a3aaa07d6a
shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48592
diff
changeset
|
6 #if dirstate-v2 |
f0a3aaa07d6a
shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48592
diff
changeset
|
7 $ cat >> $HGRCPATH << EOF |
f0a3aaa07d6a
shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48592
diff
changeset
|
8 > [format] |
f0a3aaa07d6a
shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48592
diff
changeset
|
9 > use-dirstate-v2=1 |
f0a3aaa07d6a
shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48592
diff
changeset
|
10 > [storage] |
f0a3aaa07d6a
shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48592
diff
changeset
|
11 > dirstate-v2.slow-path=allow |
f0a3aaa07d6a
shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48592
diff
changeset
|
12 > EOF |
f0a3aaa07d6a
shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48592
diff
changeset
|
13 #endif |
39519
5d69e2412ec8
shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents:
39387
diff
changeset
|
14 |
23172
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22955
diff
changeset
|
15 $ cat <<EOF >> $HGRCPATH |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22955
diff
changeset
|
16 > [extensions] |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22955
diff
changeset
|
17 > mq = |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22955
diff
changeset
|
18 > [defaults] |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22955
diff
changeset
|
19 > diff = --nodates --git |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22955
diff
changeset
|
20 > qnew = --date '0 0' |
25713
2ca116614cfc
shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents:
25712
diff
changeset
|
21 > [shelve] |
2ca116614cfc
shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents:
25712
diff
changeset
|
22 > maxbackups = 2 |
23172
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22955
diff
changeset
|
23 > EOF |
19854
49d4919d21c2
shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff
changeset
|
24 |
39519
5d69e2412ec8
shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents:
39387
diff
changeset
|
25 #if phasebased |
5d69e2412ec8
shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents:
39387
diff
changeset
|
26 |
5d69e2412ec8
shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents:
39387
diff
changeset
|
27 $ cat <<EOF >> $HGRCPATH |
5d69e2412ec8
shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents:
39387
diff
changeset
|
28 > [format] |
49452
74fb1842f8b9
phase: rename the requirement for internal-phase (BC)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48592
diff
changeset
|
29 > use-internal-phase = yes |
39519
5d69e2412ec8
shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents:
39387
diff
changeset
|
30 > EOF |
5d69e2412ec8
shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents:
39387
diff
changeset
|
31 |
5d69e2412ec8
shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents:
39387
diff
changeset
|
32 #endif |
5d69e2412ec8
shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents:
39387
diff
changeset
|
33 |
42599
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
34 #if abortflag |
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
35 $ cat >> $HGRCPATH <<EOF |
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
36 > [alias] |
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
37 > abort = unshelve --abort |
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
38 > EOF |
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
39 #endif |
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
40 |
42614
117437f3f541
continue: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42600
diff
changeset
|
41 #if continueflag |
117437f3f541
continue: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42600
diff
changeset
|
42 $ cat >> $HGRCPATH <<EOF |
117437f3f541
continue: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42600
diff
changeset
|
43 > [alias] |
117437f3f541
continue: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42600
diff
changeset
|
44 > continue = unshelve --continue |
117437f3f541
continue: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42600
diff
changeset
|
45 > EOF |
117437f3f541
continue: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42600
diff
changeset
|
46 #endif |
117437f3f541
continue: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42600
diff
changeset
|
47 |
22183
4dd9f606d0a6
tests: fixup issue markers to make check-commit happy
Matt Mackall <mpm@selenic.com>
parents:
21947
diff
changeset
|
48 shelve should leave dirstate clean (issue4055) |
19887
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
49 |
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
50 $ hg init shelverebase |
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
51 $ cd shelverebase |
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
52 $ printf 'x\ny\n' > x |
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
53 $ echo z > z |
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
54 $ hg commit -Aqm xy |
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
55 $ echo z >> x |
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
56 $ hg commit -Aqm z |
38337
756a7682837f
shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents:
37841
diff
changeset
|
57 $ hg up 5c4c67fb7dce |
19887
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
58 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
59 $ printf 'a\nx\ny\nz\n' > x |
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
60 $ hg commit -Aqm xyz |
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
61 $ echo c >> z |
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
62 $ hg shelve |
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
63 shelved as default |
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
64 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
39744
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
65 |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
66 $ hg rebase -d 6c103be8f4e4 --config extensions.rebase= |
45771
f90a5c211251
rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents:
44332
diff
changeset
|
67 rebasing 2:323bfa07f744( tip)? "xyz" (re) |
39744
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
68 merging x |
39745
b2ec79559a4b
strip: ignore orphaned internal changesets while computing safe strip roots
Boris Feld <boris.feld@octobus.net>
parents:
39744
diff
changeset
|
69 saved backup bundle to \$TESTTMP/shelverebase/.hg/strip-backup/323bfa07f744-(78114325|7ae538ef)-rebase.hg (re) |
19887
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
70 $ hg unshelve |
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
71 unshelving change 'default' |
20413
0ac94c0a3a38
shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents:
20412
diff
changeset
|
72 rebasing shelved changes |
19887
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
73 $ hg status |
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
74 M z |
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
75 |
dd7c294365f0
shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents:
19885
diff
changeset
|
76 $ cd .. |
19961
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
77 |
22183
4dd9f606d0a6
tests: fixup issue markers to make check-commit happy
Matt Mackall <mpm@selenic.com>
parents:
21947
diff
changeset
|
78 shelve should only unshelve pending changes (issue4068) |
19961
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
79 |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
80 $ hg init onlypendingchanges |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
81 $ cd onlypendingchanges |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
82 $ touch a |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
83 $ hg ci -Aqm a |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
84 $ touch b |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
85 $ hg ci -Aqm b |
38337
756a7682837f
shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents:
37841
diff
changeset
|
86 $ hg up -q 3903775176ed |
19961
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
87 $ touch c |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
88 $ hg ci -Aqm c |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
89 |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
90 $ touch d |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
91 $ hg add d |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
92 $ hg shelve |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
93 shelved as default |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
94 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
38337
756a7682837f
shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents:
37841
diff
changeset
|
95 $ hg up -q 0e067c57feba |
19961
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
96 $ hg unshelve |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
97 unshelving change 'default' |
20413
0ac94c0a3a38
shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents:
20412
diff
changeset
|
98 rebasing shelved changes |
19961
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
99 $ hg status |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
100 A d |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
101 |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
102 unshelve should work on an ancestor of the original commit |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
103 |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
104 $ hg shelve |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
105 shelved as default |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
106 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
38337
756a7682837f
shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents:
37841
diff
changeset
|
107 $ hg up 3903775176ed |
19961
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
108 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
109 $ hg unshelve |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
110 unshelving change 'default' |
20413
0ac94c0a3a38
shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents:
20412
diff
changeset
|
111 rebasing shelved changes |
19961
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
112 $ hg status |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
113 A d |
1d7a36ff2615
shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents:
19943
diff
changeset
|
114 |
20064
99c4b8f79324
shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents:
19973
diff
changeset
|
115 test bug 4073 we need to enable obsolete markers for it |
99c4b8f79324
shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents:
19973
diff
changeset
|
116 |
22955
fab9dda0f2a3
obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com>
parents:
22905
diff
changeset
|
117 $ cat >> $HGRCPATH << EOF |
fab9dda0f2a3
obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com>
parents:
22905
diff
changeset
|
118 > [experimental] |
34866
1644623ab096
config: use 'experimental.evolution.create-markers'
Boris Feld <boris.feld@octobus.net>
parents:
34661
diff
changeset
|
119 > evolution.createmarkers=True |
20064
99c4b8f79324
shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents:
19973
diff
changeset
|
120 > EOF |
99c4b8f79324
shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents:
19973
diff
changeset
|
121 $ hg shelve |
99c4b8f79324
shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents:
19973
diff
changeset
|
122 shelved as default |
99c4b8f79324
shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents:
19973
diff
changeset
|
123 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
38337
756a7682837f
shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents:
37841
diff
changeset
|
124 $ hg debugobsolete `hg log -r 0e067c57feba -T '{node}'` |
42893
34a46d48d24e
debugobsolete: also issue the "new obsmarkers" messsage
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42614
diff
changeset
|
125 1 new obsolescence markers |
33542
b11e8c67fb0f
debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents:
33332
diff
changeset
|
126 obsoleted 1 changesets |
20064
99c4b8f79324
shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents:
19973
diff
changeset
|
127 $ hg unshelve |
99c4b8f79324
shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents:
19973
diff
changeset
|
128 unshelving change 'default' |
99c4b8f79324
shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents:
19973
diff
changeset
|
129 |
20150
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
130 unshelve should leave unknown files alone (issue4113) |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
131 |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
132 $ echo e > e |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
133 $ hg shelve |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
134 shelved as default |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
135 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
136 $ hg status |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
137 ? e |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
138 $ hg unshelve |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
139 unshelving change 'default' |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
140 $ hg status |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
141 A d |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
142 ? e |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
143 $ cat e |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
144 e |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
145 |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
146 unshelve should keep a copy of unknown files |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
147 |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
148 $ hg add e |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
149 $ hg shelve |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
150 shelved as default |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
151 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
152 $ echo z > e |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
153 $ hg unshelve |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
154 unshelving change 'default' |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
155 $ cat e |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
156 e |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
157 $ cat e.orig |
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
158 z |
41594
7e09ffb3170d
tests: demonstrate broken unshelve when backing up untracked file
Martin von Zweigbergk <martinvonz@google.com>
parents:
40852
diff
changeset
|
159 $ rm e.orig |
20150
11dbc38cebc6
unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents:
20064
diff
changeset
|
160 |
41594
7e09ffb3170d
tests: demonstrate broken unshelve when backing up untracked file
Martin von Zweigbergk <martinvonz@google.com>
parents:
40852
diff
changeset
|
161 restores backup of unknown file to right directory |
7e09ffb3170d
tests: demonstrate broken unshelve when backing up untracked file
Martin von Zweigbergk <martinvonz@google.com>
parents:
40852
diff
changeset
|
162 |
7e09ffb3170d
tests: demonstrate broken unshelve when backing up untracked file
Martin von Zweigbergk <martinvonz@google.com>
parents:
40852
diff
changeset
|
163 $ hg shelve |
7e09ffb3170d
tests: demonstrate broken unshelve when backing up untracked file
Martin von Zweigbergk <martinvonz@google.com>
parents:
40852
diff
changeset
|
164 shelved as default |
7e09ffb3170d
tests: demonstrate broken unshelve when backing up untracked file
Martin von Zweigbergk <martinvonz@google.com>
parents:
40852
diff
changeset
|
165 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
7e09ffb3170d
tests: demonstrate broken unshelve when backing up untracked file
Martin von Zweigbergk <martinvonz@google.com>
parents:
40852
diff
changeset
|
166 $ echo z > e |
7e09ffb3170d
tests: demonstrate broken unshelve when backing up untracked file
Martin von Zweigbergk <martinvonz@google.com>
parents:
40852
diff
changeset
|
167 $ mkdir dir |
7e09ffb3170d
tests: demonstrate broken unshelve when backing up untracked file
Martin von Zweigbergk <martinvonz@google.com>
parents:
40852
diff
changeset
|
168 $ hg unshelve --cwd dir |
7e09ffb3170d
tests: demonstrate broken unshelve when backing up untracked file
Martin von Zweigbergk <martinvonz@google.com>
parents:
40852
diff
changeset
|
169 unshelving change 'default' |
7e09ffb3170d
tests: demonstrate broken unshelve when backing up untracked file
Martin von Zweigbergk <martinvonz@google.com>
parents:
40852
diff
changeset
|
170 $ rmdir dir |
7e09ffb3170d
tests: demonstrate broken unshelve when backing up untracked file
Martin von Zweigbergk <martinvonz@google.com>
parents:
40852
diff
changeset
|
171 $ cat e |
41596
630af04d4ae4
shelve: fix broken backup of conflicting untracked file
Martin von Zweigbergk <martinvonz@google.com>
parents:
41594
diff
changeset
|
172 e |
630af04d4ae4
shelve: fix broken backup of conflicting untracked file
Martin von Zweigbergk <martinvonz@google.com>
parents:
41594
diff
changeset
|
173 $ cat e.orig |
41594
7e09ffb3170d
tests: demonstrate broken unshelve when backing up untracked file
Martin von Zweigbergk <martinvonz@google.com>
parents:
40852
diff
changeset
|
174 z |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
175 |
20961
6c40ea34ecc1
tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents:
20960
diff
changeset
|
176 unshelve and conflicts with tracked and untracked files |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
177 |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
178 preparing: |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
179 |
41594
7e09ffb3170d
tests: demonstrate broken unshelve when backing up untracked file
Martin von Zweigbergk <martinvonz@google.com>
parents:
40852
diff
changeset
|
180 $ rm -f *.orig |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
181 $ hg ci -qm 'commit stuff' |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
182 $ hg phase -p null: |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
183 |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
184 no other changes - no merge: |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
185 |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
186 $ echo f > f |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
187 $ hg add f |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
188 $ hg shelve |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
189 shelved as default |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
190 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
20961
6c40ea34ecc1
tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents:
20960
diff
changeset
|
191 $ echo g > f |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
192 $ hg unshelve |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
193 unshelving change 'default' |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
194 $ hg st |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
195 A f |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
196 ? f.orig |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
197 $ cat f |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
198 f |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
199 $ cat f.orig |
20961
6c40ea34ecc1
tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents:
20960
diff
changeset
|
200 g |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
201 |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
202 other uncommitted changes - merge: |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
203 |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
204 $ hg st |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
205 A f |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
206 ? f.orig |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
207 $ hg shelve |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
208 shelved as default |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
209 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
37346
45a4799174a1
tests: disallow using simple store repo with bundlerepo
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36001
diff
changeset
|
210 #if repobundlerepo |
39744
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
211 $ hg log -G --template '{rev} {desc|firstline} {author}' -R bundle://.hg/shelved/default.hg -r 'bundle()' --hidden |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
212 o [48] changes to: commit stuff shelve@localhost (re) |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
213 | |
28627
d7af9b4ae7dd
graphmod: set default edge styles for ascii graphs (BC)
Martijn Pieters <mjpieters@fb.com>
parents:
28573
diff
changeset
|
214 ~ |
37346
45a4799174a1
tests: disallow using simple store repo with bundlerepo
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36001
diff
changeset
|
215 #endif |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
216 $ hg log -G --template '{rev} {desc|firstline} {author}' |
39744
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
217 @ [37] commit stuff test (re) |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
218 | |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
219 | o 2 c test |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
220 |/ |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
221 o 0 a test |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
222 |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
223 $ mv f.orig f |
20961
6c40ea34ecc1
tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents:
20960
diff
changeset
|
224 $ echo 1 > a |
20960
8e5b21ce8ee9
shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents:
20423
diff
changeset
|
225 $ hg unshelve --date '1073741824 0' |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
226 unshelving change 'default' |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
227 temporarily committing pending changes (restore with 'hg unshelve --abort') |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
228 rebasing shelved changes |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
229 merging f |
26614
ef1eb6df7071
simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents:
26520
diff
changeset
|
230 warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
231 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
45826
21733e8c924f
errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents:
45771
diff
changeset
|
232 [240] |
39744
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
233 |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
234 #if phasebased |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
235 $ hg log -G --template '{rev} {desc|firstline} {author} {date|isodate}' |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
236 @ 9 pending changes temporary commit shelve@localhost 2004-01-10 13:37 +0000 |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
237 | |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
238 | @ 8 changes to: commit stuff shelve@localhost 1970-01-01 00:00 +0000 |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
239 |/ |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
240 o 7 commit stuff test 1970-01-01 00:00 +0000 |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
241 | |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
242 | o 2 c test 1970-01-01 00:00 +0000 |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
243 |/ |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
244 o 0 a test 1970-01-01 00:00 +0000 |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
245 |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
246 #endif |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
247 |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
248 #if stripbased |
20960
8e5b21ce8ee9
shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents:
20423
diff
changeset
|
249 $ hg log -G --template '{rev} {desc|firstline} {author} {date|isodate}' |
27092
156985f2dec0
shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents:
27021
diff
changeset
|
250 @ 5 changes to: commit stuff shelve@localhost 1970-01-01 00:00 +0000 |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
251 | |
20960
8e5b21ce8ee9
shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents:
20423
diff
changeset
|
252 | @ 4 pending changes temporary commit shelve@localhost 2004-01-10 13:37 +0000 |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
253 |/ |
20960
8e5b21ce8ee9
shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents:
20423
diff
changeset
|
254 o 3 commit stuff test 1970-01-01 00:00 +0000 |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
255 | |
20960
8e5b21ce8ee9
shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents:
20423
diff
changeset
|
256 | o 2 c test 1970-01-01 00:00 +0000 |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
257 |/ |
20960
8e5b21ce8ee9
shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents:
20423
diff
changeset
|
258 o 0 a test 1970-01-01 00:00 +0000 |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
259 |
39744
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
260 #endif |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
261 |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
262 $ hg st |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
263 M f |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
264 ? f.orig |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
265 $ cat f |
48592
bcc4820242cf
shelve: attempt to make merge labels more helpful
Martin von Zweigbergk <martinvonz@google.com>
parents:
46289
diff
changeset
|
266 <<<<<<< working-copy: d44eae5c3d33 - shelve: pending changes temporary commit |
20961
6c40ea34ecc1
tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents:
20960
diff
changeset
|
267 g |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
268 ======= |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
269 f |
48592
bcc4820242cf
shelve: attempt to make merge labels more helpful
Martin von Zweigbergk <martinvonz@google.com>
parents:
46289
diff
changeset
|
270 >>>>>>> shelved change: aef214a5229c - shelve: changes to: commit stuff |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
271 $ cat f.orig |
20961
6c40ea34ecc1
tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents:
20960
diff
changeset
|
272 g |
27021
f2554154509f
unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents:
27019
diff
changeset
|
273 $ hg unshelve --abort -t false |
f2554154509f
unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents:
27019
diff
changeset
|
274 tool option will be ignored |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
275 unshelve of 'default' aborted |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
276 $ hg st |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
277 M a |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
278 ? f.orig |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
279 $ cat f.orig |
20961
6c40ea34ecc1
tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents:
20960
diff
changeset
|
280 g |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
281 $ hg unshelve |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
282 unshelving change 'default' |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
283 temporarily committing pending changes (restore with 'hg unshelve --abort') |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
284 rebasing shelved changes |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
285 $ hg st |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
286 M a |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
287 A f |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
288 ? f.orig |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
289 |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
290 other committed changes - merge: |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
291 |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
292 $ hg shelve f |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
293 shelved as default |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
294 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
295 $ hg ci a -m 'intermediate other change' |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
296 $ mv f.orig f |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
297 $ hg unshelve |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
298 unshelving change 'default' |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
299 rebasing shelved changes |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
300 merging f |
26614
ef1eb6df7071
simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents:
26520
diff
changeset
|
301 warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
302 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
45826
21733e8c924f
errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents:
45771
diff
changeset
|
303 [240] |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
304 $ hg st |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
305 M f |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
306 ? f.orig |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
307 $ cat f |
48592
bcc4820242cf
shelve: attempt to make merge labels more helpful
Martin von Zweigbergk <martinvonz@google.com>
parents:
46289
diff
changeset
|
308 <<<<<<< working-copy: 6b563750f973 - test: intermediate other change |
20961
6c40ea34ecc1
tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents:
20960
diff
changeset
|
309 g |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
310 ======= |
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
311 f |
48592
bcc4820242cf
shelve: attempt to make merge labels more helpful
Martin von Zweigbergk <martinvonz@google.com>
parents:
46289
diff
changeset
|
312 >>>>>>> shelved change: aef214a5229c - shelve: changes to: commit stuff |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
313 $ cat f.orig |
20961
6c40ea34ecc1
tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents:
20960
diff
changeset
|
314 g |
42599
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
315 |
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
316 #if abortcommand |
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
317 when in dry-run mode |
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
318 $ hg abort --dry-run |
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
319 unshelve in progress, will be aborted |
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
320 #endif |
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
321 |
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
322 $ hg abort |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
323 unshelve of 'default' aborted |
20961
6c40ea34ecc1
tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents:
20960
diff
changeset
|
324 $ hg st |
6c40ea34ecc1
tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents:
20960
diff
changeset
|
325 ? f.orig |
6c40ea34ecc1
tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents:
20960
diff
changeset
|
326 $ cat f.orig |
6c40ea34ecc1
tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents:
20960
diff
changeset
|
327 g |
20414
022431336f72
shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents:
20413
diff
changeset
|
328 $ hg shelve --delete default |
38715
905b66681004
shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents:
38714
diff
changeset
|
329 $ cd .. |
905b66681004
shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents:
38714
diff
changeset
|
330 |
905b66681004
shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents:
38714
diff
changeset
|
331 you shouldn't be able to ask for the patch/stats of the most recent shelve if |
905b66681004
shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents:
38714
diff
changeset
|
332 there are no shelves |
905b66681004
shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents:
38714
diff
changeset
|
333 |
905b66681004
shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents:
38714
diff
changeset
|
334 $ hg init noshelves |
905b66681004
shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents:
38714
diff
changeset
|
335 $ cd noshelves |
905b66681004
shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents:
38714
diff
changeset
|
336 |
905b66681004
shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents:
38714
diff
changeset
|
337 $ hg shelve --patch |
905b66681004
shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents:
38714
diff
changeset
|
338 abort: there are no shelves to show |
905b66681004
shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents:
38714
diff
changeset
|
339 [255] |
905b66681004
shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents:
38714
diff
changeset
|
340 $ hg shelve --stat |
905b66681004
shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents:
38714
diff
changeset
|
341 abort: there are no shelves to show |
30823
806a830e6612
shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents:
30671
diff
changeset
|
342 [255] |
25104
d6453f6fbdba
shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents:
24872
diff
changeset
|
343 |
26507
ae29cffa05db
shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25799
diff
changeset
|
344 $ cd .. |
ae29cffa05db
shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25799
diff
changeset
|
345 |
26942
d55d22840592
shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26934
diff
changeset
|
346 test .orig files go where the user wants them to |
26681
ca8170b5d370
shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26614
diff
changeset
|
347 --------------------------------------------------------------- |
ca8170b5d370
shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26614
diff
changeset
|
348 $ hg init salvage |
ca8170b5d370
shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26614
diff
changeset
|
349 $ cd salvage |
ca8170b5d370
shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26614
diff
changeset
|
350 $ echo 'content' > root |
ca8170b5d370
shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26614
diff
changeset
|
351 $ hg commit -A -m 'root' -q |
ca8170b5d370
shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26614
diff
changeset
|
352 $ echo '' > root |
ca8170b5d370
shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26614
diff
changeset
|
353 $ hg shelve -q |
ca8170b5d370
shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26614
diff
changeset
|
354 $ echo 'contADDent' > root |
26942
d55d22840592
shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26934
diff
changeset
|
355 $ hg unshelve -q --config 'ui.origbackuppath=.hg/origbackups' |
26681
ca8170b5d370
shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26614
diff
changeset
|
356 warning: conflicts while merging root! (edit, then use 'hg resolve --mark') |
ca8170b5d370
shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26614
diff
changeset
|
357 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
45826
21733e8c924f
errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents:
45771
diff
changeset
|
358 [240] |
26942
d55d22840592
shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26934
diff
changeset
|
359 $ ls .hg/origbackups |
34146
9e4f82bc2b0b
scmutil: don't append .orig to backups in origbackuppath (BC)
Mark Thomas <mbthomas@fb.com>
parents:
34025
diff
changeset
|
360 root |
26942
d55d22840592
shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26934
diff
changeset
|
361 $ rm -rf .hg/origbackups |
d55d22840592
shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26934
diff
changeset
|
362 |
d55d22840592
shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26934
diff
changeset
|
363 test Abort unshelve always gets user out of the unshelved state |
d55d22840592
shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26934
diff
changeset
|
364 --------------------------------------------------------------- |
26681
ca8170b5d370
shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26614
diff
changeset
|
365 |
38465
a8f99334ae31
shelve: stop testing missing rebase state file
Boris Feld <boris.feld@octobus.net>
parents:
38464
diff
changeset
|
366 with a corrupted shelve state file |
26681
ca8170b5d370
shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26614
diff
changeset
|
367 $ sed 's/ae8c668541e8/123456789012/' .hg/shelvedstate > ../corrupt-shelvedstate |
38464
920f69c0b549
shelve: actually test corrupted shelve state
Boris Feld <boris.feld@octobus.net>
parents:
38463
diff
changeset
|
368 $ mv ../corrupt-shelvedstate .hg/shelvestate |
38338
2313a3599e41
shelve: wider check for successful abort in test
Boris Feld <boris.feld@octobus.net>
parents:
38337
diff
changeset
|
369 $ hg unshelve --abort 2>&1 | grep 'aborted' |
38465
a8f99334ae31
shelve: stop testing missing rebase state file
Boris Feld <boris.feld@octobus.net>
parents:
38464
diff
changeset
|
370 unshelve of 'default' aborted |
38338
2313a3599e41
shelve: wider check for successful abort in test
Boris Feld <boris.feld@octobus.net>
parents:
38337
diff
changeset
|
371 $ hg summary |
2313a3599e41
shelve: wider check for successful abort in test
Boris Feld <boris.feld@octobus.net>
parents:
38337
diff
changeset
|
372 parent: 0:ae8c668541e8 tip |
2313a3599e41
shelve: wider check for successful abort in test
Boris Feld <boris.feld@octobus.net>
parents:
38337
diff
changeset
|
373 root |
2313a3599e41
shelve: wider check for successful abort in test
Boris Feld <boris.feld@octobus.net>
parents:
38337
diff
changeset
|
374 branch: default |
38465
a8f99334ae31
shelve: stop testing missing rebase state file
Boris Feld <boris.feld@octobus.net>
parents:
38464
diff
changeset
|
375 commit: 1 modified |
38338
2313a3599e41
shelve: wider check for successful abort in test
Boris Feld <boris.feld@octobus.net>
parents:
38337
diff
changeset
|
376 update: (current) |
2313a3599e41
shelve: wider check for successful abort in test
Boris Feld <boris.feld@octobus.net>
parents:
38337
diff
changeset
|
377 phases: 1 draft |
26681
ca8170b5d370
shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26614
diff
changeset
|
378 $ hg up -C . |
ca8170b5d370
shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents:
26614
diff
changeset
|
379 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
26933
a7eecd021782
share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26776
diff
changeset
|
380 |
a7eecd021782
share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26776
diff
changeset
|
381 $ cd .. |
a7eecd021782
share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26776
diff
changeset
|
382 |
27908
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
383 Shelve and unshelve unknown files. For the purposes of unshelve, a shelved |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
384 unknown file is the same as a shelved added file, except that it will be in |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
385 unknown state after unshelve if and only if it was either absent or unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
386 before the unshelve operation. |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
387 |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
388 $ hg init unknowns |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
389 $ cd unknowns |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
390 |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
391 The simplest case is if I simply have an unknown file that I shelve and unshelve |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
392 |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
393 $ echo unknown > unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
394 $ hg status |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
395 ? unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
396 $ hg shelve --unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
397 shelved as default |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
398 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
399 $ hg status |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
400 $ hg unshelve |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
401 unshelving change 'default' |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
402 $ hg status |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
403 ? unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
404 $ rm unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
405 |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
406 If I shelve, add the file, and unshelve, does it stay added? |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
407 |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
408 $ echo unknown > unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
409 $ hg shelve -u |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
410 shelved as default |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
411 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
412 $ hg status |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
413 $ touch unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
414 $ hg add unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
415 $ hg status |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
416 A unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
417 $ hg unshelve |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
418 unshelving change 'default' |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
419 temporarily committing pending changes (restore with 'hg unshelve --abort') |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
420 rebasing shelved changes |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
421 merging unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
422 $ hg status |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
423 A unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
424 $ hg forget unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
425 $ rm unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
426 |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
427 And if I shelve, commit, then unshelve, does it become modified? |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
428 |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
429 $ echo unknown > unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
430 $ hg shelve -u |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
431 shelved as default |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
432 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
433 $ hg status |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
434 $ touch unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
435 $ hg add unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
436 $ hg commit -qm "Add unknown" |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
437 $ hg status |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
438 $ hg unshelve |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
439 unshelving change 'default' |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
440 rebasing shelved changes |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
441 merging unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
442 $ hg status |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
443 M unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
444 $ hg remove --force unknown |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
445 $ hg commit -qm "Remove unknown" |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
446 |
d73a5ab18015
shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents:
27694
diff
changeset
|
447 $ cd .. |
28571
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
448 |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
449 We expects that non-bare shelve keeps newly created branch in |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
450 working directory. |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
451 |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
452 $ hg init shelve-preserve-new-branch |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
453 $ cd shelve-preserve-new-branch |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
454 $ echo "a" >> a |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
455 $ hg add a |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
456 $ echo "b" >> b |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
457 $ hg add b |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
458 $ hg commit -m "ab" |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
459 $ echo "aa" >> a |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
460 $ echo "bb" >> b |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
461 $ hg branch new-branch |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
462 marked working directory as branch new-branch |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
463 (branches are permanent and global, did you want a bookmark?) |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
464 $ hg status |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
465 M a |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
466 M b |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
467 $ hg branch |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
468 new-branch |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
469 $ hg shelve a |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
470 shelved as default |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
471 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
472 $ hg branch |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
473 new-branch |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
474 $ hg status |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
475 M b |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
476 $ touch "c" >> c |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
477 $ hg add c |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
478 $ hg status |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
479 M b |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
480 A c |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
481 $ hg shelve --exclude c |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
482 shelved as default-01 |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
483 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
484 $ hg branch |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
485 new-branch |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
486 $ hg status |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
487 A c |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
488 $ hg shelve --include c |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
489 shelved as default-02 |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
490 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
491 $ hg branch |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
492 new-branch |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
493 $ hg status |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
494 $ echo "d" >> d |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
495 $ hg add d |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
496 $ hg status |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
497 A d |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
498 |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
499 We expect that bare-shelve will not keep branch in current working directory. |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
500 |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
501 $ hg shelve |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
502 shelved as default-03 |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
503 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
504 $ hg branch |
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
505 default |
30549
9e29d4e4e08b
shelve: fix use of unexpected working dirs in test-shelve.t
Kostia Balytskyi <ikostia@fb.com>
parents:
30542
diff
changeset
|
506 $ cd .. |
28571
3f0e25e89e28
shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28124
diff
changeset
|
507 |
28573
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
508 When i shelve commit on newly created branch i expect |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
509 that after unshelve newly created branch will be preserved. |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
510 |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
511 $ hg init shelve_on_new_branch_simple |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
512 $ cd shelve_on_new_branch_simple |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
513 $ echo "aaa" >> a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
514 $ hg commit -A -m "a" |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
515 adding a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
516 $ hg branch |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
517 default |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
518 $ hg branch test |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
519 marked working directory as branch test |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
520 (branches are permanent and global, did you want a bookmark?) |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
521 $ echo "bbb" >> a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
522 $ hg status |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
523 M a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
524 $ hg shelve |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
525 shelved as default |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
526 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
527 $ hg branch |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
528 default |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
529 $ echo "bbb" >> b |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
530 $ hg status |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
531 ? b |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
532 $ hg unshelve |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
533 unshelving change 'default' |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
534 marked working directory as branch test |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
535 $ hg status |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
536 M a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
537 ? b |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
538 $ hg branch |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
539 test |
30549
9e29d4e4e08b
shelve: fix use of unexpected working dirs in test-shelve.t
Kostia Balytskyi <ikostia@fb.com>
parents:
30542
diff
changeset
|
540 $ cd .. |
28573
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
541 |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
542 When i shelve commit on newly created branch, make |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
543 some changes, unshelve it and running into merge |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
544 conflicts i expect that after fixing them and |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
545 running unshelve --continue newly created branch |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
546 will be preserved. |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
547 |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
548 $ hg init shelve_on_new_branch_conflict |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
549 $ cd shelve_on_new_branch_conflict |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
550 $ echo "aaa" >> a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
551 $ hg commit -A -m "a" |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
552 adding a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
553 $ hg branch |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
554 default |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
555 $ hg branch test |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
556 marked working directory as branch test |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
557 (branches are permanent and global, did you want a bookmark?) |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
558 $ echo "bbb" >> a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
559 $ hg status |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
560 M a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
561 $ hg shelve |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
562 shelved as default |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
563 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
564 $ hg branch |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
565 default |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
566 $ echo "ccc" >> a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
567 $ hg status |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
568 M a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
569 $ hg unshelve |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
570 unshelving change 'default' |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
571 temporarily committing pending changes (restore with 'hg unshelve --abort') |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
572 rebasing shelved changes |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
573 merging a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
574 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
575 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
45826
21733e8c924f
errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents:
45771
diff
changeset
|
576 [240] |
28573
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
577 $ echo "aaabbbccc" > a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
578 $ rm a.orig |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
579 $ hg resolve --mark a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
580 (no more unresolved files) |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
581 continue: hg unshelve --continue |
42614
117437f3f541
continue: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42600
diff
changeset
|
582 $ hg continue |
28573
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
583 marked working directory as branch test |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
584 unshelve of 'default' complete |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
585 $ cat a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
586 aaabbbccc |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
587 $ hg status |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
588 M a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
589 $ hg branch |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
590 test |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
591 $ hg commit -m "test-commit" |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
592 |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
593 When i shelve on test branch, update to default branch |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
594 and unshelve i expect that it will not preserve previous |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
595 test branch. |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
596 |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
597 $ echo "xxx" > b |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
598 $ hg add b |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
599 $ hg shelve |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
600 shelved as test |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
601 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
38337
756a7682837f
shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents:
37841
diff
changeset
|
602 $ hg update -r 7049e48789d7 |
28573
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
603 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
604 $ hg unshelve |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
605 unshelving change 'test' |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
606 rebasing shelved changes |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
607 $ hg status |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
608 A b |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
609 $ hg branch |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
610 default |
30549
9e29d4e4e08b
shelve: fix use of unexpected working dirs in test-shelve.t
Kostia Balytskyi <ikostia@fb.com>
parents:
30542
diff
changeset
|
611 $ cd .. |
28573
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
612 |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
613 When i unshelve resulting in merge conflicts and makes saved |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
614 file shelvedstate looks like in previous versions in |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
615 mercurial(without restore branch information in 7th line) i |
30332
318a24b52eeb
spelling: fixes of non-dictionary words
Mads Kiilerich <madski@unity3d.com>
parents:
30152
diff
changeset
|
616 expect that after resolving conflicts and successfully |
28573
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
617 running 'shelve --continue' the branch information won't be |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
618 restored and branch will be unchanged. |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
619 |
28941
8353d154a9bd
test-shelve: shorten a long path so it works on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
28627
diff
changeset
|
620 shelve on new branch, conflict with previous shelvedstate |
8353d154a9bd
test-shelve: shorten a long path so it works on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
28627
diff
changeset
|
621 |
8353d154a9bd
test-shelve: shorten a long path so it works on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
28627
diff
changeset
|
622 $ hg init conflict |
8353d154a9bd
test-shelve: shorten a long path so it works on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
28627
diff
changeset
|
623 $ cd conflict |
28573
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
624 $ echo "aaa" >> a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
625 $ hg commit -A -m "a" |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
626 adding a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
627 $ hg branch |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
628 default |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
629 $ hg branch test |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
630 marked working directory as branch test |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
631 (branches are permanent and global, did you want a bookmark?) |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
632 $ echo "bbb" >> a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
633 $ hg status |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
634 M a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
635 $ hg shelve |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
636 shelved as default |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
637 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
638 $ hg branch |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
639 default |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
640 $ echo "ccc" >> a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
641 $ hg status |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
642 M a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
643 $ hg unshelve |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
644 unshelving change 'default' |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
645 temporarily committing pending changes (restore with 'hg unshelve --abort') |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
646 rebasing shelved changes |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
647 merging a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
648 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
649 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
45826
21733e8c924f
errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents:
45771
diff
changeset
|
650 [240] |
28573
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
651 |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
652 Removing restore branch information from shelvedstate file(making it looks like |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
653 in previous versions) and running unshelve --continue |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
654 |
32285
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
655 $ cp .hg/shelvedstate .hg/shelvedstate_old |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
656 $ cat .hg/shelvedstate_old | grep -v 'branchtorestore' > .hg/shelvedstate |
28573
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
657 |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
658 $ echo "aaabbbccc" > a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
659 $ rm a.orig |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
660 $ hg resolve --mark a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
661 (no more unresolved files) |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
662 continue: hg unshelve --continue |
42614
117437f3f541
continue: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42600
diff
changeset
|
663 |
117437f3f541
continue: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42600
diff
changeset
|
664 #if continuecommand |
117437f3f541
continue: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42600
diff
changeset
|
665 $ hg continue --dry-run |
117437f3f541
continue: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42600
diff
changeset
|
666 unshelve in progress, will be resumed |
117437f3f541
continue: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42600
diff
changeset
|
667 #endif |
117437f3f541
continue: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42600
diff
changeset
|
668 |
117437f3f541
continue: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42600
diff
changeset
|
669 $ hg continue |
28573
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
670 unshelve of 'default' complete |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
671 $ cat a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
672 aaabbbccc |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
673 $ hg status |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
674 M a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
675 $ hg branch |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
676 default |
30549
9e29d4e4e08b
shelve: fix use of unexpected working dirs in test-shelve.t
Kostia Balytskyi <ikostia@fb.com>
parents:
30542
diff
changeset
|
677 $ cd .. |
28573
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
678 |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
679 On non bare shelve the branch information shouldn't be restored |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
680 |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
681 $ hg init bare_shelve_on_new_branch |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
682 $ cd bare_shelve_on_new_branch |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
683 $ echo "aaa" >> a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
684 $ hg commit -A -m "a" |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
685 adding a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
686 $ hg branch |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
687 default |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
688 $ hg branch test |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
689 marked working directory as branch test |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
690 (branches are permanent and global, did you want a bookmark?) |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
691 $ echo "bbb" >> a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
692 $ hg status |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
693 M a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
694 $ hg shelve a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
695 shelved as default |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
696 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
697 $ hg branch |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
698 test |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
699 $ hg branch default |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
700 marked working directory as branch default |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
701 (branches are permanent and global, did you want a bookmark?) |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
702 $ echo "bbb" >> b |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
703 $ hg status |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
704 ? b |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
705 $ hg unshelve |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
706 unshelving change 'default' |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
707 $ hg status |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
708 M a |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
709 ? b |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
710 $ hg branch |
6a42564081cb
shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents:
28571
diff
changeset
|
711 default |
29536
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
712 $ cd .. |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
713 |
30332
318a24b52eeb
spelling: fixes of non-dictionary words
Mads Kiilerich <madski@unity3d.com>
parents:
30152
diff
changeset
|
714 Prepare unshelve with a corrupted shelvedstate |
29536
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
715 $ hg init r1 && cd r1 |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
716 $ echo text1 > file && hg add file |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
717 $ hg shelve |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
718 shelved as default |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
719 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
720 $ echo text2 > file && hg ci -Am text1 |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
721 adding file |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
722 $ hg unshelve |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
723 unshelving change 'default' |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
724 rebasing shelved changes |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
725 merging file |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
726 warning: conflicts while merging file! (edit, then use 'hg resolve --mark') |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
727 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
45826
21733e8c924f
errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents:
45771
diff
changeset
|
728 [240] |
29536
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
729 $ echo somethingsomething > .hg/shelvedstate |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
730 |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
731 Unshelve --continue fails with appropriate message if shelvedstate is corrupted |
42614
117437f3f541
continue: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42600
diff
changeset
|
732 $ hg continue |
29536
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
733 abort: corrupted shelved state file |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
734 (please run hg unshelve --abort to abort unshelve operation) |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
735 [255] |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
736 |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
737 Unshelve --abort works with a corrupted shelvedstate |
42599
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
738 $ hg abort |
42598
8ddfdcce4bd6
unshelve: changed Corruptedstate error msg from ui.warn to error.Abort
Taapas Agrawal <taapas2897@gmail.com>
parents:
42579
diff
changeset
|
739 abort: could not read shelved state file, your working copy may be in an unexpected state |
29536
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
740 please update to some commit |
42598
8ddfdcce4bd6
unshelve: changed Corruptedstate error msg from ui.warn to error.Abort
Taapas Agrawal <taapas2897@gmail.com>
parents:
42579
diff
changeset
|
741 |
8ddfdcce4bd6
unshelve: changed Corruptedstate error msg from ui.warn to error.Abort
Taapas Agrawal <taapas2897@gmail.com>
parents:
42579
diff
changeset
|
742 [255] |
29536
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
743 |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
744 Unshelve --abort fails with appropriate message if there's no unshelve in |
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
745 progress |
42600
3bc400ccbf99
abort: added support for merge
Taapas Agrawal <taapas2897@gmail.com>
parents:
42599
diff
changeset
|
746 |
3bc400ccbf99
abort: added support for merge
Taapas Agrawal <taapas2897@gmail.com>
parents:
42599
diff
changeset
|
747 #if abortflag |
3bc400ccbf99
abort: added support for merge
Taapas Agrawal <taapas2897@gmail.com>
parents:
42599
diff
changeset
|
748 $ hg unshelve --abort |
3bc400ccbf99
abort: added support for merge
Taapas Agrawal <taapas2897@gmail.com>
parents:
42599
diff
changeset
|
749 abort: no unshelve in progress |
45840
527ce85c2e60
errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
45826
diff
changeset
|
750 [20] |
42600
3bc400ccbf99
abort: added support for merge
Taapas Agrawal <taapas2897@gmail.com>
parents:
42599
diff
changeset
|
751 #else |
42599
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
752 $ hg abort |
42600
3bc400ccbf99
abort: added support for merge
Taapas Agrawal <taapas2897@gmail.com>
parents:
42599
diff
changeset
|
753 aborting the merge, updating back to 9451eaa6eee3 |
3bc400ccbf99
abort: added support for merge
Taapas Agrawal <taapas2897@gmail.com>
parents:
42599
diff
changeset
|
754 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
3bc400ccbf99
abort: added support for merge
Taapas Agrawal <taapas2897@gmail.com>
parents:
42599
diff
changeset
|
755 #endif |
29536
b17a6e3cd2ac
shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents:
28941
diff
changeset
|
756 $ cd .. |
30522
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
757 |
46268
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
758 Test corrupt shelves (in .hg/shelved/, not .hg/shelvestate) |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
759 $ hg init corrupt-shelves |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
760 $ cd corrupt-shelves |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
761 $ mkdir .hg/shelved |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
762 |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
763 # A (corrupt) .patch file without a .hg file |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
764 $ touch .hg/shelved/junk1.patch |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
765 $ hg shelve -l |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
766 $ hg unshelve |
46288
61f8fc12e167
shelve: don't include invalid shelves in `hg shelve --list`
Martin von Zweigbergk <martinvonz@google.com>
parents:
46272
diff
changeset
|
767 abort: no shelved changes to apply! |
61f8fc12e167
shelve: don't include invalid shelves in `hg shelve --list`
Martin von Zweigbergk <martinvonz@google.com>
parents:
46272
diff
changeset
|
768 [20] |
46268
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
769 $ hg shelve -d junk1 |
46288
61f8fc12e167
shelve: don't include invalid shelves in `hg shelve --list`
Martin von Zweigbergk <martinvonz@google.com>
parents:
46272
diff
changeset
|
770 abort: shelved change 'junk1' not found |
61f8fc12e167
shelve: don't include invalid shelves in `hg shelve --list`
Martin von Zweigbergk <martinvonz@google.com>
parents:
46272
diff
changeset
|
771 [10] |
46268
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
772 $ find .hg/shelve* | sort |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
773 .hg/shelved |
46288
61f8fc12e167
shelve: don't include invalid shelves in `hg shelve --list`
Martin von Zweigbergk <martinvonz@google.com>
parents:
46272
diff
changeset
|
774 .hg/shelved/junk1.patch |
46268
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
775 |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
776 # A .hg file without a .patch file |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
777 $ touch .hg/shelved/junk2.hg |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
778 $ hg shelve -l |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
779 $ hg unshelve |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
780 abort: no shelved changes to apply! |
46272
a68d3386138c
shelve: raise more specific errors
Martin von Zweigbergk <martinvonz@google.com>
parents:
46271
diff
changeset
|
781 [20] |
46268
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
782 $ hg shelve -d junk2 |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
783 abort: shelved change 'junk2' not found |
46272
a68d3386138c
shelve: raise more specific errors
Martin von Zweigbergk <martinvonz@google.com>
parents:
46271
diff
changeset
|
784 [10] |
46268
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
785 $ find .hg/shelve* | sort |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
786 .hg/shelved |
46288
61f8fc12e167
shelve: don't include invalid shelves in `hg shelve --list`
Martin von Zweigbergk <martinvonz@google.com>
parents:
46272
diff
changeset
|
787 .hg/shelved/junk1.patch |
46270
161313f9c467
shelve: rewrite check for unknown shelf to delete
Martin von Zweigbergk <martinvonz@google.com>
parents:
46268
diff
changeset
|
788 .hg/shelved/junk2.hg |
46268
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
789 |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
790 # A file with an unexpected extension |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
791 $ touch .hg/shelved/junk3 |
46289
c062874a35db
shelve: don't crash on file with unexpected extension in .hg/shelved/
Martin von Zweigbergk <martinvonz@google.com>
parents:
46288
diff
changeset
|
792 $ hg shelve -l |
c062874a35db
shelve: don't crash on file with unexpected extension in .hg/shelved/
Martin von Zweigbergk <martinvonz@google.com>
parents:
46288
diff
changeset
|
793 $ hg unshelve |
c062874a35db
shelve: don't crash on file with unexpected extension in .hg/shelved/
Martin von Zweigbergk <martinvonz@google.com>
parents:
46288
diff
changeset
|
794 abort: no shelved changes to apply! |
c062874a35db
shelve: don't crash on file with unexpected extension in .hg/shelved/
Martin von Zweigbergk <martinvonz@google.com>
parents:
46288
diff
changeset
|
795 [20] |
46268
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
796 $ hg shelve -d junk3 |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
797 abort: shelved change 'junk3' not found |
46272
a68d3386138c
shelve: raise more specific errors
Martin von Zweigbergk <martinvonz@google.com>
parents:
46271
diff
changeset
|
798 [10] |
46268
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
799 $ find .hg/shelve* | sort |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
800 .hg/shelved |
46288
61f8fc12e167
shelve: don't include invalid shelves in `hg shelve --list`
Martin von Zweigbergk <martinvonz@google.com>
parents:
46272
diff
changeset
|
801 .hg/shelved/junk1.patch |
46270
161313f9c467
shelve: rewrite check for unknown shelf to delete
Martin von Zweigbergk <martinvonz@google.com>
parents:
46268
diff
changeset
|
802 .hg/shelved/junk2.hg |
46268
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
803 .hg/shelved/junk3 |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
804 |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
805 $ cd .. |
832a6a2efe4f
tests: add tests for corrupt .hg/shelved/ directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
806 |
30522
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
807 Unshelve respects --keep even if user intervention is needed |
30549
9e29d4e4e08b
shelve: fix use of unexpected working dirs in test-shelve.t
Kostia Balytskyi <ikostia@fb.com>
parents:
30542
diff
changeset
|
808 $ hg init unshelvekeep && cd unshelvekeep |
30522
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
809 $ echo 1 > file && hg ci -Am 1 |
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
810 adding file |
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
811 $ echo 2 >> file |
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
812 $ hg shelve |
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
813 shelved as default |
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
814 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
815 $ echo 3 >> file && hg ci -Am 13 |
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
816 $ hg shelve --list |
36001
9f454a717c43
tests: allow age to go up to triple digits in test-shelve.t
Anton Shestakov <av6@dwimlabs.net>
parents:
35393
diff
changeset
|
817 default (*s ago) * changes to: 1 (glob) |
30522
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
818 $ hg unshelve --keep |
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
819 unshelving change 'default' |
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
820 rebasing shelved changes |
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
821 merging file |
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
822 warning: conflicts while merging file! (edit, then use 'hg resolve --mark') |
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
823 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
45826
21733e8c924f
errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents:
45771
diff
changeset
|
824 [240] |
30522
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
825 $ hg resolve --mark file |
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
826 (no more unresolved files) |
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
827 continue: hg unshelve --continue |
42614
117437f3f541
continue: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42600
diff
changeset
|
828 $ hg continue |
30522
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
829 unshelve of 'default' complete |
7b3136bc7bfd
shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents:
30460
diff
changeset
|
830 $ hg shelve --list |
36001
9f454a717c43
tests: allow age to go up to triple digits in test-shelve.t
Anton Shestakov <av6@dwimlabs.net>
parents:
35393
diff
changeset
|
831 default (*s ago) * changes to: 1 (glob) |
30549
9e29d4e4e08b
shelve: fix use of unexpected working dirs in test-shelve.t
Kostia Balytskyi <ikostia@fb.com>
parents:
30542
diff
changeset
|
832 $ cd .. |
30846
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
833 |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
834 Unshelving when there are deleted files does not crash (issue4176) |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
835 $ hg init unshelve-deleted-file && cd unshelve-deleted-file |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
836 $ echo a > a && echo b > b && hg ci -Am ab |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
837 adding a |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
838 adding b |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
839 $ echo aa > a && hg shelve |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
840 shelved as default |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
841 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
842 $ rm b |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
843 $ hg st |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
844 ! b |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
845 $ hg unshelve |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
846 unshelving change 'default' |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
847 $ hg shelve |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
848 shelved as default |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
849 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
850 $ rm a && echo b > b |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
851 $ hg st |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
852 ! a |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
853 $ hg unshelve |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
854 unshelving change 'default' |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
855 abort: shelved change touches missing files |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
856 (run hg status to see which files are missing) |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
857 [255] |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
858 $ hg st |
dfc6663f97ca
shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents:
30823
diff
changeset
|
859 ! a |
32285
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
860 $ cd .. |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
861 |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
862 New versions of Mercurial know how to read onld shelvedstate files |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
863 $ hg init oldshelvedstate |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
864 $ cd oldshelvedstate |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
865 $ echo root > root && hg ci -Am root |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
866 adding root |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
867 $ echo 1 > a |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
868 $ hg add a |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
869 $ hg shelve --name ashelve |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
870 shelved as ashelve |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
871 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
872 $ echo 2 > a |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
873 $ hg ci -Am a |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
874 adding a |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
875 $ hg unshelve |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
876 unshelving change 'ashelve' |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
877 rebasing shelved changes |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
878 merging a |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
879 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
880 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
45826
21733e8c924f
errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents:
45771
diff
changeset
|
881 [240] |
32285
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
882 putting v1 shelvedstate file in place of a created v2 |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
883 $ cat << EOF > .hg/shelvedstate |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
884 > 1 |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
885 > ashelve |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
886 > 8b058dae057a5a78f393f4535d9e363dd5efac9d |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
887 > 8b058dae057a5a78f393f4535d9e363dd5efac9d |
39376
5f8282f368b2
shelve: add an "internal" extra
Boris Feld <boris.feld@octobus.net>
parents:
39372
diff
changeset
|
888 > 8b058dae057a5a78f393f4535d9e363dd5efac9d f543b27db2cdb41737e2e0008dc524c471da1446 |
5f8282f368b2
shelve: add an "internal" extra
Boris Feld <boris.feld@octobus.net>
parents:
39372
diff
changeset
|
889 > f543b27db2cdb41737e2e0008dc524c471da1446 |
32285
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
890 > |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
891 > nokeep |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
892 > :no-active-bookmark |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
893 > EOF |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
894 $ echo 1 > a |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
895 $ hg resolve --mark a |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
896 (no more unresolved files) |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
897 continue: hg unshelve --continue |
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
898 mercurial does not crash |
42614
117437f3f541
continue: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42600
diff
changeset
|
899 $ hg continue |
32285
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
900 unshelve of 'ashelve' complete |
39387
da84cca65036
shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents:
39376
diff
changeset
|
901 |
39744
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
902 #if phasebased |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
903 |
39889
d9ba836fc234
shelve: find shelvedctx from bundle even if they are already in the repo
Boris Feld <boris.feld@octobus.net>
parents:
39761
diff
changeset
|
904 Unshelve with some metadata file missing |
d9ba836fc234
shelve: find shelvedctx from bundle even if they are already in the repo
Boris Feld <boris.feld@octobus.net>
parents:
39761
diff
changeset
|
905 ---------------------------------------- |
39387
da84cca65036
shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents:
39376
diff
changeset
|
906 |
da84cca65036
shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents:
39376
diff
changeset
|
907 $ hg shelve |
da84cca65036
shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents:
39376
diff
changeset
|
908 shelved as default |
da84cca65036
shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents:
39376
diff
changeset
|
909 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
39889
d9ba836fc234
shelve: find shelvedctx from bundle even if they are already in the repo
Boris Feld <boris.feld@octobus.net>
parents:
39761
diff
changeset
|
910 $ echo 3 > a |
d9ba836fc234
shelve: find shelvedctx from bundle even if they are already in the repo
Boris Feld <boris.feld@octobus.net>
parents:
39761
diff
changeset
|
911 |
d9ba836fc234
shelve: find shelvedctx from bundle even if they are already in the repo
Boris Feld <boris.feld@octobus.net>
parents:
39761
diff
changeset
|
912 Test with the `.shelve` missing, but the changeset still in the repo (non-natural case) |
d9ba836fc234
shelve: find shelvedctx from bundle even if they are already in the repo
Boris Feld <boris.feld@octobus.net>
parents:
39761
diff
changeset
|
913 |
d9ba836fc234
shelve: find shelvedctx from bundle even if they are already in the repo
Boris Feld <boris.feld@octobus.net>
parents:
39761
diff
changeset
|
914 $ rm .hg/shelved/default.shelve |
d9ba836fc234
shelve: find shelvedctx from bundle even if they are already in the repo
Boris Feld <boris.feld@octobus.net>
parents:
39761
diff
changeset
|
915 $ hg unshelve |
d9ba836fc234
shelve: find shelvedctx from bundle even if they are already in the repo
Boris Feld <boris.feld@octobus.net>
parents:
39761
diff
changeset
|
916 unshelving change 'default' |
d9ba836fc234
shelve: find shelvedctx from bundle even if they are already in the repo
Boris Feld <boris.feld@octobus.net>
parents:
39761
diff
changeset
|
917 temporarily committing pending changes (restore with 'hg unshelve --abort') |
d9ba836fc234
shelve: find shelvedctx from bundle even if they are already in the repo
Boris Feld <boris.feld@octobus.net>
parents:
39761
diff
changeset
|
918 rebasing shelved changes |
d9ba836fc234
shelve: find shelvedctx from bundle even if they are already in the repo
Boris Feld <boris.feld@octobus.net>
parents:
39761
diff
changeset
|
919 merging a |
d9ba836fc234
shelve: find shelvedctx from bundle even if they are already in the repo
Boris Feld <boris.feld@octobus.net>
parents:
39761
diff
changeset
|
920 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
d9ba836fc234
shelve: find shelvedctx from bundle even if they are already in the repo
Boris Feld <boris.feld@octobus.net>
parents:
39761
diff
changeset
|
921 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
45826
21733e8c924f
errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents:
45771
diff
changeset
|
922 [240] |
42599
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
923 $ hg abort |
39889
d9ba836fc234
shelve: find shelvedctx from bundle even if they are already in the repo
Boris Feld <boris.feld@octobus.net>
parents:
39761
diff
changeset
|
924 unshelve of 'default' aborted |
d9ba836fc234
shelve: find shelvedctx from bundle even if they are already in the repo
Boris Feld <boris.feld@octobus.net>
parents:
39761
diff
changeset
|
925 |
d9ba836fc234
shelve: find shelvedctx from bundle even if they are already in the repo
Boris Feld <boris.feld@octobus.net>
parents:
39761
diff
changeset
|
926 Unshelve without .shelve metadata (can happen when upgrading a repository with old shelve) |
d9ba836fc234
shelve: find shelvedctx from bundle even if they are already in the repo
Boris Feld <boris.feld@octobus.net>
parents:
39761
diff
changeset
|
927 |
39744
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
928 $ cat .hg/shelved/default.shelve |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
929 node=82e0cb9893247d12667017593ce1e5655860f1ac |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
930 $ hg strip --hidden --rev 82e0cb989324 --no-backup |
39387
da84cca65036
shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents:
39376
diff
changeset
|
931 $ rm .hg/shelved/default.shelve |
da84cca65036
shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents:
39376
diff
changeset
|
932 $ hg unshelve |
da84cca65036
shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents:
39376
diff
changeset
|
933 unshelving change 'default' |
da84cca65036
shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents:
39376
diff
changeset
|
934 temporarily committing pending changes (restore with 'hg unshelve --abort') |
da84cca65036
shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents:
39376
diff
changeset
|
935 rebasing shelved changes |
da84cca65036
shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents:
39376
diff
changeset
|
936 merging a |
da84cca65036
shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents:
39376
diff
changeset
|
937 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
da84cca65036
shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents:
39376
diff
changeset
|
938 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
45826
21733e8c924f
errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents:
45771
diff
changeset
|
939 [240] |
39387
da84cca65036
shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents:
39376
diff
changeset
|
940 $ cat .hg/shelved/default.shelve |
da84cca65036
shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents:
39376
diff
changeset
|
941 node=82e0cb9893247d12667017593ce1e5655860f1ac |
42599
3fb0493812c0
abort: added support for unshelve
Taapas Agrawal <taapas2897@gmail.com>
parents:
42598
diff
changeset
|
942 $ hg abort |
39889
d9ba836fc234
shelve: find shelvedctx from bundle even if they are already in the repo
Boris Feld <boris.feld@octobus.net>
parents:
39761
diff
changeset
|
943 unshelve of 'default' aborted |
39387
da84cca65036
shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents:
39376
diff
changeset
|
944 |
39744
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
945 #endif |
52dfa1eb0ad4
shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents:
39519
diff
changeset
|
946 |
32285
fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents:
31228
diff
changeset
|
947 $ cd .. |
42579
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
948 |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
949 Block merge abort when unshelve in progress(issue6160) |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
950 ------------------------------------------------------ |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
951 |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
952 $ hg init a |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
953 $ cd a |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
954 $ echo foo > a ; hg commit -qAm "initial commit" |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
955 $ echo bar > a |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
956 $ hg shelve |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
957 shelved as default |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
958 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
959 $ echo foobar > a |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
960 $ hg unshelve |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
961 unshelving change 'default' |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
962 temporarily committing pending changes (restore with 'hg unshelve --abort') |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
963 rebasing shelved changes |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
964 merging a |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
965 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
966 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
45826
21733e8c924f
errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents:
45771
diff
changeset
|
967 [240] |
42579
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
968 |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
969 $ hg log --template '{desc|firstline} {author} {date|isodate} \n' -r . |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
970 pending changes temporary commit shelve@localhost 1970-01-01 00:00 +0000 |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
971 $ hg merge --abort |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
972 abort: cannot abort merge with unshelve in progress |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
973 (use 'hg unshelve --continue' or 'hg unshelve --abort') |
45840
527ce85c2e60
errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
45826
diff
changeset
|
974 [20] |
42579
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
975 |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
976 $ hg unshelve --abort |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
977 unshelve of 'default' aborted |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
978 |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
979 $ hg log -G --template '{desc|firstline} {author} {date|isodate} \n' -r . |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
980 @ initial commit test 1970-01-01 00:00 +0000 |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
981 |
b8d54f4625cb
merge: disallow merge abort in case of an unfinished operation (issue6160)
Taapas Agrawal <taapas2897@gmail.com>
parents:
42541
diff
changeset
|
982 $ cd .. |
44331
2527c10a2569
shelve: add test clearly demonstrating that the conflict labels are backwards
Kyle Lippincott <spectral@google.com>
parents:
42893
diff
changeset
|
983 |
2527c10a2569
shelve: add test clearly demonstrating that the conflict labels are backwards
Kyle Lippincott <spectral@google.com>
parents:
42893
diff
changeset
|
984 Demonstrate that the labels are correct in the merge conflict |
2527c10a2569
shelve: add test clearly demonstrating that the conflict labels are backwards
Kyle Lippincott <spectral@google.com>
parents:
42893
diff
changeset
|
985 ------------------------------------------------------------- |
2527c10a2569
shelve: add test clearly demonstrating that the conflict labels are backwards
Kyle Lippincott <spectral@google.com>
parents:
42893
diff
changeset
|
986 $ hg init labels |
2527c10a2569
shelve: add test clearly demonstrating that the conflict labels are backwards
Kyle Lippincott <spectral@google.com>
parents:
42893
diff
changeset
|
987 $ cd labels |
2527c10a2569
shelve: add test clearly demonstrating that the conflict labels are backwards
Kyle Lippincott <spectral@google.com>
parents:
42893
diff
changeset
|
988 $ echo r0 > foo |
2527c10a2569
shelve: add test clearly demonstrating that the conflict labels are backwards
Kyle Lippincott <spectral@google.com>
parents:
42893
diff
changeset
|
989 $ hg ci -qAm r0 |
2527c10a2569
shelve: add test clearly demonstrating that the conflict labels are backwards
Kyle Lippincott <spectral@google.com>
parents:
42893
diff
changeset
|
990 $ echo "this will be shelved" >> foo |
2527c10a2569
shelve: add test clearly demonstrating that the conflict labels are backwards
Kyle Lippincott <spectral@google.com>
parents:
42893
diff
changeset
|
991 $ hg shelve -q |
2527c10a2569
shelve: add test clearly demonstrating that the conflict labels are backwards
Kyle Lippincott <spectral@google.com>
parents:
42893
diff
changeset
|
992 $ echo "this is in wdir, conflicts with shelve" >> foo |
2527c10a2569
shelve: add test clearly demonstrating that the conflict labels are backwards
Kyle Lippincott <spectral@google.com>
parents:
42893
diff
changeset
|
993 $ hg unshelve -q |
2527c10a2569
shelve: add test clearly demonstrating that the conflict labels are backwards
Kyle Lippincott <spectral@google.com>
parents:
42893
diff
changeset
|
994 warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') |
2527c10a2569
shelve: add test clearly demonstrating that the conflict labels are backwards
Kyle Lippincott <spectral@google.com>
parents:
42893
diff
changeset
|
995 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
45826
21733e8c924f
errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents:
45771
diff
changeset
|
996 [240] |
44331
2527c10a2569
shelve: add test clearly demonstrating that the conflict labels are backwards
Kyle Lippincott <spectral@google.com>
parents:
42893
diff
changeset
|
997 $ cat foo |
2527c10a2569
shelve: add test clearly demonstrating that the conflict labels are backwards
Kyle Lippincott <spectral@google.com>
parents:
42893
diff
changeset
|
998 r0 |
48592
bcc4820242cf
shelve: attempt to make merge labels more helpful
Martin von Zweigbergk <martinvonz@google.com>
parents:
46289
diff
changeset
|
999 <<<<<<< working-copy: 0b2fcf2a90e9 - shelve: pending changes temporary commit |
44331
2527c10a2569
shelve: add test clearly demonstrating that the conflict labels are backwards
Kyle Lippincott <spectral@google.com>
parents:
42893
diff
changeset
|
1000 this is in wdir, conflicts with shelve |
2527c10a2569
shelve: add test clearly demonstrating that the conflict labels are backwards
Kyle Lippincott <spectral@google.com>
parents:
42893
diff
changeset
|
1001 ======= |
2527c10a2569
shelve: add test clearly demonstrating that the conflict labels are backwards
Kyle Lippincott <spectral@google.com>
parents:
42893
diff
changeset
|
1002 this will be shelved |
48592
bcc4820242cf
shelve: attempt to make merge labels more helpful
Martin von Zweigbergk <martinvonz@google.com>
parents:
46289
diff
changeset
|
1003 >>>>>>> shelved change: 9c072a2163db - shelve: changes to: r0 |
44331
2527c10a2569
shelve: add test clearly demonstrating that the conflict labels are backwards
Kyle Lippincott <spectral@google.com>
parents:
42893
diff
changeset
|
1004 $ cd .. |