Commit 4b37d61a authored by rogerta@chromium.org's avatar rogerta@chromium.org
parent f01196a6
...@@ -1463,9 +1463,7 @@ class MercurialVCS(VersionControlSystem): ...@@ -1463,9 +1463,7 @@ class MercurialVCS(VersionControlSystem):
return os.path.relpath(absname) return os.path.relpath(absname)
def GenerateDiff(self, extra_args): def GenerateDiff(self, extra_args):
cmd = [ cmd = ["hg", "diff", "--git", "-r", self.base_rev] + extra_args
"hg", "diff", "--color", "never", "--git", "-r", self.base_rev
] + extra_args
data = RunShell(cmd, silent_ok=True) data = RunShell(cmd, silent_ok=True)
svndiff = [] svndiff = []
filecount = 0 filecount = 0
...@@ -1491,8 +1489,7 @@ class MercurialVCS(VersionControlSystem): ...@@ -1491,8 +1489,7 @@ class MercurialVCS(VersionControlSystem):
def GetUnknownFiles(self): def GetUnknownFiles(self):
"""Return a list of files unknown to the VCS.""" """Return a list of files unknown to the VCS."""
args = [] args = []
status = RunShell( status = RunShell(["hg", "status", "--rev", self.base_rev, "-u", "."],
["hg", "status", "--color", "never", "--rev", self.base_rev, "-u", "."],
silent_ok=True) silent_ok=True)
unknown_files = [] unknown_files = []
for line in status.splitlines(): for line in status.splitlines():
...@@ -1509,9 +1506,7 @@ class MercurialVCS(VersionControlSystem): ...@@ -1509,9 +1506,7 @@ class MercurialVCS(VersionControlSystem):
is_binary = False is_binary = False
oldrelpath = relpath = self._GetRelPath(filename) oldrelpath = relpath = self._GetRelPath(filename)
# "hg status -C" returns two lines for moved/copied files, one otherwise # "hg status -C" returns two lines for moved/copied files, one otherwise
out = RunShell( out = RunShell(["hg", "status", "-C", "--rev", self.base_rev, relpath])
[ "hg", "status", "--color", "never", "-C", "--rev", self.base_rev,
relpath])
out = out.splitlines() out = out.splitlines()
# HACK: strip error message about missing file/directory if it isn't in # HACK: strip error message about missing file/directory if it isn't in
# the working copy # the working copy
...@@ -2277,12 +2272,10 @@ def RealMain(argv, data=None): ...@@ -2277,12 +2272,10 @@ def RealMain(argv, data=None):
message = message or title message = message or title
form_fields.append(("subject", title)) form_fields.append(("subject", title))
if message: # If it's a new issue send message as description. Otherwise a new
if not options.issue: # message is created below on upload_complete.
form_fields.append(("description", message)) if message and not options.issue:
else: form_fields.append(("description", message))
# TODO: [ ] Use /<issue>/publish to add a comment.
pass
# Send a hash of all the base file so the server can determine if a copy # Send a hash of all the base file so the server can determine if a copy
# already exists in an earlier patchset. # already exists in an earlier patchset.
...@@ -2341,6 +2334,8 @@ def RealMain(argv, data=None): ...@@ -2341,6 +2334,8 @@ def RealMain(argv, data=None):
payload["send_mail"] = "yes" payload["send_mail"] = "yes"
if options.send_patch: if options.send_patch:
payload["attach_patch"] = "yes" payload["attach_patch"] = "yes"
if options.issue and message:
payload["message"] = message
payload = urllib.urlencode(payload) payload = urllib.urlencode(payload)
rpc_server.Send("/" + issue + "/upload_complete/" + (patchset or ""), rpc_server.Send("/" + issue + "/upload_complete/" + (patchset or ""),
payload=payload) 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