comparison tests/test-split.t @ 2786:ae690d39fc92

split: use precheck to validate revision This gives us standard check and standard error message.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 23 Jul 2017 20:33:19 +0200
parents 4dd84054ebbb
children 49494d0155b7 66796d7b5415
comparison
equal deleted inserted replaced
2785:b5a48e4aeec6 2786:ae690d39fc92
129 1 files updated, 0 files merged, 1 files removed, 0 files unresolved 129 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
130 $ echo "_cd" > _c 130 $ echo "_cd" > _c
131 $ hg split 131 $ hg split
132 abort: uncommitted changes 132 abort: uncommitted changes
133 [255] 133 [255]
134
135 Split a revision specified with -r
136 $ hg up "desc(_c)" -C 134 $ hg up "desc(_c)" -C
137 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 135 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
136
137 Cannot split public changeset
138
139 $ hg phase --rev 'desc("_a")'
140 0: draft
141 $ hg phase --rev 'desc("_a")' --public
142 $ hg split --rev 'desc("_a")'
143 abort: cannot split public changesets: 135f39f4bd78
144 (see 'hg help phases' for details)
145 [255]
146 $ hg phase --rev 'desc("_a")' --draft --force
147
148 Split a revision specified with -r
138 $ echo "change to b" >> _b 149 $ echo "change to b" >> _b
139 $ hg amend -m "_cprim" 150 $ hg amend -m "_cprim"
140 2 new unstable changesets 151 2 new unstable changesets
141 $ hg evolve --all 152 $ hg evolve --all
142 move:[6] split1 153 move:[6] split1
336 > [experimental] 347 > [experimental]
337 > evolution=createmarkers 348 > evolution=createmarkers
338 > evolutioncommands=split 349 > evolutioncommands=split
339 > EOF 350 > EOF
340 $ hg split -r "desc(split3)" 351 $ hg split -r "desc(split3)"
341 abort: cannot split commit: ead2066d1dbf not a head 352 abort: split will orphan 4 descendants
353 (see 'hg help evolution.instability')
342 [255] 354 [255]
343 355
344 Changing evolution level to createmarkers 356 Changing evolution level to createmarkers
345 $ echo "[experimental]" >> $HGRCPATH 357 $ echo "[experimental]" >> $HGRCPATH
346 $ echo "evolution=createmarkers" >> $HGRCPATH 358 $ echo "evolution=createmarkers" >> $HGRCPATH