'hg log FILE1 FILE2' order depends on the order of the files?

Stanislau Hlebik stash at fb.com
Thu Feb 11 13:20:39 EST 2016


Thanks for suggestion!

Maybe I'm doing smth wrong, but when I tried to run
sort(::0902ae52b1289c6e88bbbb55eb59464a1ebbce91, -rev) result still
depends on the file order.

On 2/11/16, 5:33 PM, "Martin von Zweigbergk" <martinvonz at google.com> wrote:

>I think the iteration order is undefined, and I think "reverse(...)"
>just reverses that undefined order. Try using "sort(..., -rev)"?
>
>On Thu, Feb 11, 2016 at 9:16 AM, Stanislau Hlebik <stash at fb.com> wrote:
>> Hey.
>>
>> We have a library that runs hg and parses its output. Today in one of
>>the
>> unittests I've noticed weird behavior: hg log output order depends on
>>the
>> order of the filenames.
>>
>> Unfortunately , I wasn't able to reproduce it outside of test
>>environment. I
>> can reproduce it in the test environment easily though.
>>
>> Has anybody experienced the same problem? Or does anybody have ideas on
>>how
>> to debug it?
>>
>> Below are the commands and theirs output (repo has two commits,
>>file2.txt
>> and file3.txt both were changed in each commit):
>>
>> # file2.txt, file3.txt
>> command [u'hg', u'log', u'-r',
>> u'reverse(::0902ae52b1289c6e88bbbb55eb59464a1ebbce91)', u'-T', u'{node}
>> {p1node} {p2node}\x01', 'file2.txt', 'file3.txt']
>>
>> history [u'77a1445b59a5dcc7ea92be275fc3457cba9615b1
>> 0000000000000000000000000000000000000000
>> 0000000000000000000000000000000000000000',
>> u'0902ae52b1289c6e88bbbb55eb59464a1eb    bce91
>> 77a1445b59a5dcc7ea92be275fc3457cba9615b1
>> 0000000000000000000000000000000000000000', u'']
>>
>> # file3.txt, file2.txt
>> command [u'hg', u'log', u'-r',
>> u'reverse(::0902ae52b1289c6e88bbbb55eb59464a1ebbce91)', u'-T', u'{node}
>> {p1node} {p2node}\x01', 'file3.txt', 'file2.txt']
>>
>> history [u'0902ae52b1289c6e88bbbb55eb59464a1ebbce91
>> 77a1445b59a5dcc7ea92be275fc3457cba9615b1
>> 0000000000000000000000000000000000000000',
>> u'77a1445b59a5dcc7ea92be275fc3457cba9615b1
>> 0000000000000000000000000000000000000000
>> 0000000000000000000000000000000000000000', u'']
>>
>> Thanks,
>> Stas
>>
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel at mercurial-scm.org
>> 
>>https://urldefense.proofpoint.com/v2/url?u=https-3A__www.mercurial-2Dscm.
>>org_mailman_listinfo_mercurial-2Ddevel&d=CwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&
>>r=1EQ58Dmb5uX1qHujcsT1Mg&m=3qWjXeFEliWfzPAIJSYIEDrzBzcg91_Q8LV7U08GFRg&s=
>>ImL3Gx8ulw2H09gvHTe7dMfXW0gqnDk2wGH0FDsvf60&e=
>>



More information about the Mercurial-devel mailing list