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

Optional user/channel #5381

Merged
merged 39 commits into from Jul 24, 2019
Merged

Optional user/channel #5381

merged 39 commits into from Jul 24, 2019

Conversation

@lasote
Copy link
Contributor

@lasote lasote commented Jun 21, 2019

Changelog: Feature: The "user/channel" fields are now optional. e.g: conan create . is valid if the name and version are declared in the recipe. e.g: conan create . lib/1.0@ to omit user and channel. The same for other commands. The user and channel can also be omitted while specifying requirements in the conanfiles.

Docs: conan-io/docs#1375

Close #5310

@PYVERS: Macos@py27, Windows@py36, Linux@py27
@tags: svn, slow
@revisions: 1

@lasote lasote added this to the 1.18 milestone Jun 21, 2019
conans/client/command.py Outdated Show resolved Hide resolved
Loading
conans/client/command.py Show resolved Hide resolved
Loading
conans/model/ref.py Outdated Show resolved Hide resolved
Loading
conans/model/ref.py Outdated Show resolved Hide resolved
Loading

def copy_with_rev(self, revision):
return ConanFileReference(self.name, self.version, self.user, self.channel, revision)

def copy_clear_rev(self):
return ConanFileReference(self.name, self.version, self.user, self.channel, None)

def __lt__(self, other):
Copy link
Contributor Author

@lasote lasote Jul 19, 2019

Choose a reason for hiding this comment

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

To allow sorting a list of references

Loading

conans/client/command.py Outdated Show resolved Hide resolved
Loading
conans/client/command.py Outdated Show resolved Hide resolved
Loading
conans/client/command.py Show resolved Hide resolved
Loading
conans/client/command.py Show resolved Hide resolved
Loading
@lasote lasote changed the title [DRAFT] Optional user/channel Optional user/channel Jul 19, 2019
@lasote lasote marked this pull request as ready for review Jul 19, 2019
@lasote lasote requested a review from memsharded Jul 19, 2019
@lasote lasote removed the request for review from memsharded Jul 19, 2019
Copy link
Member

@memsharded memsharded left a comment

I like it, I thought it was going to be more complicated.
Tests are comprehensive and clear too.

Just a couple of minor questions, please check.

Loading

conans/test/functional/command/create_test.py Show resolved Hide resolved
Loading
conans/test/functional/command/export_test.py Outdated Show resolved Hide resolved
Loading
Loading
conans/test/integration/hook_test.py Show resolved Hide resolved
Loading
conans/test/unittests/model/ref_test.py Outdated Show resolved Hide resolved
Loading
conans/model/ref.py Outdated Show resolved Hide resolved
Loading
conans/model/ref.py Show resolved Hide resolved
Loading
@lasote lasote force-pushed the feature/reference_default branch from 012859b to c6e2f45 Jul 22, 2019
@lasote lasote force-pushed the feature/reference_default branch from c6e2f45 to 4f8c721 Jul 22, 2019
@lasote lasote merged commit 3953894 into conan-io:develop Jul 24, 2019
2 checks passed
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants