diff options
author | Shenghou Ma <minux.ma@gmail.com> | 2014-05-20 14:02:57 -0400 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2014-05-20 14:02:57 -0400 |
commit | dfbb2a95bfdc6ddff22b8f197371b7abffe7d507 (patch) | |
tree | 777e891d304721500365924f88bcbdd696ed58f7 | |
parent | b28aa1f1ecfd54178e4074670a4f2fa708ef0cf0 (diff) | |
download | go-dfbb2a95bfdc6ddff22b8f197371b7abffe7d507.tar.gz go-dfbb2a95bfdc6ddff22b8f197371b7abffe7d507.zip |
undo CL 84040045 / 5302b4c58aa0
This idea was rejected in CL 5731059. We should fix the
runtime docs instead.
««« original CL description
cmd/dist: reflect local changes to tree in goversion
runtime.Version() requires a trailing "+" when
tree had local modifications at time of build.
Fixes #7701
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/84040045
»»»
LGTM=rsc, mra
R=iant, rsc, mra
CC=golang-codereviews
https://golang.org/cl/100520043
-rw-r--r-- | src/cmd/dist/build.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/cmd/dist/build.c b/src/cmd/dist/build.c index 5d90628829..59852b0120 100644 --- a/src/cmd/dist/build.c +++ b/src/cmd/dist/build.c @@ -242,13 +242,12 @@ findgoversion(void) { char *tag, *rev, *p; int i, nrev; - Buf b, path, bmore, bplus, branch; + Buf b, path, bmore, branch; Vec tags; binit(&b); binit(&path); binit(&bmore); - binit(&bplus); binit(&branch); vinit(&tags); @@ -315,16 +314,11 @@ findgoversion(void) // Add extra information. run(&bmore, goroot, CheckExit, "hg", "log", "--template", " +{node|short} {date|date}", "-r", rev, nil); chomp(&bmore); - // Generate a list of local modifications, if any. - run(&bplus, goroot, CheckExit, "hg", "status", "-m", "-a", "-r", "-d", nil); - chomp(&bplus); } bprintf(&b, "%s", tag); if(bmore.len > 0) bwriteb(&b, &bmore); - if(bplus.len > 0) - bwritestr(&b, " +"); // Cache version. writefile(&b, bstr(&path), 0); @@ -336,7 +330,6 @@ done: bfree(&b); bfree(&path); bfree(&bmore); - bfree(&bplus); bfree(&branch); vfree(&tags); |