[PATCH 1 of 3] record: add an operation arguments to customize recording ui

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed May 27 21:59:06 CDT 2015



On 05/27/2015 04:43 PM, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1432766964 25200
> #      Wed May 27 15:49:24 2015 -0700
> # Node ID 99386da5b5499f7480f59d898ce46363bf9d6342
> # Parent  6ac860f700b5cfeda232d5305963047696b869ca
> record: add an operation arguments to customize recording ui
>
> This patch is part of a series of patches to change the recording ui to reflect
> the operation currently running (commit, shelve, revert ...).
> This patch adds a new argument to the recording function to reflect in the UI
> what operation we are running.

patch move in the right direction and pushed to the clowncopter.


> +def recordfilter(ui, originalhunks, operation=None):
> +    """ Prompts the user to filter the originalhunks and return a list of
> +    selected hunks.
> +    *operation* is used for ui purposes to indicate the user
> +    what kind of filtering they are doing: reverting, commiting, shelving, etc.
> +    """

Please try to stick to python convention for docstring:

"""short single line description

Longer multi line
content for details
"""


-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list