Mercurial > hg
changeset 5656:b940260c4291
[RFC] convert: fix --datesort
The problem is that previously commit.date was used for sorting, but it's a
string like "1 Jan xxx 2007", so it it wrong to use it for sorting.
Another problem is that why we are using depth for sorting -- I have no clear
answer -- it seems to be plain wrong.
This patch is just an RFC.
author | Kirill Smelkov <kirr@mns.spb.ru> |
---|---|
date | Tue, 18 Dec 2007 14:01:34 -0600 |
parents | fe38b0a3a928 |
children | 47915bf68c44 |
files | hgext/convert/convcmd.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/convcmd.py Wed Dec 12 14:44:59 2007 +0100 +++ b/hgext/convert/convcmd.py Tue Dec 18 14:01:34 2007 -0600 @@ -145,7 +145,8 @@ if pl: depth[n] = max([depth[p] for p in pl]) + 1 - s = [(depth[n], self.commitcache[n].date, n) for n in s] + s = [(depth[n], util.parsedate(self.commitcache[n].date), n) + for n in s] s.sort() s = [e[2] for e in s]