Skip to content

Add git.get_tag() and svn.get_tag() - #4306

Merged
jgsogo merged 9 commits into
conan-io:developfrom
danimtb:feature/3987
Jan 17, 2019
Merged

jgsogo merged 9 commits into
conan-io:developfrom
danimtb:feature/3987

Conversation

@danimtb

@danimtb danimtb commented Jan 15, 2019

Copy link
Copy Markdown
Member

Changelog: Feature: Added get_tag() methods to tools.Git() and tools.SVN() helpers.
Changelog: Fix: get_branch() method of tools.SVN() helper now returns only the branch name, not the tag when present.
Docs: conan-io/docs#1020

@tags: svn, slow

  • Refer to the issue that supports this Pull Request: closes Support for git describe --tags in tools.Git #3987
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.

@ghost ghost assigned danimtb Jan 15, 2019
@ghost ghost added the stage: review label Jan 15, 2019
@danimtb danimtb assigned jgsogo and unassigned danimtb Jan 16, 2019
@danimtb
danimtb requested a review from jgsogo January 16, 2019 09:04
@danimtb danimtb added this to the 1.12 milestone Jan 16, 2019

@jgsogo jgsogo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it work with lightweight tags?

Comment thread conans/test/unittests/util/tools_test.py Outdated
Comment thread conans/test/unittests/util/tools_test.py
@ghost ghost assigned danimtb Jan 16, 2019
@danimtb danimtb removed their assignment Jan 16, 2019

@jgsogo jgsogo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two typos, and... can we add a test that raises?

Comment thread conans/test/unittests/util/tools_test.py Outdated
Comment thread conans/test/unittests/util/tools_test.py Outdated
@ghost ghost assigned danimtb Jan 16, 2019
@danimtb danimtb removed their assignment Jan 16, 2019
@jgsogo

jgsogo commented Jan 16, 2019

Copy link
Copy Markdown
Contributor

@danimtb, what about the test that raises from get_branch and/or get_tag?

@danimtb danimtb removed their assignment Jan 17, 2019
@jgsogo

jgsogo commented Jan 17, 2019

Copy link
Copy Markdown
Contributor

This PR is breaking previous behavior. Although I'm agree that that current one is the good one, I want to be sure that you are aware of it (ping @conan-io/barbarians):

https://github.com/conan-io/conan/pull/4306/files#diff-4d836661d105934362de1c311c59ce8cR1882

@danimtb

danimtb commented Jan 17, 2019

Copy link
Copy Markdown
Member Author

Yes, it was not consistent with git.get_branch() behavior, which is only returning the version name

@lasote

lasote commented Jan 17, 2019

Copy link
Copy Markdown
Contributor

Thanks for the observation @jgsogo. I also agree it is better now. Fortunately, scm is still experimental because only the usage brings the knowledge.

@jgsogo

jgsogo commented Jan 17, 2019

Copy link
Copy Markdown
Contributor

only the usage brings the knowledge

@jgsogo

jgsogo commented Jan 17, 2019

Copy link
Copy Markdown
Contributor

SCM is experimental, tools.SVN isn't (https://docs.conan.io/en/latest/reference/tools.html#tools-svn).... but, I vote for changing it ✅

@lasote

lasote commented Jan 17, 2019

Copy link
Copy Markdown
Contributor

It is experimental, change the docs.

@jgsogo
jgsogo merged commit 6ac12b4 into conan-io:develop Jan 17, 2019
@ghost ghost removed the stage: review label Jan 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for git describe --tags in tools.Git

4 participants