patch command in linux to apply a svn patch

First of all how to create a patch if you dont know…
$ svn diff mychangedfile1 dir1/dir2/mychangeresource2 > mypatch.txt

To apply this patch it needs to be in the same svn location as the patch was taken. Then using the patch command u apply the patch
$ patch -p0 < patch.txt

Tags: ,

One Response to “patch command in linux to apply a svn patch”

  1. leetnightshade Says:

    “To apply this patch it needs to be in the same svn location as the patch was taken.”

    Not so. The patch name you pass in as the last argument is actually the patch path. So as long as you provide a correct path, you can apply a patch from a different directory.

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: