diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -427,9 +427,8 @@ class rebaseruntime(object): mergemod.mergestate.clean(repo) else: # Skip commit if we are collapsing - repo.dirstate.beginparentchange() - repo.setparents(repo[p1].node()) - repo.dirstate.endparentchange() + with repo.dirstate.parentchange(): + repo.setparents(repo[p1].node()) newnode = None # Update the state if newnode is not None: