[Bug 5218] New: Revset descending sort is not the correct inverse of ascending sort

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Fri Apr 22 07:34:40 UTC 2016


https://bz.mercurial-scm.org/show_bug.cgi?id=5218

            Bug ID: 5218
           Summary: Revset descending sort is not the correct inverse of
                    ascending sort
           Product: Mercurial
           Version: 3.7.3
          Hardware: PC
                OS: Windows
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: revset
          Assignee: bugzilla at selenic.com
          Reporter: mathias.demare at gmail.com
                CC: mercurial-devel at selenic.com

Reproduction scenario:

hg init sometestrepo
cd sometestrepo
touch foo
hg add foo
hg commit -m foo
hg branch test11
hg commit -m "branch test11"
hg branch test1101
hg commit -m "branch test1101"
hg branch test1102
hg commit -m "branch test1102"
hg branch test1113
hg commit -m "branch test1113"
hg branch test12
hg commit -m "branch test12"
hg log -r "sort(head(), branch)" --template "{branch}\n"
hg log -r "sort(head(), -branch)" --template "{branch}\n"

Output for a regular sort:
$ hg log -r "sort(head(), branch)" --template "{branch}\n"
default
test11
test1101
test1102
test1113
test12

Output for an inverse sort:
$ hg log -r "sort(head(), -branch)" --template "{branch}\n"
test12
test11
test1113
test1102
test1101
default

Using a regular sort and then doing 'reverse(...)' does work correctly.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list