Revsets, sub-directories and merge commits
Matt Mackall
mpm at selenic.com
Tue Sep 29 19:29:43 UTC 2015
On Tue, 2015-09-29 at 21:21 +0200, Marc Strapetz wrote:
> On 28.09.2015 17:11, Matt Mackall wrote:
> > On Fri, 2015-09-25 at 12:25 +0200, Marc Strapetz wrote:
> >> We are using revsets to create sub-directory logs using something like:
> >>
> >> $ hg log -r "file('sub/**')"
> >
> > FYI, that should be equivalent to:
> >
> > $ hg log sub
>
> Yes, this one is also missing merge commits.
>
> >> However this does not give me merge commits which are affecting 'sub'.
> >
> > This is actually another variant of the classic "how do you diff a
> > merge" conundrum:
> >
> > https://mercurial.selenic.com/wiki/MergeDiffs
> >
> >
> > However, there is a trick that might do what you want, depending on your
> > merge strategy:
> >
> > $ hg log -r "file('sub/**') or (merge() and contains('set:modified() and
> > sub/**'))'
> >
> > The second clause says: "also show me merges which contain any file that
> > is modified relative to the first parent in sub/".
>
> Unfortunately, this doesn't work for me. Even:
>
> $ hg log -r "contains('sub/**')"
"set:"
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list