D6659: graft: split graft code into seperate functions

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Wed Aug 7 18:09:19 EDT 2019


pulkit added inline comments.

INLINE COMMENTS

> cmdutil.py:3431
> +    """logic to execute graft once revs are generated"""
> +    graftstate = statemod.cmdstate(repo, 'graftstate')
> +    for pos, ctx in enumerate(repo.set("%ld", revs)):

let's initialize `graftstate` only where we need it.

> cmdutil.py:3495
> +
> +def continuegraftstate(repo, graftstate, opts):
> +    """updates opts based on the interrupted graftstate once

the function name is not correct with respect to what it does, maybe something like `getopts` or something. Also, we no longer update the `opts`, so we can drop that as argument and also need to update the function description.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6659/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6659

To: taapas1128, #hg-reviewers, durin42
Cc: pulkit, durin42, martinvonz, mercurial-devel


More information about the Mercurial-devel mailing list