Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
76ea456e
Commit
76ea456e
authored
Sep 28, 2011
by
Yasuhiro Matsumoto
Committed by
Russ Cox
Sep 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hgpatch: do not use hg exit status
Fixes #2243. R=rsc CC=golang-dev
https://golang.org/cl/5146041
parent
394842e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
main.go
src/cmd/hgpatch/main.go
+4
-3
No files found.
src/cmd/hgpatch/main.go
View file @
76ea456e
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment