Why different results of revsets received?

21 views Asked by At

Revset 1

 hg log -r "first(sort(date('Nov 2022'),date))"

Result

changeset:   2180:f6cfbc5fcd0c
...
date:        Wed Nov 02 09:47:13 2022 +0100

Revset 2

The same (seems so) logic, less code

hg log -r "first(date('Nov 2022'))"

Result

changeset:   2177:29d1515aac3b
...
date:        Fri Nov 04 09:51:03 2022 +0100
1

There are 1 answers

0
Lazy Badger On

The difference, as it turned out, is in taking into account (revset2) or ignoring (revset1) the topology

hg log -G -r "2177::2180" -T tiny
o  2180   f6cfbc5fcd0c   2022-11-02 09:47 +0100
|    
|
o  2179   0e6eb346828e   2022-11-04 14:33 +0100
|    
|
o    2178:2176,2177   29e858f35109   2022-11-04 15:16 +0100
|\     
| ~
o  2177:2175   29d1515aac3b   2022-11-04 09:51 +0100
|    
~

2177 is earlier in history, but later in timestamp

BEWARE, and select needed logic according to task