mirror of
https://github.com/golang/go
synced 2024-11-25 16:07: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.
|
||||
func hgIncoming() bool {
|
||||
// hg -q incoming exits 0 when there is nothing incoming, 1 otherwise.
|
||||
_, err := run([]string{"hg", "-q", "incoming"}, nil)
|
||||
return err == nil
|
||||
// Cannot trust hg's exit code on Windows,
|
||||
// so look at whether hg prints any output.
|
||||
out, _ := run([]string{"hg", "-q", "incoming"}, nil)
|
||||
return len(out) > 0
|
||||
}
|
||||
|
||||
// hgModified returns a list of the modified files in the
|
||||
|
Loading…
Reference in New Issue
Block a user