Mercurial > public > mercurial-scm > hg
diff hgext/histedit.py @ 24764:4dcd55802237
histedit: allow histedit --continue when not on a descendant (BC)
Previously we would not allow --continue if the current working copy parent was
not a descendant of the commit produced by the previous histedit step. There's
nothing really blocking us from continuing the histedit in this situation, so
let's stop aborting in this case.
This is technically a BC change, but it is making things more forgiving so I
think it's ok.
In the future we will likely add an 'exec' action to histedit, which means the
user can do whatever they want during the middle of a histedit (like perhaps
calling 'hg update'), which means we'll need to support this case eventually
anyway.
author | Durham Goode <durham@fb.com> |
---|---|
date | Sat, 04 Apr 2015 01:00:05 -0700 |
parents | 7b59f16174c5 |
children | bdf84cc2115b |
line wrap: on
line diff
--- a/hgext/histedit.py Thu Apr 16 11:59:36 2015 -0400 +++ b/hgext/histedit.py Sat Apr 04 01:00:05 2015 -0700 @@ -833,11 +833,7 @@ newchildren = [c.node() for c in repo.set('(%d::.)', ctx)] if ctx.node() != node.nullid: if not newchildren: - # `ctx` should match but no result. This means that - # currentnode is not a descendant from ctx. - msg = _('%s is not an ancestor of working directory') - hint = _('use "histedit --abort" to clear broken state') - raise util.Abort(msg % ctx, hint=hint) + return [] newchildren.pop(0) # remove ctx return newchildren