Commit 1e0efcd5 authored by Hector Chu's avatar Hector Chu Committed by Russ Cox

codereview: fix hg change on Windows

hg change fails on Windows with 'No valid patches found in output from hg diff'.

R=rsc
CC=golang-dev
https://golang.org/cl/4006043
parent a441037f
......@@ -2607,7 +2607,7 @@ class MercurialVCS(VersionControlSystem):
self.base_rev = self.options.revision
else:
mqparent, err = RunShellWithReturnCode(['hg', 'log', '--rev', 'qparent', '--template={node}'])
if not err:
if not err and mqparent != "":
self.base_rev = mqparent
else:
self.base_rev = RunShell(["hg", "parents", "-q"]).split(':')[1].strip()
......
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