Backstory
As some of you may know I have been working on a CMS system in CodeIgniter recently as a base for my clients sites.
The source control was all working perfectly well for a while. Each minor release is tagged in the repo and each site was a different branch in a /sites/ folder. I could easily update each of the sites in my repo by comparing /tags/v0.6 with /tags/v0.7 and merging the differences into their site branch.
However I moved a clients site to a new repo as I intend to manage them seperatly from now on, and as some point im sure clients will want to manage them themselves. This means that I have to use patches, and they are giving me a nosebleed.
I have finally worked out that I can simply do:
svn diff http://repo.com/svn/tags/v0.6/ http://repo.com/svn/tags/v0.7/ > desktop/upgrade.diff
This produces a lovely diff file I can use to patch any folder with. I tried looking around for examples of patching and there dont really seem to be any good tutorials and the terminal man page doesn’t give me enough info.
Current comand
patch -p0—dry-run—remove-empty-files—version-control=never—force < /users/me/desktop/upgrade.diff
It makes a lot of the changes, but will change and add files that dont exist in this clients site. Means its adding back in all the modules I took out for them, etc.
Question
How can I apply a patch that will:
1.) Ignore changes to files not in the working copy
2.) Not add files that are not in the working copy
3.) Wont add .orig or .rej
I can easily just run a command to strip out those two file extentions afterwards, but there must be an option for that?