D3754: graft: introduce --abort flag to abort interrupted graft
yuja (Yuya Nishihara)
phabricator at mercurial-scm.org
Mon Jun 25 11:07:23 EDT 2018
yuja added a comment.
> + # changeset from which graft operation was started
> + startctx = None
> + if len(newnodes) > 0:
> + startctx = repo[newnodes[0]].p1()
This can be moved under `if newnodes:`
> + else:
> + startctx = repo['.']
> + # whether to strip or not
> + cleanup = False
> + if newnodes:
> + newnodes = [repo[r].rev() for r in newnodes]
...
> + if not cleanup:
> + # we don't update to the startnode if we can't strip
> + startctx = repo['.']
since startctx is re-initialized here.
> + hg.updaterepo(repo, startctx.node(), True)
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D3754
To: pulkit, #hg-reviewers
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list