Commit 4b37d61a authored by rogerta@chromium.org's avatar rogerta@chromium.org
parent f01196a6
......@@ -1463,9 +1463,7 @@ class MercurialVCS(VersionControlSystem):
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 @@ class MercurialVCS(VersionControlSystem):
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 @@ class MercurialVCS(VersionControlSystem):
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 @@ def RealMain(argv, data=None):
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 @@ def RealMain(argv, data=None):
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)
......
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