Find changctx after a given changectx
Benoit Boissinot
benoit.boissinot at ens-lyon.org
Tue Oct 20 09:26:33 UTC 2009
On Thu, Oct 15, 2009 at 03:31:50PM +0200, Berkes Adam wrote:
> I'm trying to explain more - I have an ascii "glog" like this:
>
> @ 29
> | o 28
> | | o 27
> | o | 26
> o | | 25
> | o | 24
> o/ | 23
> | o 22
> R | 21
>
> R - remote repository tip before my push
> @ - my current tip
>
> I push these 8 changeset, and on a hook I get changectx for 22 as
> parameter (as I can understand now). I would like to collect all
> changeset from 22 to 29 without I care about their ancesity (my
> wrong descendant version will get only [22,27]). I see the function
> walkchangerevs (cmdutils) which can be usable for me (walk until
> returned changeset date is older than 22) but that is a backward
> manner: for me "walk forwards to gather data" (quote from the class
> doc) is enough started from a given changeset.
Just use the rev number, and iterate until the end of the changelog
[repo[r] for r in xrange(ctx.rev(), len(repo))]
regards,
Benoit
--
:wq
More information about the Mercurial-devel
mailing list