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

#5320 Import Python Patch #5761

Merged
merged 11 commits into from Oct 23, 2019

Conversation

@uilianries
Copy link
Member

uilianries commented Sep 17, 2019

The easiest way to fix our problem related to patching is by the
upstream. However, neither the upstream and their forks are maintaining
the project since 3 years ago.

So idea here is importing the original implementation and merging with the current PR in upstream.

This current PR is able to fix add/rem files using patch apply

Changelog: Fix: Add and remove out-of-tree git patches (#5320)
Docs: Omit

  • Refer to the issue that supports this Pull Request.
  • 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.

uilianries added 2 commits Sep 17, 2019
- The easiest way to fix our problem related to patching is by the
upstream. However, neither the upstream and forks are maintaining
the project since 3 years ago. So idea here is importing the original
implementation and merging with the current PR in upstream.

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
@lasote lasote modified the milestone: 1.20 Sep 23, 2019
@SSE4

This comment has been minimized.

Copy link
Contributor

SSE4 commented Sep 23, 2019

another option: https://github.com/libgit2/pygit2

uilianries added 4 commits Sep 25, 2019
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
@memsharded

This comment has been minimized.

Copy link
Member

memsharded commented Sep 30, 2019

What am I missing here? I cannot find such patch-ng.

@uilianries

This comment has been minimized.

Copy link
Member Author

uilianries commented Sep 30, 2019

We need to publish first our fork: https://github.com/conan-io/python-patch-ng

@lasote lasote assigned lasote and unassigned jgsogo Oct 1, 2019
@lasote

This comment has been minimized.

Copy link
Contributor

lasote commented Oct 1, 2019

I assign to myself to review the fork and publish to pypi

Signed-off-by: Uilian Ries <uilianries@gmail.com>
@danimtb danimtb added this to the 1.20 milestone Oct 4, 2019
@lasote lasote assigned uilianries and unassigned lasote Oct 10, 2019
@lasote

This comment has been minimized.

Copy link
Contributor

lasote commented Oct 10, 2019

I've published the patch-ng. Looks like it broke some test. Check please

@uilianries uilianries referenced this pull request Oct 14, 2019
Signed-off-by: Uilian Ries <uilianries@gmail.com>
@lasote

This comment has been minimized.

Copy link
Contributor

lasote commented Oct 15, 2019

We need a test for #5320. I'm not opposed to have it here in Conan.

Signed-off-by: Uilian Ries <uilianries@gmail.com>
@lasote lasote assigned lasote and unassigned uilianries Oct 16, 2019
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
client.run("install .")
client.run("build .")
bar_content = load(os.path.join(client.current_folder, "bar.txt"))
self.assertIn(dedent("""Yo no creo en brujas, pero que las hay, las hay

This comment has been minimized.

Copy link
@lasote

lasote Oct 21, 2019

Contributor

These asserts here are useless... right? I want to assert the final files in the cache. So do this asserts in the build() method or access to the recipe folder in the cache.

This comment has been minimized.

Copy link
@uilianries

uilianries Oct 21, 2019

Author Member

well, they are the result of patch method. I can internalize in build() but I think it will result on same thing. The original file only contains a part of the phrase, after applying the patch the phrase is complete, so the patch need to work.

This comment has been minimized.

Copy link
@lasote

lasote Oct 23, 2019

Contributor

ah, ok. I missed that is a local build() method.

@lasote
lasote approved these changes Oct 23, 2019
@lasote lasote merged commit 7c55843 into conan-io:develop Oct 23, 2019
2 checks passed
2 checks passed
continuous-integration/jenkins/pr-head This commit looks good
Details
license/cla Contributor License Agreement is signed.
Details
@lasote lasote referenced this pull request Oct 23, 2019
3 of 3 tasks complete
@uilianries uilianries deleted the uilianries:hotfix/git-patch-strip branch Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.