discovering changesets affecting files only under a certain path in a repo

Nikita Kalashnikov nikita.kalashnikov at gmail.com
Fri Jun 10 15:56:42 CDT 2011


Oh cool, that looks very promising. Is it possible to run the same commands
via the internal python interface (the possibility that it may change
doesn't bother me)? I'd much rather use that than parse the output of that
command.

Nikita

On Fri, Jun 10, 2011 at 1:50 PM, Matt Mackall <mpm at selenic.com> wrote:

> On Fri, 2011-06-10 at 08:11 -0700, Nikita Kalashnikov wrote:
> > In SVN it is possible to get the latest revision (and revision history)
> > under a specific path, vs for the entire repo. If I get SVN info for a
> > directory, the revision that will be returned in that info will be the
> > latest check in that affected any file under that directory. Is this
> > possible in Mercurial without basically looping through all the
> changesets
> > and checking if any of the changed files fall under a certain path?
>
> The simplest thing is:
>
> hg log -l1 dir/  # show the most recent commit touching a file in dir/
>
> But we've actually got an entire query language you can use if you want
> to do something fancier:
>
> hg log -r 'limit(reverse(ancestors(.) and file("tests/*")), 1)'
>
> See 'hg help revsets' for more info.
>
> --
> Mathematics is the supreme nostalgia of our time.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial/attachments/20110610/a012d6a4/attachment.htm>


More information about the Mercurial mailing list