Ticket #431 (closed defect: duplicate)
hgbuildbot.py broken for Mercurial 1.1
|Reported by:||evanwies||Owned by:|
hgbuildbot.py works with Mercurial 1.0, but is broken for Mercurial 1.1:
error: changegroup.buildbot hook raised an exception: 'changelog' object has no attribute 'count'
This is because changelog.count() disappeared in Mercurial changeset fb42030d79d6. Looking at the Mercurial tree, it look like this would be broken for 1.0.2 and newer, however I have only verified for Mercurial 1.1.
Here's a patch:
--- a/buildbot/changes/hgbuildbot.py 2008-09-16 12:02:34.000000000 -0400 +++ b/buildbot/changes/hgbuildbot.py 2009-02-21 20:52:21.000000000 -0500 @@ -79,7 +79,7 @@ node=bin(node) start = repo.changelog.rev(node) - end = repo.changelog.count() + end = len(repo.changelog) for rev in xrange(start, end): # send changeset n = repo.changelog.node(rev)
I don't think this is backwards compatible with Mercurial 1.0.1 and older. Perhaps a more sophisticated patch would check the Mercurial version? Definitely works with Mercurial 1.1.