[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
eric at webkit.org
eric at webkit.org
Tue Jan 5 23:40:40 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 489723f808ed9e67da38dbf94f2a96bbf7813e16
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 2 09:04:55 2009 +0000
2009-12-02 Eric Seidel <eric at webkit.org>
Reviewed by Adam Barth.
trim commands/*.py includes now that commands are unit tested
https://bugs.webkit.org/show_bug.cgi?id=32056
In the course of ensuring that the unit tests still
passed after this change, I had to actually make them
pass in the first place.
* Scripts/modules/bugzilla.py:
- Fix _parse_attachment_ids_request_query to return ints instead of strings.
* Scripts/modules/commands/download.py: Remove unneeded imports.
* Scripts/modules/commands/queries.py: Ditto.
* Scripts/modules/commands/queues.py: Ditto.
* Scripts/modules/commands/upload.py: Ditto.
* Scripts/modules/scm_unittest.py:
- Fix to expect the \n after the path since echo adds an \n.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51590 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 8d3a3da..dd55514 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,23 @@
+2009-12-02 Eric Seidel <eric at webkit.org>
+
+ Reviewed by Adam Barth.
+
+ trim commands/*.py includes now that commands are unit tested
+ https://bugs.webkit.org/show_bug.cgi?id=32056
+
+ In the course of ensuring that the unit tests still
+ passed after this change, I had to actually make them
+ pass in the first place.
+
+ * Scripts/modules/bugzilla.py:
+ - Fix _parse_attachment_ids_request_query to return ints instead of strings.
+ * Scripts/modules/commands/download.py: Remove unneeded imports.
+ * Scripts/modules/commands/queries.py: Ditto.
+ * Scripts/modules/commands/queues.py: Ditto.
+ * Scripts/modules/commands/upload.py: Ditto.
+ * Scripts/modules/scm_unittest.py:
+ - Fix to expect the \n after the path since echo adds an \n.
+
2009-12-01 Yaar Schnitman <yaar at chromium.org>
build-webkit: Remove flex,bison,gperf check for chromium
diff --git a/WebKitTools/Scripts/bugzilla-tool b/WebKitTools/Scripts/bugzilla-tool
index 736f11c..764a138 100755
--- a/WebKitTools/Scripts/bugzilla-tool
+++ b/WebKitTools/Scripts/bugzilla-tool
@@ -32,12 +32,16 @@
import os
+from modules.bugzilla import Bugzilla
+from modules.buildbot import BuildBot
from modules.buildsteps import BuildSteps
from modules.commands.download import *
from modules.commands.queries import *
from modules.commands.queues import *
from modules.commands.upload import *
from modules.logging import log
+from modules.multicommandtool import MultiCommandTool
+from modules.scm import detect_scm_system
class BugzillaTool(MultiCommandTool):
def __init__(self):
diff --git a/WebKitTools/Scripts/modules/bugzilla.py b/WebKitTools/Scripts/modules/bugzilla.py
index 2fbb4c2..dd2e569 100644
--- a/WebKitTools/Scripts/modules/bugzilla.py
+++ b/WebKitTools/Scripts/modules/bugzilla.py
@@ -313,7 +313,7 @@ class Bugzilla:
digits = re.compile("\d+")
attachment_href = re.compile("attachment.cgi\?id=\d+&action=review")
attachment_links = SoupStrainer("a", href=attachment_href)
- return [digits.search(tag["href"]).group(0) for tag in BeautifulSoup(page, parseOnlyThese=attachment_links)]
+ return [int(digits.search(tag["href"]).group(0)) for tag in BeautifulSoup(page, parseOnlyThese=attachment_links)]
def _fetch_attachment_ids_request_query(self, query):
return self._parse_attachment_ids_request_query(urllib2.urlopen(query))
diff --git a/WebKitTools/Scripts/modules/commands/download.py b/WebKitTools/Scripts/modules/commands/download.py
index 31af133..2a1347a 100644
--- a/WebKitTools/Scripts/modules/commands/download.py
+++ b/WebKitTools/Scripts/modules/commands/download.py
@@ -28,31 +28,19 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# FIXME: Trim down this import list once we have unit tests.
import os
-import re
-import StringIO
-import subprocess
-import sys
-import time
-from datetime import datetime, timedelta
from optparse import make_option
-from modules.bugzilla import Bugzilla, parse_bug_id
-from modules.buildbot import BuildBot
+from modules.bugzilla import parse_bug_id
from modules.buildsteps import BuildSteps
from modules.changelogs import ChangeLog
from modules.comments import bug_comment_from_commit_text
from modules.grammar import pluralize
from modules.landingsequence import LandingSequence, ConditionalLandingSequence
-from modules.logging import error, log, tee
-from modules.multicommandtool import MultiCommandTool, Command
-from modules.patchcollection import PatchCollection
-from modules.scm import CommitMessage, detect_scm_system, ScriptError, CheckoutNeedsUpdate
-from modules.statusbot import StatusBot
-from modules.webkitport import WebKitPort
-from modules.workqueue import WorkQueue, WorkQueueDelegate
+from modules.logging import error, log
+from modules.multicommandtool import Command
+from modules.scm import ScriptError
class BuildSequence(ConditionalLandingSequence):
diff --git a/WebKitTools/Scripts/modules/commands/queries.py b/WebKitTools/Scripts/modules/commands/queries.py
index dbaa159..dfbc0c8 100644
--- a/WebKitTools/Scripts/modules/commands/queries.py
+++ b/WebKitTools/Scripts/modules/commands/queries.py
@@ -28,30 +28,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# FIXME: Trim down this import list once we have unit tests.
-import os
-import re
-import StringIO
-import subprocess
-import sys
-import time
-
-from datetime import datetime, timedelta
+
from optparse import make_option
-from modules.bugzilla import Bugzilla, parse_bug_id
from modules.buildbot import BuildBot
-from modules.changelogs import ChangeLog
-from modules.comments import bug_comment_from_commit_text
-from modules.grammar import pluralize
-from modules.landingsequence import LandingSequence, ConditionalLandingSequence
-from modules.logging import error, log, tee
-from modules.multicommandtool import MultiCommandTool, Command
-from modules.patchcollection import PatchCollection
-from modules.scm import CommitMessage, detect_scm_system, ScriptError, CheckoutNeedsUpdate
-from modules.statusbot import StatusBot
-from modules.webkitport import WebKitPort
-from modules.workqueue import WorkQueue, WorkQueueDelegate
+from modules.logging import log
+from modules.multicommandtool import Command
class BugsToCommit(Command):
name = "bugs-to-commit"
diff --git a/WebKitTools/Scripts/modules/commands/queues.py b/WebKitTools/Scripts/modules/commands/queues.py
index df56ef6..5d2e481 100644
--- a/WebKitTools/Scripts/modules/commands/queues.py
+++ b/WebKitTools/Scripts/modules/commands/queues.py
@@ -28,28 +28,18 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# FIXME: Trim down this import list once we have unit tests.
-import os
import re
-import StringIO
-import subprocess
-import sys
-import time
-from datetime import datetime, timedelta
+from datetime import datetime
from optparse import make_option
-from modules.bugzilla import Bugzilla, parse_bug_id
-from modules.buildbot import BuildBot
-from modules.changelogs import ChangeLog
-from modules.comments import bug_comment_from_commit_text
from modules.grammar import pluralize
from modules.landingsequence import LandingSequence, ConditionalLandingSequence, LandingSequenceErrorHandler
-from modules.logging import error, log, tee
-from modules.multicommandtool import MultiCommandTool, Command
+from modules.logging import error, log
+from modules.multicommandtool import Command
from modules.patchcollection import PatchCollection, PersistentPatchCollection, PersistentPatchCollectionDelegate
from modules.processutils import run_and_throw_if_fail
-from modules.scm import CommitMessage, detect_scm_system, ScriptError, CheckoutNeedsUpdate
+from modules.scm import ScriptError
from modules.statusbot import StatusBot
from modules.webkitport import WebKitPort
from modules.workqueue import WorkQueue, WorkQueueDelegate
diff --git a/WebKitTools/Scripts/modules/commands/upload.py b/WebKitTools/Scripts/modules/commands/upload.py
index 5126153..1f892a1 100644
--- a/WebKitTools/Scripts/modules/commands/upload.py
+++ b/WebKitTools/Scripts/modules/commands/upload.py
@@ -28,30 +28,16 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# FIXME: Trim down this import list once we have unit tests.
import os
-import re
import StringIO
-import subprocess
import sys
-import time
-from datetime import datetime, timedelta
from optparse import make_option
-from modules.bugzilla import Bugzilla, parse_bug_id
-from modules.buildbot import BuildBot
-from modules.changelogs import ChangeLog
-from modules.comments import bug_comment_from_commit_text
+from modules.bugzilla import parse_bug_id
from modules.grammar import pluralize
-from modules.landingsequence import LandingSequence, ConditionalLandingSequence
-from modules.logging import error, log, tee
-from modules.multicommandtool import MultiCommandTool, Command
-from modules.patchcollection import PatchCollection
-from modules.scm import CommitMessage, detect_scm_system, ScriptError, CheckoutNeedsUpdate
-from modules.statusbot import StatusBot
-from modules.webkitport import WebKitPort
-from modules.workqueue import WorkQueue, WorkQueueDelegate
+from modules.logging import error, log
+from modules.multicommandtool import Command
# FIXME: Requires unit test.
class CommitMessageForCurrentDiff(Command):
diff --git a/WebKitTools/Scripts/modules/scm_unittest.py b/WebKitTools/Scripts/modules/scm_unittest.py
index 8d582e7..f0c84af 100644
--- a/WebKitTools/Scripts/modules/scm_unittest.py
+++ b/WebKitTools/Scripts/modules/scm_unittest.py
@@ -403,7 +403,7 @@ class SVNTest(SCMTest):
scripts_path = os.path.join(self.svn_checkout_path, 'WebKitTools', 'Scripts')
os.makedirs(scripts_path)
create_patch_path = os.path.join(scripts_path, 'svn-create-patch')
- write_into_file_at_path(create_patch_path, '#!/bin/sh\necho $PWD')
+ write_into_file_at_path(create_patch_path, '#!/bin/sh\necho $PWD') # We could pass -n to prevent the \n, but not all echo accept -n.
os.chmod(create_patch_path, stat.S_IXUSR | stat.S_IRUSR)
# Change into our test directory and run the create_patch command.
@@ -412,7 +412,7 @@ class SVNTest(SCMTest):
self.assertEqual(scm.checkout_root, self.svn_checkout_path) # Sanity check that detection worked right.
patch_contents = scm.create_patch()
# Our fake 'svn-create-patch' returns $PWD instead of a patch, check that it was executed from the root of the repo.
- self.assertEqual(os.path.realpath(scm.checkout_root), patch_contents)
+ self.assertEqual("%s\n" % os.path.realpath(scm.checkout_root), patch_contents) # Add a \n because echo adds a \n.
def test_detection(self):
scm = detect_scm_system(self.svn_checkout_path)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list