[Buildbot-devel] P4Poller generates exception with Perforce 2009.1 and above

Douglas Leeder douglas.leeder.ext at sophos.com
Thu Jan 21 16:31:43 UTC 2010


Perforce version 2009.1 introduces a new type of operation that breaks
P4Poller: move/delete

This causes traceback of the form:

2010/01/21 03:40 +0100 [-] P4 poll failed: [Failure instance: Traceback:
<type 'exceptions.AssertionError'>: Invalid
file line: '...
//depot/CoreProducts/Tests/dev/maintenance/conan/conan_module_tests/.p4ignore#2
move/delete'
/usr/lib/python2.5/site-packages/twisted/internet/defer.py:304:_startRunCallbacks

/usr/lib/python2.5/site-packages/twisted/internet/defer.py:317:_runCallbacks

/usr/lib/python2.5/site-packages/twisted/internet/defer.py:281:_continue

/usr/lib/python2.5/site-packages/twisted/internet/defer.py:277:unpause
        --- <exception caught here> ---

/usr/lib/python2.5/site-packages/twisted/internet/defer.py:317:_runCallbacks

/usr/lib/python2.5/site-packages/buildbot/changes/p4poller.py:188:_process_describe
        ]


in the twisted.log files.

I believe the following patch should fix it:

--- a/buildbot/changes/p4poller.py
+++ b/buildbot/changes/p4poller.py
@@ -34,7 +34,7 @@ class P4Source(base.ChangeSource, util.ComparableMixin):
             r"Change (?P<num>\d+) on \S+ by \S+@\S+ '.+'$")
     describe_header_re = re.compile(
             r"Change \d+ by (?P<who>\S+)@\S+ on (?P<when>.+)$")
-    file_re = re.compile(r"^\.\.\. (?P<path>[^#]+)#\d+ \w+$")
+    file_re = re.compile(r"^\.\.\. (?P<path>[^#]+)#\d+ [/\w]+$")
     datefmt = '%Y/%m/%d %H:%M:%S'

     parent = None # filled in when we're added


Thanks.




More information about the devel mailing list