[PATCH 3 of 7 V3] revset: add a bumped revset

Pierre-Yves David pierre-yves.david at logilab.fr
Wed Oct 17 07:18:27 CDT 2012


On Tue, Oct 16, 2012 at 05:02:32PM -0500, Kevin Bullock wrote:
> On Oct 16, 2012, at 3:48 PM, Pierre-Yves David wrote:
> 
> > # HG changeset patch
> > # User Pierre-Yves David <pierre-yves.david at logilab.fr>
> > # Date 1350300187 -7200
> > # Node ID e36b56c8231211eb5276677a31be57bb8e275a13
> > # Parent  8192b7575461b04cd4797d59315a231f426aea77
> > revset: add a bumped revset
> > 
> > Select bumped changesets.
> > 
> > diff --git a/mercurial/revset.py b/mercurial/revset.py
> > --- a/mercurial/revset.py
> > +++ b/mercurial/revset.py
> > @@ -422,6 +422,17 @@
> >     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()``
> > +    Mutable changeset trying to succeed to a public changeset.
> 
> Same phrasing changes here as to the comments in [PATCH 2 of 7 V3].
> 
> > +
> > +    Only non-public and non-obsolete changesets can be `bumped`.
> > +    """
> > +    # i18n: "bumped" is a keyword
> > +    getargs(x, 0, 0, _("bumped takes no arguments"))
> > +    bumped = obsmod.getobscache(repo, 'bumped')
> 
> Do we not have a method to return the bumped changesets a bit more cleanly? Directly fetching into another module's cache seems a bit dirty to me.

This the the very official method to get the list of xxx changeset on the repo.
Maybe the fact it contains "cache" in its name is missleading.

The other higher level way would be to use the repo.set("bumped()") revset call.


-- 
Pierre-Yves David

http://www.logilab.fr/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20121017/3b63e07a/attachment.pgp>


More information about the Mercurial-devel mailing list