comparison hgext/convert/hg.py @ 18819:05acdf8e1f23

convert: add closesort algorithm to mercurial sources If you actively work with branches, sometimes you need to close old branches which last commited hundreds revisions ago. After close you will see long lines in graph visually spoiling history. This sort only moves closed revisions as close as possible to parents and does not increase storage size as datesort do.
author Constantine Linnick <theaspect@gmail.com>
date Sun, 24 Mar 2013 00:06:52 +0700
parents 687ed69f6fdf
children 58e782f076e7
comparison
equal deleted inserted replaced
18818:a0bff3d4f67b 18819:05acdf8e1f23
384 self.ui.debug('run hg source post-conversion action\n') 384 self.ui.debug('run hg source post-conversion action\n')
385 385
386 def hasnativeorder(self): 386 def hasnativeorder(self):
387 return True 387 return True
388 388
389 def hasnativeclose(self):
390 return True
391
389 def lookuprev(self, rev): 392 def lookuprev(self, rev):
390 try: 393 try:
391 return hex(self.repo.lookup(rev)) 394 return hex(self.repo.lookup(rev))
392 except error.RepoError: 395 except error.RepoError:
393 return None 396 return None