comparison fetch_command.py @ 163:fdc249cd1a0a

Combine sort and reverse.
author Martin Geisler <mg@daimi.au.dk>
date Tue, 30 Dec 2008 19:24:16 -0600
parents 91c818377703
children db88e528e8e6
comparison
equal deleted inserted replaced
162:7a58ff3502b7 163:fdc249cd1a0a
358 continue 358 continue
359 dest = path[len(branchpath):] 359 dest = path[len(branchpath):]
360 source = e.copyfrom_path[len(fullbranchpath):] 360 source = e.copyfrom_path[len(fullbranchpath):]
361 copies.append((dest, (source, e.copyfrom_rev))) 361 copies.append((dest, (source, e.copyfrom_rev)))
362 362
363 copies.sort() 363 copies.sort(reverse=True)
364 copies.reverse()
365 exactcopies = dict(copies) 364 exactcopies = dict(copies)
366 365
367 def finder(path): 366 def finder(path):
368 if path in exactcopies: 367 if path in exactcopies:
369 return exactcopies[path], exactcopies[path][0] 368 return exactcopies[path], exactcopies[path][0]