'hg log FILE1 FILE2' order depends on the order of the files?
Yuya Nishihara
yuya at tcha.org
Sat Feb 13 05:52:12 UTC 2016
On Sat, 13 Feb 2016 01:53:59 +0900, Yuya Nishihara wrote:
> On Thu, 11 Feb 2016 20:47:32 +0000, Pierre-Yves David wrote:
> > On 02/11/2016 06:20 PM, Stanislau Hlebik wrote:
> > > Maybe I'm doing smth wrong, but when I tried to run
> > > sort(::0902ae52b1289c6e88bbbb55eb59464a1ebbce91, -rev) result still
> > > depends on the file order.
> >
> > That's probably because the file arguement are added tot he revset after
> > the fact (and probably as first element for some reason) try adding your
> > file as revset element directly.
>
> This looks like a regression around smartset + logrevset.
>
> "hg log -r R A B" constructs the following expression,
>
> revs = R
> expr = filelog(A) or filelog(B)
>
> and evaluates expr against revs.
>
> matcher = revset.match(ui, expr)
> matcher(repo, revs)
>
> This is equivalent to "R and (filelog(A) or filelog(B))", which builds the
> following set:
>
> <addset
> <filteredset <R>>,
> <filteredset <R>>>
>
> Therefore, the ordering of <R> isn't preserved.
>
> Perhaps, <addset> should be wrapped by <filteredset self=R> if R is dominant,
> but the problem won't that simple.
Reported as
https://bz.mercurial-scm.org/show_bug.cgi?id=5100
More information about the Mercurial-devel
mailing list