-
Notifications
You must be signed in to change notification settings - Fork 60
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
Get Current version #36
Labels
Comments
BzrIn our handling of Bzr we are currently skipping shared repos. In that case each branch (aliased to clone) is it's own directory. That means we can:
|
SvnGiven the current tt could be done.
|
mattfarina
added a commit
that referenced
this issue
May 3, 2016
Includes: - Fix to SVN versions. There were times an incorrect version would be returned. - Hg now using full hash for versions as it should have been. This fixes a bug.
See #38 for implementation |
mattfarina
added a commit
that referenced
this issue
May 4, 2016
Implements #36: Get current version-ish
Merged |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a loose "version" and is different from the
Version
method which returns a revision. For example, in Git if you're on a branch that name would be returned. If on a tag that name would be returned. Otherwise a revision is returned.This is a little more difficult in other VCS and am still working out the details if it's possible.
Git
git symbolic-ref HEAD
to see if this is a branch and get the name. If not useVersion()
to get the revision andTagsFromCommit()
to get a tag if one is present..git/HEAD
for the first step.Hg
hg parent -T "{node}"
to get current commit. Then compare that tohg parent -r tip -T "{node}"
to see if on the tip of the branch. If so,hg branch
to get the name. Otherwise, useTagsFromCommit()
to see if on a tag to return. Or, return commit id.TODO:
The text was updated successfully, but these errors were encountered: