PDA

View Full Version : Subversion -> Applying patches



Jim
2005-05-20, 13:01
I am sure the command is simple, but everything I've tried has failed.

How do I for instance apply the following patch to my checked-out source tree at D:\Slim ?

http://bugs.slimdevices.com/attachment.cgi?id=478&action=view

kdf
2005-05-20, 13:05
Quoting Jim <Jim.1pcjic (AT) no-mx (DOT) forums.slimdevices.com>:

>
> I am sure the command is simple, but everything I've tried has failed.
>
> How do I for instance apply the following patch to my checked-out
> source tree at D:\Slim ?
>
> http://bugs.slimdevices.com/attachment.cgi?id=478&action=view

patch -p1 < patchfile

that should do it, assuming you save that view to a file called patchfile :)

you might have to alter the -p1 param to fit. the number is supposed to be the
number of path levels to ignore from the patch in order to fit where you are in
the tree. if the matches dont work, patch does let you type in each filename
in turn.

-kdf

Robert Moser
2005-05-20, 13:17
kdf wrote:
> Quoting Jim <Jim.1pcjic (AT) no-mx (DOT) forums.slimdevices.com>:
>
>
>>I am sure the command is simple, but everything I've tried has failed.
>>
>>How do I for instance apply the following patch to my checked-out
>>source tree at D:\Slim ?
>>
>>http://bugs.slimdevices.com/attachment.cgi?id=478&action=view
>
>
> patch -p1 < patchfile
>
> that should do it, assuming you save that view to a file called patchfile :)
>
> you might have to alter the -p1 param to fit. the number is supposed to be the
> number of path levels to ignore from the patch in order to fit where you are in
> the tree. if the matches dont work, patch does let you type in each filename
> in turn.
>
> -kdf

Is there a patch.exe for Windows? If not, I guess Cygwin would probably
have a patch command. Alternatively, Eclipse running Subclipse has an
Apply Patch option under the team menu.

Jim
2005-05-20, 13:36
http://unxutils.sourceforge.net/ seems to be the answer, will post again if it doesn't work.

Thanks