How can I subtract two svn patch files? -



How can I subtract two svn patch files? -

i have patch-queue scheme (like offered guilt or mercurial-mq) on top of svn.

svn able export patch files, represent difference remote working copy. can utilize this, , create patch every time alter something, patch contain previous changes made. doesn't create problems when applying patch, because redundant parts ignored.

even so, patches contain changes made lastly patch saved current working copy, more flexible. can delete patch "revert" it, or can take apply subset of patches. in order this, think thing need tool can subtract 2 patches.

for instance, given 001.patch:

index: myrepo/myfile.h =================================================================== --- myrepo/myfile.h (revision 200) +++ myrepo/myfile.h (working copy) @@ -283,1 +283,1 @@ void f();

and 002.tmp.patch:

index: myrepo/myfile.h =================================================================== --- myrepo/myfile.h (revision 200) +++ myrepo/myfile.h (working copy) @@ -283,1 +283,1 @@ void f(); index: myrepo/myfile.c =================================================================== --- myrepo/myfile.c (revision 200) +++ myrepo/myfile.c (working copy) @@ -283,1 +283,1 @@ void f() { }

i obtain 002.patch:

index: myrepo/myfile.c =================================================================== --- myrepo/myfile.c (revision 200) +++ myrepo/myfile.c (working copy) @@ -283,1 +283,1 @@ void f() { }

of course, much less obvious when things removed or modified. anyway, i'd happy plenty hunk-level subtraction (one takes 002.tmp.patch , removes hunks have identical re-create in 001.patch)

the interdiff tool can asked for. http://www.linuxcommand.org/man_pages/interdiff1.html

svn patch

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -