[PATCH] progress: move API help in the 'mercurial.progress' module

Augie Fackler raf at durin42.com
Wed Jun 10 12:15:14 CDT 2015


On Wed, Jun 10, 2015 at 1:13 PM, Augie Fackler <raf at durin42.com> wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com>
> # Date 1433725258 25200
> #      Sun Jun 07 18:00:58 2015 -0700
> # Node ID 646f536cc8b7d8e340404946f4afc0e156652d6c
> # Parent  77f0602ad7dff0527152685b455508d44751bce6
> progress: move API help in the 'mercurial.progress' module
>
> The help should have been on the class in the first place, but the class now
> live elsewhere.

No, this patch is wrong, because this documentation needs to be user
visible in 'hg help progress'.

>
> diff --git a/hgext/progress.py b/hgext/progress.py
> --- a/hgext/progress.py
> +++ b/hgext/progress.py
> @@ -27,12 +27,6 @@ The following settings are available::
>    disable = False # if true, don't show a progress bar
>    assume-tty = False # if true, ALWAYS show a progress bar, unless
>                       # disable is given
> -
> -Valid entries for the format field are topic, bar, number, unit,
> -estimate, speed, and item. item defaults to the last 20 characters of
> -the item, but this can be changed by adding either ``-<num>`` which
> -would take the last num characters, or ``+<num>`` for the first num
> -characters.
>  """
>
>  def uisetup(ui):
> diff --git a/mercurial/progress.py b/mercurial/progress.py
> --- a/mercurial/progress.py
> +++ b/mercurial/progress.py
> @@ -61,6 +61,14 @@ def fmtremaining(seconds):
>      return _("%dy%02dw") % (years, weeks)
>
>  class progbar(object):
> +    """A object capable of handling multiple progress bars
> +
> +    Valid entries for the format field are topic, bar, number, unit, estimate,
> +    speed, and item. item defaults to the last 20 characters of the item, but
> +    this can be changed by adding either ``-<num>`` which would take the last
> +    num characters, or ``+<num>`` for the first num characters.
> +    """
> +
>      def __init__(self, ui):
>          self.ui = ui
>          self._refreshlock = threading.Lock()
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list