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
Add get_repo_root to SCM, use it for path stored in scm_folder.txt (close #3465) #3479
Conversation
conans/test/functional/scm_test.py
Outdated
""" | ||
curdir = self.client.current_folder | ||
conanfile = base.format(url="auto", revision="auto") | ||
self.client.save({"conanfile.py": conanfile}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can run self.client.save({"conan/conanfile.py": conanfile})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And mix with "myfile.txt" save for clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
much better, didn't thought about that 🙃
# Create the package | ||
self.client.run("create conan/ user/channel") | ||
sources_dir = self.client.client_cache.scm_folder(self.reference) | ||
self.assertEquals(load(sources_dir), curdir.replace('\\', '/')) # Root of git is 'curdir' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
load of a directory??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scm_folder
is the name given by Conan to the scm_folder.txt
file, I agree with you that it may not be the best one.
Add get_repo_root to SCM, use it for path stored in scm_folder.txt (close conan-io#3465)
Changelog: Bugfix: The
scm
feature now looks for the repo root even when theconanfile.py
is in a subfolder.