Patcher, unified diff?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Patcher, unified diff?

Postby bruth » Sat Dec 14, 2013 9:43 am

When we build CEF, we add some additional capabilities to Chromium, exposed through APIs in CEF, ultimately. To easily apply our patches, we started using patch/patch.cfg with r1453. We're getting our CEF build updated to r1650 now and running into some issues applying the new patches, specifically - we have to create two new source files, and patch_util.py seems to look at the filename preceded by '--- ', which in our diff is /dev/null, instead of the filename preceded by '+++ '.

I'm by no means a Python expert, but that's what I'm gleaning out of the code I'm looking at.

Any assistance would be appreciated!

Thanks.
bruth
Techie
 
Posts: 44
Joined: Mon Dec 09, 2013 5:45 pm

Re: Patcher, unified diff?

Postby magreenblatt » Sat Dec 14, 2013 1:03 pm

I create the patch files using svn on windows. If you're using svn or git on a different platform that probably explains the difference. Here's an example of a working patch that added new files: http://code.google.com/p/chromiumembedd ... n972&r=972. Both the --- and +++ lines include the name of the added file. It would also be reasonable to change the python script to look at the +++ line instead of the --- line for the new file name. Feel free to create an issue and submit a patch.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Patcher, unified diff?

Postby bruth » Sun Dec 15, 2013 10:59 am

Roger that. I think we just figured out the same thing :) We used to create our patches using SVN, but we kept having some issues. With 1650, we're using git, and the diff process is faster and less error-prone, it seems. But, the 'unified diff' format is slightly different, that's why we're seeing this now.
bruth
Techie
 
Posts: 44
Joined: Mon Dec 09, 2013 5:45 pm

Re: Patcher, unified diff?

Postby nishantkaushik » Thu Oct 20, 2016 4:07 am

I have added issue 2016 and pull request for same is here - https://bitbucket.org/chromiumembedded/ ... -with/diff
The patch adds support for patches created with git diff by using the source/target name available when the other one is 'dev/null'.
nishantkaushik
Newbie
 
Posts: 1
Joined: Thu Oct 20, 2016 3:56 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 85 guests