-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: Subversion VCS build information should be included in the build #73444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
do you want to submit a change? |
The existing implementation lacks the Status function for retrieving VCS build information for Subversion. As a consequence, binaries aren't stamped with the Revision, CommitTime and Uncommitted information from SVN repositories. This change provides the svnStatus function and retrieves the information by running svn info and svn status commands. Fixes golang#73444
The existing implementation lacks the Status function for retrieving VCS build information for Subversion. As a consequence, binaries aren't stamped with the Revision, CommitTime and Uncommitted information from SVN repositories. This change provides the svnStatus function and retrieves the information by running svn info and svn status commands. Fixes golang#73444
Change https://go.dev/cl/666875 mentions this issue: |
Thanks, I submitted the change. |
@samthanawalla not sure why you said in CL 630195 this needed to be a proposal? |
@seankhliao Truthfully, I don't remember why I wrote that. 🤷 In any case, it seems like we should definitely add this. |
Go version
go version go1.24.2 freebsd/amd64
Output of
go env
in your module/workspace:What did you do?
Consider an example SVN repository containing an example program reading out the VCS build information:
$ svn info Path: . Working Copy Root Path: /tmp/example URL: file:///tmp/svn Relative URL: ^/ Repository Root: file:///tmp/svn Repository UUID: 06cb4ac0-f01c-f011-8e60-309c239b96ba Revision: 5 Node Kind: directory Schedule: normal Last Changed Author: user Last Changed Rev: 5 Last Changed Date: 2025-04-19 12:22:27 +0200 (Sat, 19 Apr 2025) $ svn list go.mod main.go
Executing the resulting binary
example
should list the SVN related informations.What did you see happen?
No VCS build information is printed.
What did you expect to see?
Considering the above output of
svn info
and the specific outputs ofI expected to see an output similar to this:
$ ./example vcs: svn vcs.revision: 5 vcs.time: 2025-04-19T10:22:27.784965Z vcs.modified: false
Reading
src/cmd/go/internal/vcs/vcs.go
reveales thatvcsSvn
currently doesn't set aStatus
function to retrieve this information likevcsBzr
,vcsFossil
,vcsGit
andvcsHg
do.A prototype for such a function could be:
I tested this prototype with my example program and it produced the expected output above.
The text was updated successfully, but these errors were encountered: