Mercurial > hg
changeset 50887:8edfd28a01d1
convert: stabilize subversion date sorter
In case of tie, this provides unstable result on my system. So I am adding a
couple of tie breaker to fix the test.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 29 Aug 2023 22:13:18 +0200 |
parents | 12476986d89c |
children | 93cc085653fb |
files | hgext/convert/convcmd.py |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/convcmd.py Thu Aug 31 19:47:33 2023 -0400 +++ b/hgext/convert/convcmd.py Tue Aug 29 22:13:18 2023 +0200 @@ -435,7 +435,13 @@ """Sort revisions by date.""" def getdate(n): - return dateutil.parsedate(self.commitcache[n].date) + commit = self.commitcache[n] + # The other entries are here as tie breaker for stability + return ( + dateutil.parsedate(commit.date), + commit.rev, + commit.branch, + ) return keysorter(getdate)