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

Add get_repo_root to SCM, use it for path stored in scm_folder.txt (close #3465) #3479

Merged
merged 5 commits into from Sep 6, 2018

Conversation

Projects
None yet
4 participants
@jgsogo
Copy link
Member

commented Sep 4, 2018

  • Refer to the issue that supports this Pull Request. (close #3465)
  • 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.
  • Add tests

Changelog: Bugfix: The scm feature now looks for the repo root even when the conanfile.py is in a subfolder.

@danimtb

danimtb approved these changes Sep 6, 2018

"""
curdir = self.client.current_folder
conanfile = base.format(url="auto", revision="auto")
self.client.save({"conanfile.py": conanfile},

This comment has been minimized.

Copy link
@lasote

lasote Sep 6, 2018

Contributor

You can run self.client.save({"conan/conanfile.py": conanfile})

This comment has been minimized.

Copy link
@lasote

lasote Sep 6, 2018

Contributor

And mix with "myfile.txt" save for clarity.

This comment has been minimized.

Copy link
@jgsogo

jgsogo Sep 6, 2018

Author Member

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'

This comment has been minimized.

Copy link
@lasote

lasote Sep 6, 2018

Contributor

load of a directory??

This comment has been minimized.

Copy link
@jgsogo

jgsogo Sep 6, 2018

Author Member

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.

@lasote lasote added this to the 1.8 milestone Sep 6, 2018

@lasote

lasote approved these changes Sep 6, 2018

@memsharded memsharded merged commit db62db2 into conan-io:develop Sep 6, 2018

2 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
license/cla Contributor License Agreement is signed.
Details

@ghost ghost removed the stage: review label Sep 6, 2018

@jgsogo jgsogo deleted the jgsogo:issue/3465 branch Sep 19, 2018

grisumbras pushed a commit to grisumbras/conan that referenced this pull request Dec 27, 2018

Merge pull request conan-io#3479 from jgsogo/issue/3465
Add get_repo_root to SCM, use it for path stored in scm_folder.txt (close conan-io#3465)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.