axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] applying a patch


From: daly
Subject: [Axiom-developer] applying a patch
Date: Fri, 27 Jul 2007 17:40:01 -0500

Alasdair,

To apply a patch for a single file:

suppose the original file is in ./original/file.spad.pamphlet
suppose the patch is file.patch

patch <file.patch

Patch will ignore non-patch garbage so you can generally just 
save the email file containing the patch and feed it directly
to the patch command.

There are a lot of useful flags on the patch command. The one I 
tend to use most is "-p". The -p flag ignores levels in the 
hierarchy. So if I have a whole tree patch where the tree lives
under, say silver, and my changes live under bronze the patch
file will say something like:

 silver/src/algebra/file.spad.pamphlet
 bronze/src/algebra/file.spad.pamphlet

But you might have a different location, such as mysilver/src/algebra
You can use the "-p" command to throw away directory levels.
So you can do:

  cd mysilver
  patch -p1 <file.patch

and it will skip the (silver,bronze).

Tim





reply via email to

[Prev in Thread] Current Thread [Next in Thread]