Patchwork context: small update to ctx.status doc

login
register
mail settings
Submitter Pierre-Yves David
Date Nov. 20, 2020, 10:12 a.m.
Message ID <54286f31bbf24cab63eb.1605867132@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/47620/
State Accepted
Headers show

Comments

Pierre-Yves David - Nov. 20, 2020, 10:12 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1605854229 -3600
#      Fri Nov 20 07:37:09 2020 +0100
# Node ID 54286f31bbf24cab63eb02e6ab1e4d95b413ed29
# Parent  d68618954adef9c2cbec868c1af0e01f67288cb8
# EXP-Topic status-doc
# Available At https://foss.heptapod.net/octobus/mercurial-devel/
#              hg pull https://foss.heptapod.net/octobus/mercurial-devel/ -r 54286f31bbf2
context: small update to ctx.status doc

The order of the "arguments" were not too clear, so we update the documentation
to clarify that.
Yuya Nishihara - Nov. 22, 2020, 11:42 a.m.
On Fri, 20 Nov 2020 11:12:12 +0100, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@octobus.net>
> # Date 1605854229 -3600
> #      Fri Nov 20 07:37:09 2020 +0100
> # Node ID 54286f31bbf24cab63eb02e6ab1e4d95b413ed29
> # Parent  d68618954adef9c2cbec868c1af0e01f67288cb8
> # EXP-Topic status-doc
> # Available At https://foss.heptapod.net/octobus/mercurial-devel/
> #              hg pull https://foss.heptapod.net/octobus/mercurial-devel/ -r 54286f31bbf2
> context: small update to ctx.status doc

Queued, thanks.

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -398,7 +398,18 @@  class basectx(object):
 
         If other is None, compare this node with working directory.
 
-        returns (modified, added, removed, deleted, unknown, ignored, clean)
+        ctx1.status(ctx2) return the status of change from ctx1 to ctx2
+
+
+        returns a mercurial.scmutils.status object.
+
+        Data can be accessed using either tuple notation:
+
+            (modified, added, removed, deleted, unknown, ignored, clean)
+
+        or direct attribute access:
+
+            s.modified, s.added, ...
         """
 
         ctx1 = self