mirror of
https://github.com/golang/go
synced 2024-11-26 01:57:56 -07:00
hgpatch: do not use hg exit status
Fixes #2243. R=rsc CC=golang-dev https://golang.org/cl/5146041
This commit is contained in:
parent
394842e2a5
commit
76ea456e45
@ -268,9 +268,10 @@ func hgRoot() (string, os.Error) {
|
|||||||
|
|
||||||
// hgIncoming returns true if hg sync will pull in changes.
|
// hgIncoming returns true if hg sync will pull in changes.
|
||||||
func hgIncoming() bool {
|
func hgIncoming() bool {
|
||||||
// hg -q incoming exits 0 when there is nothing incoming, 1 otherwise.
|
// Cannot trust hg's exit code on Windows,
|
||||||
_, err := run([]string{"hg", "-q", "incoming"}, nil)
|
// so look at whether hg prints any output.
|
||||||
return err == nil
|
out, _ := run([]string{"hg", "-q", "incoming"}, nil)
|
||||||
|
return len(out) > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// hgModified returns a list of the modified files in the
|
// hgModified returns a list of the modified files in the
|
||||||
|
Loading…
Reference in New Issue
Block a user