Andy Spitzer wrote: > Woof! > > I've got to review a patch from a particular revision of sipX/3.10 that isn't > applying cleanly on the "latest" version of 3.10. Sounds like a job for git! > > What are the git commands to get the source into a position so that I can > apply the patch? > > Assume total git naivete... > > --Woof!
Assume you have a patch against XXXX, and repo created that tracks all the subversion branches (as described on wiki). http://sipx-wiki.calivia.com/index.php/Mirroring_sipXecs_subversion_repository_with_git#Mirroring_all_branches_of_subversion_repository git svn find-rev rXXXX it should print the magic number (nnnnnn) if it does not find anything try XXXX-1, XXXX-2 etc. create a branch based on this revision git co -b mybranch nnnnnn apply the patch using 'patch' or 'git apply' Commit all the changes. If there are new files add them. git commit -a Now rebase against your 3.10 branch. git rebase 3.10 You'll probably get conflicts. To resolve them run: git mergetool ... and once they are resolved. git rebase --continue At this point git show displays the rebased patch. You can apply it against your subversion repo. Or if you are set up to commit from git repo you can rebase your 3.10 branch against your 'mybranch' and run git svn dcommit. Of course if you happen to receive git patch already you can just run 'git am' and git will try to do this all automatically. D. _______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
