Patchwork [1,of,3] revset: short docstring for checkstatus

login
register
mail settings
Submitter Jordi Gutiérrez Hermoso
Date April 5, 2019, 6:42 p.m.
Message ID <9fcb915a73b83547921a.1554489757@chloe>
Download mbox | patch
Permalink /patch/39516/
State Accepted
Headers show

Comments

Jordi Gutiérrez Hermoso - April 5, 2019, 6:42 p.m.
# HG changeset patch
# User Jordi Gutiérrez Hermoso <jordigh@octave.org>
# Date 1554489052 14400
#      Fri Apr 05 14:30:52 2019 -0400
# Node ID 9fcb915a73b83547921aaa13584c88cb99c6aee7
# Parent  a975821d0938615b8cb235f12cc6461a42dcfbd8
revset: short docstring for checkstatus

This is where all the action happens for the status-related revsets,
and a little documentation doesn't hurt.
Pulkit Goyal - April 12, 2019, 12:33 p.m.
On Fri, Apr 5, 2019 at 10:34 PM Jordi Gutiérrez Hermoso <jordigh@octave.org>
wrote:

> # HG changeset patch
> # User Jordi Gutiérrez Hermoso <jordigh@octave.org>
> # Date 1554489052 14400
> #      Fri Apr 05 14:30:52 2019 -0400
> # Node ID 9fcb915a73b83547921aaa13584c88cb99c6aee7
> # Parent  a975821d0938615b8cb235f12cc6461a42dcfbd8
> revset: short docstring for checkstatus
>
> This is where all the action happens for the status-related revsets,
> and a little documentation doesn't hurt.
>
>
Queued only this one, many thanks!


> diff --git a/mercurial/revset.py b/mercurial/revset.py
> --- a/mercurial/revset.py
> +++ b/mercurial/revset.py
> @@ -598,6 +598,12 @@ def bundle(repo, subset, x):
>      return subset & bundlerevs
>
>  def checkstatus(repo, subset, pat, field):
> +    """Helper for status-related revsets (adds, removes, modifies,
> +    renames, copies). The field parameter says which kind is desired:
>

dropped renames and copies for now

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -598,6 +598,12 @@  def bundle(repo, subset, x):
     return subset & bundlerevs
 
 def checkstatus(repo, subset, pat, field):
+    """Helper for status-related revsets (adds, removes, modifies,
+    renames, copies). The field parameter says which kind is desired:
+    0: modified
+    1: added
+    2: removed
+    """
     hasset = matchmod.patkind(pat) == 'set'
 
     mcache = [None]