##// END OF EJS Templates
unamend: allow unamending if allowunstable is set...
Martin von Zweigbergk -
r35451:f0110110 default
parent child Browse files
Show More
@@ -208,8 +208,7 b' def unamend(ui, repo, **opts):'
208 208 # identify the commit from which to unamend
209 209 curctx = repo['.']
210 210
211 if not curctx.mutable():
212 raise error.Abort(_('cannot unamend public changesets'))
211 rewriteutil.precheck(repo, [curctx.rev()], 'unamend')
213 212
214 213 # identify the commit to which to unamend
215 214 markers = list(predecessormarkers(curctx))
@@ -220,9 +219,6 b' def unamend(ui, repo, **opts):'
220 219 prednode = markers[0].prednode()
221 220 predctx = unfi[prednode]
222 221
223 if curctx.children():
224 raise error.Abort(_("cannot unamend a changeset with children"))
225
226 222 # add an extra so that we get a new hash
227 223 # note: allowing unamend to undo an unamend is an intentional feature
228 224 extras = predctx.extra()
@@ -280,17 +280,20 b' Unamending in middle of a stack'
280 280 o 0:18d04c59bb5d Added a
281 281
282 282
283 $ hg --config experimental.evolution=createmarkers unamend
284 abort: cannot unamend changeset with children
285 [255]
286
283 287 $ hg unamend
284 abort: cannot unamend a changeset with children
285 [255]
286 288
287 289 Trying to unamend a public changeset
288 290
289 $ hg up
290 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
291 $ hg up -C 23
292 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
291 293 $ hg phase -r . -p
292 294 $ hg unamend
293 295 abort: cannot unamend public changesets
296 (see 'hg help phases' for details)
294 297 [255]
295 298
296 299 Testing whether unamend retains copies or not
General Comments 0
You need to be logged in to leave comments. Login now