# HG changeset patch # User Kirill Smelkov # Date 2007-12-18 20:01:34 # Node ID b940260c4291f5b845648d444a990be7a6eb1c1f # Parent fe38b0a3a92873d9e96990e7396c3a75df0403e8 [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. diff --git a/hgext/convert/convcmd.py b/hgext/convert/convcmd.py --- 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]