Mercurial > evolve
comparison tests/test-stabilize-result.t @ 3453:32ed5b6fadd3
grab: add a command to grab a commit and update to it
This patch adds anew command `hg grab` which will pick a commit and put it on
the top of the working directory parent and updates to it.
Earlier grab was an alias for `hg rebase -r <rev> -d .` which is now deleted to
make sure `hg grab` resolves to the grab command and that alias.
Continuing interrupted grab functionality is also there using the evolvestate
class.
Tests are also added for the new introduced command.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 11 Jan 2018 20:03:20 +0530 |
parents | f57be161f34b |
children | 05bd493d496d |
comparison
equal
deleted
inserted
replaced
3449:4a1dc4854648 | 3453:32ed5b6fadd3 |
---|---|
125 created new head | 125 created new head |
126 | 126 |
127 Get a successors of 8 on it | 127 Get a successors of 8 on it |
128 | 128 |
129 $ hg grab 1cf0aacfd363 | 129 $ hg grab 1cf0aacfd363 |
130 rebasing 6:1cf0aacfd363 "newer a" | 130 grabbing 6:1cf0aacfd363 "newer a" |
131 ? files updated, 0 files merged, 0 files removed, 0 files unresolved (glob) | |
132 | 131 |
133 Add real change to the successors | 132 Add real change to the successors |
134 | 133 |
135 $ echo 'babar' >> a | 134 $ echo 'babar' >> a |
136 $ hg amend | 135 $ hg amend |
138 Make precursors public | 137 Make precursors public |
139 | 138 |
140 $ hg phase --hidden --public 1cf0aacfd363 | 139 $ hg phase --hidden --public 1cf0aacfd363 |
141 1 new phase-divergent changesets | 140 1 new phase-divergent changesets |
142 $ glog | 141 $ glog |
143 @ 9:(73b15c7566e9|d5c7ef82d003)@default\(draft\) bk:\[\] newer a (re) | 142 @ 9:99c21c89bcef@default(draft) bk:[] newer a |
144 | | 143 | |
145 o 7:7bc2f5967f5e@default(draft) bk:[] add c | 144 o 7:7bc2f5967f5e@default(draft) bk:[] add c |
146 | | 145 | |
147 | o 6:1cf0aacfd363@default(public) bk:[] newer a | 146 | o 6:1cf0aacfd363@default(public) bk:[] newer a |
148 |/ | 147 |/ |
154 Stabilize! | 153 Stabilize! |
155 | 154 |
156 $ hg evolve --any --dry-run --phase-divergent | 155 $ hg evolve --any --dry-run --phase-divergent |
157 recreate:[9] newer a | 156 recreate:[9] newer a |
158 atop:[6] newer a | 157 atop:[6] newer a |
159 hg rebase --rev d5c7ef82d003 --dest 66719795a494; | 158 hg rebase --rev 99c21c89bcef --dest 66719795a494; |
160 hg update 1cf0aacfd363; | 159 hg update 1cf0aacfd363; |
161 hg revert --all --rev d5c7ef82d003; | 160 hg revert --all --rev 99c21c89bcef; |
162 hg commit --msg "phase-divergent update to d5c7ef82d003" | 161 hg commit --msg "phase-divergent update to 99c21c89bcef" |
163 $ hg evolve --any --confirm --phase-divergent | 162 $ hg evolve --any --confirm --phase-divergent |
164 recreate:[9] newer a | 163 recreate:[9] newer a |
165 atop:[6] newer a | 164 atop:[6] newer a |
166 perform evolve? [Ny] n | 165 perform evolve? [Ny] n |
167 abort: evolve aborted by user | 166 abort: evolve aborted by user |
170 recreate:[9] newer a | 169 recreate:[9] newer a |
171 atop:[6] newer a | 170 atop:[6] newer a |
172 perform evolve? [Ny] y | 171 perform evolve? [Ny] y |
173 rebasing to destination parent: 66719795a494 | 172 rebasing to destination parent: 66719795a494 |
174 computing new diff | 173 computing new diff |
175 committed as 8c986e77913c | 174 committed as 3d968e0b3097 |
176 working directory is now at 8c986e77913c | 175 working directory is now at 3d968e0b3097 |
177 $ glog | 176 $ glog |
178 @ 11:8c986e77913c@default(draft) bk:[] phase-divergent update to 1cf0aacfd363: | 177 @ 11:3d968e0b3097@default(draft) bk:[] phase-divergent update to 1cf0aacfd363: |
179 | | 178 | |
180 | o 7:7bc2f5967f5e@default(draft) bk:[] add c | 179 | o 7:7bc2f5967f5e@default(draft) bk:[] add c |
181 | | | 180 | | |
182 o | 6:1cf0aacfd363@default(public) bk:[] newer a | 181 o | 6:1cf0aacfd363@default(public) bk:[] newer a |
183 |/ | 182 |/ |
202 > EOF | 201 > EOF |
203 $ hg ci -m 'More addition' | 202 $ hg ci -m 'More addition' |
204 $ glog | 203 $ glog |
205 @ 12:3932c176bbaa@default(draft) bk:[] More addition | 204 @ 12:3932c176bbaa@default(draft) bk:[] More addition |
206 | | 205 | |
207 | o 11:8c986e77913c@default(draft) bk:[] phase-divergent update to 1cf0aacfd363: | 206 | o 11:3d968e0b3097@default(draft) bk:[] phase-divergent update to 1cf0aacfd363: |
208 | | | 207 | | |
209 o | 7:7bc2f5967f5e@default(draft) bk:[] add c | 208 o | 7:7bc2f5967f5e@default(draft) bk:[] add c |
210 | | | 209 | | |
211 | o 6:1cf0aacfd363@default(public) bk:[] newer a | 210 | o 6:1cf0aacfd363@default(public) bk:[] newer a |
212 |/ | 211 |/ |
231 $ glog | 230 $ glog |
232 @ 14:eacc9c8240fe@default(draft) bk:[] More addition | 231 @ 14:eacc9c8240fe@default(draft) bk:[] More addition |
233 | | 232 | |
234 | * 13:d2f173e25686@default(draft) bk:[] More addition | 233 | * 13:d2f173e25686@default(draft) bk:[] More addition |
235 |/ | 234 |/ |
236 | o 11:8c986e77913c@default(draft) bk:[] phase-divergent update to 1cf0aacfd363: | 235 | o 11:3d968e0b3097@default(draft) bk:[] phase-divergent update to 1cf0aacfd363: |
237 | | | 236 | | |
238 o | 7:7bc2f5967f5e@default(draft) bk:[] add c | 237 o | 7:7bc2f5967f5e@default(draft) bk:[] add c |
239 | | | 238 | | |
240 | o 6:1cf0aacfd363@default(public) bk:[] newer a | 239 | o 6:1cf0aacfd363@default(public) bk:[] newer a |
241 |/ | 240 |/ |
281 working directory is now at f344982e63c4 | 280 working directory is now at f344982e63c4 |
282 $ hg st | 281 $ hg st |
283 $ glog | 282 $ glog |
284 @ 15:f344982e63c4@default(draft) bk:[] More addition | 283 @ 15:f344982e63c4@default(draft) bk:[] More addition |
285 | | 284 | |
286 | o 11:8c986e77913c@default(draft) bk:[] phase-divergent update to 1cf0aacfd363: | 285 | o 11:3d968e0b3097@default(draft) bk:[] phase-divergent update to 1cf0aacfd363: |
287 | | | 286 | | |
288 o | 7:7bc2f5967f5e@default(draft) bk:[] add c | 287 o | 7:7bc2f5967f5e@default(draft) bk:[] add c |
289 | | | 288 | | |
290 | o 6:1cf0aacfd363@default(public) bk:[] newer a | 289 | o 6:1cf0aacfd363@default(public) bk:[] newer a |
291 |/ | 290 |/ |