comparison hgext/histedit.py @ 25452:43906060a3f4

histedit: abort rather than edit a public changeset (issue4704) This is suboptimal as the user still has to explicitly cancel the histedit afterwards, but it prevents the immediate problem. histedit should probably implicitly do 'hg histedit --abort' if a util.Abort is raised internally.
author Augie Fackler <augie@google.com>
date Fri, 05 Jun 2015 15:20:33 -0400
parents 7e36c3000ead
children 328739ea70c3
comparison
equal deleted inserted replaced
25451:f0acc3e0bd32 25452:43906060a3f4
431 431
432 This function works in memory.""" 432 This function works in memory."""
433 ctxs = list(repo.set('%d::%d', first, last)) 433 ctxs = list(repo.set('%d::%d', first, last))
434 if not ctxs: 434 if not ctxs:
435 return None 435 return None
436 for c in ctxs:
437 if not c.mutable():
438 raise util.Abort(
439 _("cannot fold into public change %s") % node.short(c.node()))
436 base = first.parents()[0] 440 base = first.parents()[0]
437 441
438 # commit a new version of the old changeset, including the update 442 # commit a new version of the old changeset, including the update
439 # collect all files which might be affected 443 # collect all files which might be affected
440 files = set() 444 files = set()