[Buildbot-commits] buildbot/buildbot/changes svnpoller.py,1.2,1.3

Brian Warner warner at users.sourceforge.net
Mon Oct 2 00:13:28 UTC 2006


Update of /cvsroot/buildbot/buildbot/buildbot/changes
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17160/buildbot/changes

Modified Files:
	svnpoller.py 
Log Message:
[project @ svnpoller: clean up timestamps, unicode usage]

Original author: warner at lothar.com
Date: 2006-10-02 00:03:58

Index: svnpoller.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/changes/svnpoller.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- svnpoller.py	2 Oct 2006 00:13:18 -0000	1.2
+++ svnpoller.py	2 Oct 2006 00:13:26 -0000	1.3
@@ -392,15 +392,27 @@
             # of that string up to b.s.source.SVN methods
             revision = int(el.getAttribute("revision"))
             dbgMsg("Adding change revision %s" % (revision,))
+            # TODO: the rest of buildbot may not be ready for unicode 'who'
+            # values
             author   = self._get_text(el, "author")
             comments = self._get_text(el, "msg")
-            when     = self._get_text(el, "date")
-            when     = time.mktime(time.strptime("%.19s" % when,
-                                                 "%Y-%m-%dT%H:%M:%S"))
+            # there is a "date" field, but it provides localtime in the
+            # repository's timezone, whereas we care about buildmaster's
+            # localtime (since this will get used to position the boxes on
+            # the Waterfall display, etc). So ignore the date field and use
+            # our local clock instead.
+            #when     = self._get_text(el, "date")
+            #when     = time.mktime(time.strptime("%.19s" % when,
+            #                                     "%Y-%m-%dT%H:%M:%S"))
             branches = {}
             pathlist = el.getElementsByTagName("paths")[0]
             for p in pathlist.getElementsByTagName("path"):
                 path = "".join([t.data for t in p.childNodes])
+                # the rest of buildbot is certaily not yet ready to handle
+                # unicode filenames, because they get put in RemoteCommands
+                # which get sent via PB to the buildslave, and PB doesn't
+                # handle unicode.
+                path = path.encode("ascii")
                 if path.startswith("/"):
                     path = path[1:]
                 where = self._transform_path(path)
@@ -417,7 +429,6 @@
                            files=branches[branch],
                            comments=comments,
                            revision=revision,
-                           when=when,
                            branch=branch)
                 changes.append(c)
 





More information about the Commits mailing list