Changeset 80537 in webkit
- Timestamp:
- Mar 7, 2011 9:58:26 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r80536 r80537 1 2011-03-07 Ojan Vafai <ojan@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 add webkit-patch attach-to-bug for posting to bugzilla from the commandline 6 https://bugs.webkit.org/show_bug.cgi?id=55749 7 8 * Scripts/webkitpy/tool/commands/upload.py: 9 * Scripts/webkitpy/tool/commands/upload_unittest.py: 10 * Scripts/webkitpy/tool/steps/__init__.py: 11 * Scripts/webkitpy/tool/steps/attachtobug.py: Added. 12 * Scripts/webkitpy/tool/steps/options.py: 13 1 14 2011-03-07 Daniel Cheng <dcheng@chromium.org> 2 15 -
trunk/Tools/Scripts/webkitpy/tool/commands/upload.py
r77913 r80537 174 174 175 175 176 class AttachToBug(AbstractSequencedCommand): 177 name = "attach-to-bug" 178 help_text = "Attach the the file to the bug" 179 argument_names = "BUGID FILEPATH" 180 steps = [ 181 steps.AttachToBug, 182 ] 183 184 def _prepare_state(self, options, args, tool): 185 state = {} 186 state["bug_id"] = args[0] 187 state["filepath"] = args[1] 188 return state 189 190 176 191 class AbstractPatchUploadingCommand(AbstractSequencedCommand): 177 192 def _bug_id(self, options, args, tool, state): -
trunk/Tools/Scripts/webkitpy/tool/commands/upload_unittest.py
r76926 r80537 69 69 self.assert_execute_outputs(Post(), [42], options=options, expected_stderr=expected_stderr) 70 70 71 def test_attach_to_bug(self): 72 options = MockOptions() 73 options.comment = "extra comment" 74 options.description = "file description" 75 expected_stderr = """MOCK add_attachment_to_bug: bug_id=42, description=file description filename=None 76 -- Begin comment -- 77 extra comment 78 -- End comment -- 79 """ 80 self.assert_execute_outputs(AttachToBug(), [42, "path/to/file.txt", "file description"], options=options, expected_stderr=expected_stderr) 81 82 def test_attach_to_bug_no_description_or_comment(self): 83 options = MockOptions() 84 options.comment = None 85 options.description = None 86 expected_stderr = """MOCK add_attachment_to_bug: bug_id=42, description=file.txt filename=None 87 """ 88 self.assert_execute_outputs(AttachToBug(), [42, "path/to/file.txt"], options=options, expected_stderr=expected_stderr) 89 71 90 def test_land_safely(self): 72 91 expected_stderr = "Obsoleting 2 old patches on bug 42\nMOCK add_patch_to_bug: bug_id=42, description=Patch for landing, mark_for_review=False, mark_for_commit_queue=False, mark_for_landing=True\n" -
trunk/Tools/Scripts/webkitpy/tool/steps/__init__.py
r76926 r80537 30 30 from webkitpy.tool.steps.applypatch import ApplyPatch 31 31 from webkitpy.tool.steps.applypatchwithlocalcommit import ApplyPatchWithLocalCommit 32 from webkitpy.tool.steps.attachtobug import AttachToBug 32 33 from webkitpy.tool.steps.build import Build 33 34 from webkitpy.tool.steps.checkstyle import CheckStyle -
trunk/Tools/Scripts/webkitpy/tool/steps/options.py
r73827 r80537 41 41 component = make_option("--component", action="store", type="string", dest="component", help="Component for the new bug.") 42 42 confirm = make_option("--no-confirm", action="store_false", dest="confirm", default=True, help="Skip confirmation steps.") 43 description = make_option("-m", "--description", action="store", type="string", dest="description", help="Description string for the attachment (default: \"patch\")")43 description = make_option("-m", "--description", action="store", type="string", dest="description", help="Description string for the attachment") 44 44 email = make_option("--email", action="store", type="string", dest="email", help="Email address to use in ChangeLogs.") 45 45 force_clean = make_option("--force-clean", action="store_true", dest="force_clean", default=False, help="Clean working directory before applying patches (removes local changes and commits)")
Note: See TracChangeset
for help on using the changeset viewer.