D3754: graft: introduce --abort flag to abort interrupted graft

Yuya Nishihara yuya at tcha.org
Mon Jun 25 11:03:02 EDT 2018


Fixed minor string nits, and queued, thanks.

> +    if newnodes:
> +        newnodes = [repo[r].rev() for r in newnodes]
> +        cleanup =  True
> +        # checking that none of the newnodes turned public or is public
> +        immutable = [c for c in newnodes if not repo[c].mutable()]
> +        if immutable:
> +            repo.ui.warn(_("cannot clean up public changesets %s\n")
> +                         % ','.join(bytes(repo[r]) for r in immutable),
> +                         hint=_("see 'hg help phases' for details"))
> +            cleanup = False

It's better to use r/rev, c/ctx, n/node in variable names consistently. Can
you send a followup?

> +    ui.write(_("graft aborted\nworking directory is now at %s\n")
> +             % startctx.hex()[:12])

s/ui.write/ui.status/ as we do that for graft --stop.


More information about the Mercurial-devel mailing list