From patchwork Thu Jan 16 08:19:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7828: rebase: remove some redundant setting of dirstate parents From: phabricator X-Patchwork-Id: 44417 Message-Id: <05f99e6c0c63203aff392c81dd6e0b96@localhost.localdomain> To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Thu, 16 Jan 2020 08:19:01 +0000 martinvonz edited the summary of this revision. martinvonz updated this revision to Diff 19346. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7828?vs=19148&id=19346 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7828/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7828 AFFECTED FILES hgext/rebase.py CHANGE DETAILS To: martinvonz, #hg-reviewers Cc: mercurial-devel diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -696,6 +696,7 @@ editor = cmdutil.getcommiteditor(edit=editopt, editform=editform) revtoreuse = max(self.state) + self.wctx.setparents(repo[p1].node(), repo[self.external].node()) newnode = self._concludenode( revtoreuse, p1, self.external, editor, commitmsg=commitmsg ) @@ -1431,7 +1432,6 @@ if b'branch' in extra: branch = extra[b'branch'] - wctx.setparents(repo[p1].node(), repo[p2].node()) memctx = wctx.tomemctx( commitmsg, date=date, @@ -1452,8 +1452,6 @@ if not repo.ui.configbool(b'rebase', b'singletransaction'): dsguard = dirstateguard.dirstateguard(repo, b'rebase') with dsguard: - repo.setparents(repo[p1].node(), repo[p2].node()) - # Commit might fail if unresolved files exist newnode = repo.commit( text=commitmsg, user=user, date=date, extra=extra, editor=editor