annotate tests/test-uncommit.t @ 313:47d10459fa24

uncommit: handle bookmarks Extract the bookmarks handling code from amend and share it with uncommit.
author Patrick Mezard <patrick@mezard.eu>
date Tue, 26 Jun 2012 16:12:52 +0200
parents a7b5989d1d92
children ebd286f06879
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
312
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
1 $ cat >> $HGRCPATH <<EOF
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
2 > [extensions]
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
3 > hgext.rebase=
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
4 > hgext.graphlog=
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
5 > EOF
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
6 $ echo "obsolete=$(echo $(dirname $TESTDIR))/hgext/obsolete.py" >> $HGRCPATH
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
7 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
8
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
9 $ glog() {
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
10 > hg glog --template '{rev}:{node|short}@{branch}({obsolete}/{phase}) {desc|firstline}\n' "$@"
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
11 > }
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
12
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
13 $ hg init repo
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
14 $ cd repo
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
15
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
16 Cannot uncommit null changeset
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
17
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
18 $ hg uncommit
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
19 abort: cannot rewrite immutable changeset
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
20 [255]
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
21
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
22 Cannot uncommit public changeset
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
23
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
24 $ echo a > a
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
25 $ hg ci -Am adda a
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
26 $ hg phase --public .
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
27 $ hg uncommit
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
28 abort: cannot rewrite immutable changeset
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
29 [255]
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
30 $ hg phase --force --draft .
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
31
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
32 Cannot uncommit merge
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
33
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
34 $ hg up -q null
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
35 $ echo b > b
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
36 $ echo c > c
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
37 $ echo d > d
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
38 $ echo f > f
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
39 $ echo g > g
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
40 $ echo j > j
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
41 $ echo m > m
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
42 $ echo n > n
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
43 $ echo o > o
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
44 $ hg ci -Am addmore
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
45 adding b
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
46 adding c
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
47 adding d
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
48 adding f
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
49 adding g
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
50 adding j
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
51 adding m
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
52 adding n
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
53 adding o
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
54 created new head
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
55 $ hg merge
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
56 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
57 (branch merge, don't forget to commit)
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
58 $ hg uncommit
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
59 abort: cannot uncommit while merging
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
60 [255]
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
61 $ hg ci -m merge
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
62 $ hg uncommit
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
63 abort: cannot uncommit merge changeset
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
64 [255]
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
65
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
66 Prepare complicated changeset
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
67
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
68 $ hg branch bar
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
69 marked working directory as branch bar
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
70 (branches are permanent and global, did you want a bookmark?)
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
71 $ hg cp a aa
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
72 $ echo b >> b
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
73 $ hg rm c
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
74 $ echo d >> d
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
75 $ echo e > e
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
76 $ hg mv f ff
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
77 $ hg mv g h
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
78 $ echo j >> j
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
79 $ echo k > k
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
80 $ echo l > l
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
81 $ hg rm m
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
82 $ hg rm n
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
83 $ echo o >> o
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
84 $ hg ci -Am touncommit
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
85 adding e
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
86 adding k
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
87 adding l
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
88 $ hg st --copies --change .
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
89 M b
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
90 M d
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
91 M j
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
92 M o
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
93 A aa
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
94 a
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
95 A e
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
96 A ff
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
97 f
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
98 A h
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
99 g
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
100 A k
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
101 A l
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
102 R c
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
103 R f
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
104 R g
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
105 R m
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
106 R n
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
107 $ hg man -r .
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
108 a
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
109 aa
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
110 b
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
111 d
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
112 e
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
113 ff
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
114 h
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
115 j
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
116 k
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
117 l
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
118 o
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
119
313
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
120 Add a couple of bookmarks
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
121
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
122 $ glog --hidden
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
123 @ 3:5eb72dbe0cb4@bar(stable/draft) touncommit
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
124 |
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
125 o 2:f63b90038565@default(stable/draft) merge
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
126 |\
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
127 | o 1:f15c744d48e8@default(stable/draft) addmore
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
128 |
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
129 o 0:07f494440405@default(stable/draft) adda
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
130
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
131 $ hg bookmark -r 2 unrelated
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
132 $ hg bookmark touncommit-bm
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
133 $ hg bookmark --inactive touncommit-bm-inactive
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
134 $ hg bookmarks
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
135 * touncommit-bm 3:5eb72dbe0cb4
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
136 touncommit-bm-inactive 3:5eb72dbe0cb4
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
137 unrelated 2:f63b90038565
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
138
312
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
139 Prepare complicated working directory
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
140
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
141 $ hg branch foo
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
142 marked working directory as branch foo
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
143 (branches are permanent and global, did you want a bookmark?)
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
144 $ hg mv ff f
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
145 $ hg mv h i
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
146 $ hg rm j
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
147 $ hg rm k
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
148 $ echo l >> l
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
149 $ echo m > m
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
150 $ echo o > o
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
151
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
152 Test uncommit without argument, should be a no-op
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
153
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
154 $ hg uncommit
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
155 abort: nothing to uncommit
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
156 [255]
313
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
157 $ hg bookmarks
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
158 * touncommit-bm 3:5eb72dbe0cb4
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
159 touncommit-bm-inactive 3:5eb72dbe0cb4
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
160 unrelated 2:f63b90038565
312
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
161
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
162 Test no matches
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
163
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
164 $ hg uncommit --include nothere
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
165 abort: nothing to uncommit
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
166 [255]
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
167
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
168 Enjoy uncommit
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
169
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
170 $ hg uncommit aa b c f ff g h j k l m o
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
171 $ hg branch
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
172 foo
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
173 $ hg st --copies
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
174 M b
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
175 A aa
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
176 a
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
177 A i
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
178 g
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
179 A l
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
180 R c
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
181 R g
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
182 R j
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
183 R m
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
184 $ cat aa
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
185 a
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
186 $ cat b
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
187 b
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
188 b
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
189 $ cat l
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
190 l
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
191 l
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
192 $ cat m
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
193 m
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
194 $ test -f c && echo 'error: c was removed!'
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
195 [1]
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
196 $ test -f j && echo 'error: j was removed!'
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
197 [1]
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
198 $ test -f k && echo 'error: k was removed!'
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
199 [1]
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
200 $ hg st --copies --change .
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
201 M d
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
202 A e
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
203 R n
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
204 $ hg man -r .
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
205 a
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
206 b
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
207 c
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
208 d
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
209 e
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
210 f
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
211 g
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
212 j
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
213 m
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
214 o
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
215 $ hg cat -r . d
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
216 d
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
217 d
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
218 $ hg cat -r . e
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
219 e
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
220 $ glog --hidden
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
221 @ 4:e8db4aa611f6@bar(stable/draft) touncommit
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
222 |
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
223 | o 3:5eb72dbe0cb4@bar(extinct/secret) touncommit
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
224 |/
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
225 o 2:f63b90038565@default(stable/draft) merge
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
226 |\
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
227 | o 1:f15c744d48e8@default(stable/draft) addmore
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
228 |
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
229 o 0:07f494440405@default(stable/draft) adda
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
230
313
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
231 $ hg bookmarks
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
232 * touncommit-bm 4:e8db4aa611f6
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
233 touncommit-bm-inactive 4:e8db4aa611f6
47d10459fa24 uncommit: handle bookmarks
Patrick Mezard <patrick@mezard.eu>
parents: 312
diff changeset
234 unrelated 2:f63b90038565
312
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
235 $ hg debugsuccessors
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
236 5eb72dbe0cb4 e8db4aa611f6
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
237
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
238 Test phase is preserved, no local changes
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
239
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
240 $ hg up -C 3
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
241 8 files updated, 0 files merged, 1 files removed, 0 files unresolved
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
242 Working directory parent is obsolete
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
243 $ hg --config extensions.purge= purge
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
244 $ hg uncommit -I 'set:added() and e'
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
245 $ hg st --copies
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
246 A e
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
247 $ hg st --copies --change .
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
248 M b
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
249 M d
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
250 M j
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
251 M o
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
252 A aa
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
253 A ff
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
254 f
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
255 A h
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
256 g
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
257 A k
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
258 A l
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
259 R c
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
260 R f
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
261 R g
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
262 R m
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
263 R n
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
264 $ glog --hidden
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
265 @ 5:c706fe2c12f8@bar(stable/secret) touncommit
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
266 |
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
267 | o 4:e8db4aa611f6@bar(stable/draft) touncommit
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
268 |/
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
269 | o 3:5eb72dbe0cb4@bar(extinct/secret) touncommit
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
270 |/
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
271 o 2:f63b90038565@default(stable/draft) merge
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
272 |\
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
273 | o 1:f15c744d48e8@default(stable/draft) addmore
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
274 |
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
275 o 0:07f494440405@default(stable/draft) adda
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
276
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
277 $ hg debugsuccessors
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
278 5eb72dbe0cb4 c706fe2c12f8
a7b5989d1d92 evolve: add uncommit command
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
279 5eb72dbe0cb4 e8db4aa611f6