[Buildbot-devel] patch for empty svn revisions in svnpoller.py
Sarah Barbour
sarah.barbour at gmail.com
Wed Sep 22 00:07:00 UTC 2010
I ran into a problem where I was getting empty revisions from SVN; I'm
not entirely certain how I got them, but svnpoller kept crashing until
I put in this line. Since empty revisions aren't really interesting
anyway, I think this patch should sufficiently cover it.
--- a/master/buildbot/changes/svnpoller.py
+++ b/master/buildbot/changes/svnpoller.py
@@ -431,7 +431,10 @@ class SVNPoller(base.ChangeSource, util.ComparableMixin):
#when = time.mktime(time.strptime("%.19s" % when,
# "%Y-%m-%dT%H:%M:%S"))
branches = {}
- pathlist = el.getElementsByTagName("paths")[0]
+ try:
+ pathlist = el.getElementsByTagName("paths")[0]
+ except IndexError: #we got an empty revision
+ continue
for p in pathlist.getElementsByTagName("path"):
action = p.getAttribute("action")
path = "".join([t.data for t in p.childNodes])
Thanks!
Sarah
More information about the devel
mailing list