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) |