[PATCH 3 of 7 V2] revset: add a bumped revset
patrick at mezard.eu
Sun Oct 14 11:03:59 CDT 2012
Le 03/10/12 23:21, Pierre-Yves David a écrit :
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at logilab.fr>
> # Date 1348842168 -7200
> # Node ID de917884f8b0874a18b5a758b31d6396aa197e89
> # Parent c09af8f861194656aa3465d2fd721749a61fdacb
> revset: add a bumped revset
> Select bumped changesets.
I would have merged that with the previous one so the implementation comes with a test. Also, testing that public or obsolete changesets are not returned would be nice. And test the transitivity too.
> diff --git a/mercurial/revset.py b/mercurial/revset.py
> --- a/mercurial/revset.py
> +++ b/mercurial/revset.py
> @@ -422,6 +422,15 @@
> s = set(s)
> return [r for r in subset if r in s or repo[r].branch() in b]
> +def bumped(repo, subset, x):
> + """``bumped()``
> + changeset trying to succeed to a public changeset.
> + """
Technically these are "non-public, non-obsolete changesets trying to succeed to a public changeset". I feel it is important to have the complete definition somewhere, and the revset documentation looks like a good place for that.
> + # i18n: "bumped" is a keyword
> + getargs(x, 0, 0, _("bumped takes no arguments"))
> + bumped = obsmod.getobscache(repo, 'bumped')
> + return [r for r in subset if r in bumped]
> def checkstatus(repo, subset, pat, field):
> m = None
> s = 
> @@ -1474,6 +1483,7 @@
> "bisected": bisected,
> "bookmark": bookmark,
> "branch": branch,
> + "bumped": bumped,
> "children": children,
> "closed": closed,
> "contains": contains,
More information about the Mercurial-devel