From 2de575229af937bed2c4df98ee0cfb38d0e7b0b0 Mon Sep 17 00:00:00 2001 From: Kirill Smelkov Date: Tue, 18 Dec 2007 14:01:34 -0600 Subject: [PATCH] [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. --- hgext/convert/convcmd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hgext/convert/convcmd.py b/hgext/convert/convcmd.py index 528888f00e..86c502e26c 100644 --- a/hgext/convert/convcmd.py +++ b/hgext/convert/convcmd.py @@ -145,7 +145,8 @@ class converter(object): 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]