Commit e8ac5661 authored by ojan@chromium.org's avatar ojan@chromium.org

2010-06-10 Ojan Vafai <ojan@chromium.org>

        Reviewed by Eric Seidel.

        upload all patches that lack in-rietveld to rietveld
        https://bugs.webkit.org/show_bug.cgi?id=40444

        If it's a patch, then we'll try to upload it as long as it
        doesn't have in-rietveld set. No longer set in-rietveld? since
        it's not needed.

        * Scripts/webkitpy/common/net/bugzilla.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@61047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8d54d6d3
2010-06-10 Ojan Vafai <ojan@chromium.org>
Reviewed by Eric Seidel.
upload all patches that lack in-rietveld to rietveld
https://bugs.webkit.org/show_bug.cgi?id=40444
If it's a patch, then we'll try to upload it as long as it
doesn't have in-rietveld set. No longer set in-rietveld? since
it's not needed.
* Scripts/webkitpy/common/net/bugzilla.py:
2010-06-10 Ojan Vafai <ojan@chromium.org>
Reviewed by Darin Fisher.
......
......@@ -205,8 +205,7 @@ class Bug(object):
return filter(lambda patch: patch.committer(), patches)
def in_rietveld_queue_patches(self):
return [patch for patch in self.patches() if (
patch.in_rietveld() == "?" or patch.in_rietveld() == None and patch.review() == "?")]
return [patch for patch in self.patches() if patch.in_rietveld() == None]
# A container for all of the logic for making and parsing buzilla queries.
......@@ -271,7 +270,9 @@ class BugzillaQueries(object):
return sum([self._fetch_bug(bug_id).commit_queued_patches()
for bug_id in self.fetch_bug_ids_from_commit_queue()], [])
def _fetch_rietveld_queue_patch(self, query_url):
def fetch_first_patch_from_rietveld_queue(self):
# rietveld-queue processes all patches that don't have in-rietveld set.
query_url = "buglist.cgi?query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=flagtypes.name&type0-0-0=notsubstring&value0-0-0=in-rietveld&field0-1-0=attachments.ispatch&type0-1-0=equals&value0-1-0=1&order=Last+Changed&field0-2-0=attachments.isobsolete&type0-2-0=equals&value0-2-0=0"
bugs = self._fetch_bug_ids_advanced_query(query_url)
if not len(bugs):
return None
......@@ -279,22 +280,6 @@ class BugzillaQueries(object):
patches = self._fetch_bug(bugs[0]).in_rietveld_queue_patches()
return patches[0] if len(patches) else None
def fetch_first_patch_from_rietveld_queue(self):
# rietveld-queue processes in-rietveld? patches and then marks them in-rietveld-/+.
# in-rietveld? patches
rietveld_queue_url = "buglist.cgi?query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=flagtypes.name&type0-0-0=equals&value0-0-0=in-rietveld%3F&order=Last+Changed"
patch = self._fetch_rietveld_queue_patch(rietveld_queue_url)
if patch:
return patch
# review? patches that don't have an in-rietveld flag.
review_queue_url = "buglist.cgi?query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=flagtypes.name&type0-0-0=equals&value0-0-0=review%3F&field0-1-0=flagtypes.name&type0-1-0=notsubstring&value0-1-0=in-rietveld&order=Last+Changed"
patch = self._fetch_rietveld_queue_patch(review_queue_url)
if patch:
return patch
return None
def _fetch_bug_ids_from_review_queue(self):
review_queue_url = "buglist.cgi?query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=flagtypes.name&type0-0-0=equals&value0-0-0=review?"
return self._fetch_bug_ids_advanced_query(review_queue_url)
......@@ -638,12 +623,6 @@ class Bugzilla(object):
else:
self.browser['flag_type-3'] = ('X',)
try:
# Add all patches to the rietveld upload queue.
self.browser['flag_type-4'] = ('?',)
except ControlNotFoundError, e:
pass # If there is no rietveld flag, we can't set it.
if bug_id:
patch_name = "bug-%s-%s.patch" % (bug_id, timestamp())
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment