Mercurial > hg-stable
changeset 32387:082fc4abdc31
rebase: migrate to context manager for changing dirstate parents
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 18 May 2017 17:11:01 -0400 |
parents | f4aee989ebec |
children | 81936f6462c1 |
files | hgext/rebase.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/rebase.py Thu May 18 17:10:53 2017 -0400 +++ b/hgext/rebase.py Thu May 18 17:11:01 2017 -0400 @@ -427,9 +427,8 @@ 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: