[Buildbot-commits] buildbot/buildbot/changes hgbuildbot.py, 1.1, 1.2

Brian Warner warner at users.sourceforge.net
Thu Jul 26 22:12:46 UTC 2007


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

Modified Files:
	hgbuildbot.py 
Log Message:
[project @ hgbuildbot.py: make it compatible with both mercurial 0.9.1 and the current 0.9.4]

Original author: warner at lothar.com
Date: 2007-07-26 22:11:59+00:00

Index: hgbuildbot.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/changes/hgbuildbot.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- hgbuildbot.py	26 Jul 2007 19:38:44 -0000	1.1
+++ hgbuildbot.py	26 Jul 2007 22:12:44 -0000	1.2
@@ -5,13 +5,6 @@
 # This software may be used and distributed according to the terms
 # of the GNU General Public License, incorporated herein by reference.
 
-from mercurial.demandload import *
-from mercurial.i18n import gettext as _
-from mercurial.node import *
-from buildbot.clients import sendchange
-from twisted.internet import defer, reactor
-demandload(globals(), "os sys mercurial:hg,util")
-
 # hook extension to send change notifications to buildbot when a changeset is
 # brought into the repository from elsewhere.
 #
@@ -38,6 +31,24 @@
 #
 #   branch = branchname                  # if set, branch is always branchname
 
+import os
+
+from mercurial.i18n import gettext as _
+from mercurial.node import bin, hex
+
+# mercurial's on-demand-importing hacks interfere with the:
+#from zope.interface import Interface
+# that Twisted needs to do, so disable it.
+try:
+    from mercurial import demandimport
+    demandimport.disable()
+except ImportError:
+    pass
+
+from buildbot.clients import sendchange
+from twisted.internet import defer, reactor
+
+
 def hook(ui, repo, hooktype, node=None, source=None, **kwargs):
     # read config parameters
     master = ui.config('hgbuildbot', 'master')





More information about the Commits mailing list