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.
--- 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)