Patchwork status: document the content of the returned tuple in the docstring

login
register
mail settings
Submitter Pierre-Yves David
Date June 2, 2014, 7:50 p.m.
Message ID <207b1106205fda34de19.1401738650@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/4913/
State Accepted
Commit 4d2b19a66fcf55a1634a52c0b4283c7a14bdf4e4
Headers show

Comments

Pierre-Yves David - June 2, 2014, 7:50 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1401582375 25200
#      Sat May 31 17:26:15 2014 -0700
# Node ID 207b1106205fda34de19508ea8846d199f59bfe7
# Parent  25732fab4dc35a76cfb8f659fde48c7e0dc42dbf
status: document the content of the returned tuple in the docstring

The ``status`` function returns a lot of information. We document it.
Augie Fackler - June 7, 2014, 1:38 p.m.
On Mon, Jun 02, 2014 at 12:50:50PM -0700, pierre-yves.david@ens-lyon.org wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@fb.com>
> # Date 1401582375 25200
> #      Sat May 31 17:26:15 2014 -0700
> # Node ID 207b1106205fda34de19508ea8846d199f59bfe7
> # Parent  25732fab4dc35a76cfb8f659fde48c7e0dc42dbf
> status: document the content of the returned tuple in the docstring

Queued, thanks.

>
> The ``status`` function returns a lot of information. We document it.
>
> diff --git a/mercurial/context.py b/mercurial/context.py
> --- a/mercurial/context.py
> +++ b/mercurial/context.py
> @@ -273,10 +273,12 @@ class basectx(object):
>                 listclean=False, listunknown=False, listsubrepos=False):
>          """return status of files between two nodes or node and working
>          directory.
>
>          If other is None, compare this node with working directory.
> +
> +        returns (modified, added, removed, deleted, unknown, ignored, clean)
>          """
>
>          ctx1 = self
>          ctx2 = self._repo[other]
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -273,10 +273,12 @@  class basectx(object):
                listclean=False, listunknown=False, listsubrepos=False):
         """return status of files between two nodes or node and working
         directory.
 
         If other is None, compare this node with working directory.
+
+        returns (modified, added, removed, deleted, unknown, ignored, clean)
         """
 
         ctx1 = self
         ctx2 = self._repo[other]