Bidirectional Patch!

I came across an interesting problem today.It was patch that works both forward and backward! It was on the course of editing a UI file, the markups in the svn diff were simply :

</spacer>

</item>

and a

<item>

<spacer>

And the change I made contained the same number of lines apparently.

I did my usual, svn diff > Patch followed by patch -p0 < Patch, hoping It’d ask me to assume a -R . It did ask that for a few files, but not this one and I dint notice that. And my make kept failing. Finally on doing another svn diff, I realised this interesting thing. It had _added_ an extra batch of buggy lines like once wasn’t enough to kill the compile! I ended up doing an svn revert to resolve the issue finally.

So piece of advice : Take that little bit of time to add a -R to the patch -p0 command 🙂

Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: