question about revset usage
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Tue Sep 30 17:35:22 UTC 2014
On 09/22/2014 04:49 PM, Mads Kiilerich wrote:
> On 09/21/2014 10:45 AM, Faheem Mitha wrote:
>> If I use revsets as follows:
>>
>> faheem at orwell:/usr/local/src/mercurial/hg$ hg log -r
>> 'author(mpm at selenic.com)'
>>
>> The order of the csets is reversed - the oldest csets are at the top,
>> unlike the normal result of `hg log` where the newest csets are at the
>> top. I.e.
>>
>> faheem at orwell:/usr/local/src/mercurial/hg$ hg log -l1 -r
>> 'author(mpm at selenic.com)'
>> changeset: 0:9117c6561b0b
>> user: mpm at selenic.com
>> date: Tue May 03 13:16:10 2005 -0800
>> summary: Add back links from file revisions to changeset revisions
>>
>> I rarely use revsets, but in any case, I've not noticed this behavior
>> before, nor could I find any documentation about it. I also can't
>> think of any good reason for this behavior. If this is correct
>> behavior, and if I am not missing something obvious, I suggest it be
>> documented somewhere.
>
> 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).
After 3.0 this is still mostly true because we do not take much
advantage of the lazyness of revset yet.
I'm about to restore the ascending behavior for all revset (but 10:5)
for the sake for user sanity.
--
Pierre-Yves David
More information about the Mercurial
mailing list