Ticket #328 (closed defect: fixed)

Opened 4 months ago

Last modified 3 months ago

buildbot.changes.hgbuildbot: repo.changelog.extract renamed/changed

Reported by: xyld Assigned to:
Priority: major Milestone: 0.7.9
Component: changesources Version: 0.7.8
Keywords: hg mercurial devtree Cc: dustin

Description

In revision:

changeset:   5744:9db7fd77417d
user:        Matt Mackall <mpm@selenic.com>
date:        Thu Dec 27 23:55:40 2007 -0600
summary:     changelog: remove extract function
-    def extract(self, text):
+    def read(self, node):
         """
         format used:
         nodeid\n        : manifest node in ascii
@@ -149,6 +146,7 @@
 
         changelog v0 doesn't use extra
         """
+        text = self.revision(node)
         if not text:
             return (nullid, "", (0, 0), [], "", {'branch': 'default'})
         last = text.index("\n\n")
@@ -175,10 +173,7 @@
         files = l[3:]
         return (manifest, user, (time, timezone), files, desc, extra)
 
-    def read(self, node):
-        return self.extract(self.revision(node))
-

Please change buildbot.changes.hgbuildbot like:

diff -ru buildbot-0.7.7/buildbot/changes/hgbuildbot.py buildbot-0.7.7-patched/buildbot/changes/hgbuildbot.py
--- buildbot-0.7.7/buildbot/changes/hgbuildbot.py       2008-03-29 21:30:17.000000000 -0500
+++ buildbot-0.7.7-patched/buildbot/changes/hgbuildbot.py       2008-08-06 18:34:42.636308000 -0500
@@ -83,7 +83,7 @@
         for rev in xrange(start, end):
             # send changeset
             n = repo.changelog.node(rev)
-            changeset=repo.changelog.extract(repo.changelog.revision(n))
+            changeset=repo.changelog.read(n)
             change = {
                 'master': master,
                 # note: this is more likely to be a full email address, which

Thanks.

Change History

08/06/08 16:42:52 changed by xyld

Hmm. That fixed the mercurial state of affairs, however, it broke something nasty on buildbot/twisted side.

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Twisted-8.1.0-py2.5-linux-x86_64.egg/twisted/internet/base.py", line 374, in fireEvent
    DeferredList(beforeResults).addCallback(self._continueFiring)
  File "/usr/lib/python2.5/site-packages/Twisted-8.1.0-py2.5-linux-x86_64.egg/twisted/internet/defer.py", line 195, in addCallback
    callbackKeywords=kw)
  File "/usr/lib/python2.5/site-packages/Twisted-8.1.0-py2.5-linux-x86_64.egg/twisted/internet/defer.py", line 186, in addCallbacks
    self._runCallbacks()
  File "/usr/lib/python2.5/site-packages/Twisted-8.1.0-py2.5-linux-x86_64.egg/twisted/internet/defer.py", line 328, in _runCallbacks
    self.result = callback(self.result, *args, **kw)
--- <exception caught here> ---
  File "/usr/lib/python2.5/site-packages/Twisted-8.1.0-py2.5-linux-x86_64.egg/twisted/internet/base.py", line 387, in _continueFiring
    callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/Twisted-8.1.0-py2.5-linux-x86_64.egg/twisted/internet/base.py", line 1002, in _handleSignals
    signal.signal(signal.SIGTERM, self.sigTerm)
exceptions.ValueError: signal only works in main thread

Any help would be awesome.

08/07/08 06:57:14 changed by xyld

Sorry. I guess I was using 0.7.7 when it blew up. 0.7.8 has fixed that. However, the original issue is still an issue. Please patch.

08/18/08 15:09:17 changed by dustin

  • cc set to dustin.

08/19/08 12:48:53 changed by dustin

  • status changed from new to closed.
  • resolution set to fixed.

08/30/08 13:16:23 changed by dustin

  • keywords changed from hg mercurial to hg mercurial devtree.
  • status changed from closed to reopened.
  • resolution deleted.

08/30/08 14:30:52 changed by dustin

  • milestone changed from undecided to 0.7.9.

09/03/08 15:14:56 changed by warner

What version of mercurial was affected by that change? What sort of dependencies would this patch introduce? We may need to update the buildbot docs to say "only works with hg-1.x.x or higher" or something.

09/04/08 23:31:06 changed by djc

This changed between hg 0.9.5 and 1.0.

09/04/08 23:57:07 changed by djc

BTW, a better way of doing this in 1.0 would be through the use of a changectx(). That is, use ctx = repo.changectx(n), then ctx.manifest(), ctx.user(), etc.

09/11/08 22:24:53 changed by warner

  • status changed from reopened to closed.
  • resolution set to fixed.

committed. Feel free to add a new ticket with the changectx() improvement.