[PATCH 1 of 5 V2] revsets: record sort order keys
Yuya Nishihara
yuya at tcha.org
Wed May 25 14:21:33 UTC 2016
On Mon, 23 May 2016 22:11:58 -0700, Martijn Pieters wrote:
> # HG changeset patch
> # User Martijn Pieters <mjpieters at fb.com>
> # Date 1464035751 25200
> # Mon May 23 13:35:51 2016 -0700
> # Node ID 03cd59ee6b5cd205968abcf9a63eeaa23dfc9f6e
> # Parent bdba6a2015d0bc57c6e2beab25d138610dcbf360
> revsets: record sort order keys
The direction seems fine to me though I haven't look the patches carefully
yet.
> def reverse(self):
> if self._ascending is None:
> self._list.reverse()
> + self.sortorder = tuple(d[1:] if d[0] == '-' else '-' + d
> + for d in self.sortorder)
That's true only for unique items. sort(x, -author) != reverse(sort(x, author))
for example.
More information about the Mercurial-devel
mailing list