src/mercurialserver/changes.py
changeset 376 d503d5a786f3
parent 242 03d8f07230b3
equal deleted inserted replaced
373:a286d6c6b19c 376:d503d5a786f3
     1 """
     1 """
     2 Find all the changes in a node in a way portable across Mercurial versions
     2 Find all the changes in a node in a way portable across Mercurial versions
     3 """
     3 """
     4 
     4 
     5 def changes(repo, node):
     5 def changes(repo, node):
     6     start = repo.changectx(node).rev()
     6     start = repo[node].rev()
     7     try:
     7     try:
     8         end = len(repo.changelog)
     8         end = len(repo.changelog)
     9     except:
     9     except:
    10         end = repo.changelog.count()
    10         end = repo.changelog.count()
    11     for rev in xrange(start, end):
    11     for rev in xrange(start, end):
    12         yield repo.changectx(rev)
    12         yield repo[rev]