Skip to content
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

x/tools/go/vcs: package could provide an id of current working index #10159

Closed
krnowak opened this issue Mar 13, 2015 · 1 comment
Closed

x/tools/go/vcs: package could provide an id of current working index #10159

krnowak opened this issue Mar 13, 2015 · 1 comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@krnowak
Copy link

krnowak commented Mar 13, 2015

Something like:

rr, _ := vcs.RepoRootForImportPath("github.com/golang/go", false)
fmt.Println("Current working change id:", rr.Cmd.GetId())

The GetId() function prototype could be func (v *Cmd) GetId() (string, error) and getting an id means:

  1. git - git rev-parse HEAD
  2. hg - hg id -i
  3. bzr - bzr revno
  4. svn - svnversion

The subversion here is an odd man out, which might be troublesome as the code in vcs package assumes that a command stored in Cmd member can provide all info.

My use case is creating container images from given project, so the created image could have a vcs info in its (JSON) metadata, for example git: 66199afb25487fd75bf870c72bc3cea33d95f89e

@mikioh mikioh changed the title vcs package could provide an id of current working index go/vcs: package could provide an id of current working index Mar 14, 2015
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title go/vcs: package could provide an id of current working index x/tools/go/vcs: package could provide an id of current working index Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the repo-tools label Apr 14, 2015
@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 26, 2023
@dmitshur
Copy link
Contributor

Thanks for the report. This package has been deprecated in #57051 and won't receive further development, so closing this as not planned.

@dmitshur dmitshur closed this as not planned Won't fix, can't repro, duplicate, stale Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants