question about revset usage
Mads Kiilerich
mads at kiilerich.com
Tue Sep 30 17:52:17 UTC 2014
On 09/30/2014 07:35 PM, Pierre-Yves David wrote:
> On 09/22/2014 04:49 PM, Mads Kiilerich wrote:
>> The unsorted order of revsets is not documented and can thus be
>> considered undefined and can thus not be wrong. If you want a special
>> order, use sort().
>
> Actually, before 3.0 all revsets were returned ascending but explicit
> descending range 10:5 (and strange stuff like 4+3 and internal _list
> predicate).
Really? Yes, really! That is not how I remember it. Weird.
> I'm about to restore the ascending behavior for all revset (but 10:5)
> for the sake for user sanity.
If it really has been both undefined and unreliable in the past, please
consider making it descending. The most recent changesets are usually
the most relevant. I think having ascending as default would mean much
longer one-off command lines.
An example:
hg log -l4 -r ::.
vs
hg log -l4 -r 'sort(::.,-rev)'
/Mads
More information about the Mercurial
mailing list