[PATCH 1 of 7 v4] rebase: introduce a RebaseRuntimeState (RRS) class

Yuya Nishihara yuya at tcha.org
Mon Jun 13 09:42:50 EDT 2016


On Sun, 5 Jun 2016 18:46:15 +0100, Kostia Balytskyi wrote:
> # HG changeset patch
> # User Kostia Balytskyi <ikostia at fb.com>
> # Date 1465136332 -3600
> #      Sun Jun 05 15:18:52 2016 +0100
> # Node ID 52b8a1170cb6e1ec6c0c547ed02ceddf3a749edc
> # Parent  9ac309946df9e69bb73ded75f2fc5b84a4e785c2
> rebase: introduce a RebaseRuntimeState (RRS) class
>
> RebaseRuntimeState is a class that will in future contain all of the state
> necessary to perform rebase operation and have pieces of rebase logic as
> its methods.

I'm not familiar with the rebase code, but I agree this is one way to eliminate
long function arguments and result tuples. And there's no -1 on this series,
this approach will be fine.

> +class RebaseRuntimeState(object):
> +    """This class is a container for rebase runtime state"""

Nit: in our coding style, class name should be lowercase. Also, it doesn't
sound like a "state" because we're going to add methods to drive rebase logic.

https://www.mercurial-scm.org/wiki/CodingStyle#Classes


More information about the Mercurial-devel mailing list