Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: gcl.py

Issue 9233057: Update upload.py @ fae51921ad9d (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Rebase against HEAD Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | git_cl.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcl.py
diff --git a/gcl.py b/gcl.py
index bd815382a8b2c7ca92261eb96e3b371673672741..4a7a5afd9fb05648ef087833c1c0abab832d5d86 100755
--- a/gcl.py
+++ b/gcl.py
@@ -285,7 +285,6 @@ class ChangeInfo(object):
self.issue = int(issue)
self.patchset = int(patchset)
self._description = None
- self._subject = None
self._reviewers = None
self._set_description(description)
if files is None:
@@ -310,19 +309,11 @@ class ChangeInfo(object):
parsed_lines = []
reviewers_re = re.compile(REVIEWERS_REGEX)
reviewers = ''
- subject = ''
for l in description.splitlines():
- if not subject:
- subject = l
matched_reviewers = reviewers_re.match(l)
if matched_reviewers:
reviewers = matched_reviewers.group(1).split(',')
parsed_lines.append(l)
-
- if len(subject) > 100:
- subject = subject[:97] + '...'
-
- self._subject = subject
self._reviewers = reviewers
self._description = '\n'.join(parsed_lines)
@@ -332,10 +323,6 @@ class ChangeInfo(object):
def reviewers(self):
return self._reviewers
- @property
- def subject(self):
- return self._subject
-
def NeedsUpload(self):
return self.needs_upload
@@ -859,18 +846,14 @@ def CMDupload(change_info, args):
desc_file = None
try:
- if change_info.issue: # Uploading a new patchset.
- found_message = False
- for arg in args:
- if arg.startswith("--message") or arg.startswith("-m"):
- found_message = True
- break
-
- if not found_message:
- upload_arg.append("--message=''")
-
+ if change_info.issue:
+ # Uploading a new patchset.
upload_arg.append("--issue=%d" % change_info.issue)
- else: # First time we upload.
+
+ if not any(i.startswith('--message') or i.startswith('-m') for i in args):
+ upload_arg.append('--title= ')
+ else:
+ # First time we upload.
handle, desc_file = tempfile.mkstemp(text=True)
os.write(handle, change_info.description)
os.close(handle)
@@ -888,9 +871,7 @@ def CMDupload(change_info, args):
cc_list = ','.join(filter(None, [cc_list] + watchers))
if cc_list:
upload_arg.append("--cc=" + cc_list)
- upload_arg.append("--description_file=%s" % desc_file)
- if change_info.subject:
- upload_arg.append("--message=" + change_info.subject)
+ upload_arg.append("--file=%s" % desc_file)
if GetCodeReviewSetting("PRIVATE") == "True":
upload_arg.append("--private")
« no previous file with comments | « no previous file | git_cl.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698