1
0
mirror of https://github.com/golang/go synced 2024-11-12 01:00:22 -07:00

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
This commit is contained in:
Hector Chu 2011-01-19 19:02:47 -05:00 committed by Russ Cox
parent a441037f3f
commit 1e0efcd579

View File

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