src/mercurialserver/changes.py
author Ashley Hewson <ash@lshift.net>
Wed, 23 Jul 2014 14:31:59 +0000
changeset 369 c359a85eef93
parent 242 03d8f07230b3
child 376 d503d5a786f3
permissions -rw-r--r--
README.md edited online with Bitbucket

"""
Find all the changes in a node in a way portable across Mercurial versions
"""

def changes(repo, node):
    start = repo.changectx(node).rev()
    try:
        end = len(repo.changelog)
    except:
        end = repo.changelog.count()
    for rev in xrange(start, end):
        yield repo.changectx(rev)