My python hook for mercurial
for rev in xrange(repo[node].rev(), len(repo)):
        ctx = context.changectx(repo, rev)


In Python, I generally try to avoid iterating using xrange. I prefer to iterate over what I'm interested in.

def revisions(repo, start, end):
    for revision_number in xrange(start, end):
        yield context.changectx(repo, revision_number)

for rev in revisions(repo, repo[node].rev(), len(repo)):
    ...


Although I'm not sure its worthwhile in this case. 

The only other issue is your use of abbreviations like repo and rev. They aren't that bad because its pretty clear from the context what they stand for. But I'd write them fully out.