##// END OF EJS Templates
cvsps: pull function definition out of loop
Martin Geisler -
r15790:52f816b4 default
parent child Browse files
Show More
@@ -556,11 +556,10 b' def createchangeset(ui, log, fuzz=60, me'
556 556
557 557 # Sort files in each changeset
558 558
559 for c in changesets:
560 def pathcompare(l, r):
559 def entitycompare(l, r):
561 560 'Mimic cvsps sorting order'
562 l = l.split('/')
563 r = r.split('/')
561 l = l.file.split('/')
562 r = r.file.split('/')
564 563 nl = len(l)
565 564 nr = len(r)
566 565 n = min(nl, nr)
@@ -574,9 +573,8 b' def createchangeset(ui, log, fuzz=60, me'
574 573 elif l[i] > r[i]:
575 574 return +1
576 575 return 0
577 def entitycompare(l, r):
578 return pathcompare(l.file, r.file)
579 576
577 for c in changesets:
580 578 c.entries.sort(entitycompare)
581 579
582 580 # Sort changesets by date
General Comments 0
You need to be logged in to leave comments. Login now