[Buildbot-commits] [Buildbot] #1775: git_buildbot.py can misreport file names

Buildbot nobody at buildbot.net
Thu Jan 20 16:12:37 UTC 2011


#1775: git_buildbot.py can misreport file names
--------------------+-------------------------
Reporter:  0x4b     |      Owner:
    Type:  defect   |     Status:  new
Priority:  minor    |  Milestone:  undecided
 Version:  0.8.3p1  |   Keywords:  git contrib
--------------------+-------------------------
 In master/contrib/git_buildbot.py the construction of dummy (rollback)
 changes has a regular expression that is a bit too agressive. The result
 is that file names beginning with one of {M A D} lose their first
 character. This can lead to problem correctly filtering on the path.

 I believe the patch below solves the problem -- make the whitespace
 between the modify/add/delete indicator and the file name being matched
 required (+) not optional (*).


 {{{
 --- a/master/contrib/git_buildbot.py
 +++ b/master/contrib/git_buildbot.py
 @@ -214,7 +214,7 @@
              if not line:
                  break

 +            file = re.match(r"^:.*[MAD]\s*(.+)$", line).group(1)
 -            file = re.match(r"^:.*[MAD]\s+(.+)$", line).group(1)
              logging.debug("  Rewound file: %s" % file)
              files.append(unicode(file, encoding=encoding))

 }}}

-- 
Ticket URL: <http://trac.buildbot.net/ticket/1775>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list