Hi,

So here is what I  think is the minimal amount of work to get a Github pull 
request committed in SVN.

I had tried playing about with patching between repos but it got complex fast.

First off pull requests can be viewed as patches in Github:
https://github.com/apache/flex/pull/2.patch

BTW This wasn't easy to find in the github docs and I really wish someone had 
brought it up.

Now we have 2 issues:
1. Patch is not is SVN format
2. Unicode characters have been transformed (look carefully)

So something like this in theory should work:
curl https://github.com/apache/flex/pull/2.patch | native2ascii -encoding UTF-8 
-reverse | patch -p1

curl downloads the patch, native2ascii converts to UTF8 and patch -p1 converts 
the git patch to SVN format  and applies it by stripping off the first 
character off each path in the patch file.

May be other git patch file formatting issues I'm not aware of.

However it look like patch doesn't like unicode changes and applying the patch 
fails. 

This:
curl https://github.com/apache/flex/pull/2.patch | native2ascii -encoding UTF-8 
-reverse 
Looks fine to me so not 100% sure why the patch fails.

Doing this works:
curl https://github.com/apache/flex/pull/2.patch | patch -p1

But now the unicode characters are wrong. For most patches that may be OK (if 
they don't contain unicode) but could introduce subtle errors if care is not 
taken.

I'd appreciate it if the people who voted for the "Git Branching Model on Git 
now" option lend a hand here and help sort this out.

This is on OSX btw I have no idea if the above works in windows.

Thanks,
Justin

Reply via email to