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

Unified Diff: third_party/upload.py

Issue 10269009: Apply upstream changes from http://code.google.com/p/rietveld/source/detail?r=2972a6fd9a4713862609a… (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: Created 8 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/upload.py
===================================================================
--- third_party/upload.py (revision 134524)
+++ third_party/upload.py (working copy)
@@ -1463,9 +1463,7 @@
return os.path.relpath(absname)
def GenerateDiff(self, extra_args):
- cmd = [
- "hg", "diff", "--color", "never", "--git", "-r", self.base_rev
- ] + extra_args
+ cmd = ["hg", "diff", "--git", "-r", self.base_rev] + extra_args
data = RunShell(cmd, silent_ok=True)
svndiff = []
filecount = 0
@@ -1491,8 +1489,7 @@
def GetUnknownFiles(self):
"""Return a list of files unknown to the VCS."""
args = []
- status = RunShell(
- ["hg", "status", "--color", "never", "--rev", self.base_rev, "-u", "."],
+ status = RunShell(["hg", "status", "--rev", self.base_rev, "-u", "."],
silent_ok=True)
unknown_files = []
for line in status.splitlines():
@@ -1509,9 +1506,7 @@
is_binary = False
oldrelpath = relpath = self._GetRelPath(filename)
# "hg status -C" returns two lines for moved/copied files, one otherwise
- out = RunShell(
- [ "hg", "status", "--color", "never", "-C", "--rev", self.base_rev,
- relpath])
+ out = RunShell(["hg", "status", "-C", "--rev", self.base_rev, relpath])
out = out.splitlines()
# HACK: strip error message about missing file/directory if it isn't in
# the working copy
@@ -2277,12 +2272,10 @@
message = message or title
form_fields.append(("subject", title))
- if message:
- if not options.issue:
- form_fields.append(("description", message))
- else:
- # TODO: [ ] Use /<issue>/publish to add a comment.
- pass
+ # If it's a new issue send message as description. Otherwise a new
+ # message is created below on upload_complete.
+ if message and not options.issue:
+ form_fields.append(("description", message))
# Send a hash of all the base file so the server can determine if a copy
# already exists in an earlier patchset.
@@ -2341,6 +2334,8 @@
payload["send_mail"] = "yes"
if options.send_patch:
payload["attach_patch"] = "yes"
+ if options.issue and message:
+ payload["message"] = message
payload = urllib.urlencode(payload)
rpc_server.Send("/" + issue + "/upload_complete/" + (patchset or ""),
payload=payload)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698