On Thu, Feb 28, 2002 at 09:26:38AM -0800, Rob Hudson wrote: >If there is a piece of software that I want to make a patch on, how >does one do this? Do you need 2 trees - the original and the changed >one?
I usually save off a copy of the original file before I start modifying it (":!cp % %.old" in vi). Then, when I'm done, I make the patch by going up above the top directory and including the full path in the name so people know what version the patch is meant to be applied to. For example, if I'm patching Python-2.3-cvs, in both the pwdmodule.c and grpmodule.c: diff -c Python-2.3-cvs/Modules/pwdmodule.c.old \ Python-2.3-cvs/Modules/pwdmodule.c >/tmp/python-enhtuples.patch diff -c Python-2.3-cvs/Modules/grpmodule.c.old \ Python-2.3-cvs/Modules/grpmodule.c >>/tmp/python-enhtuples.patch Note that you can just append other diffs to the original file Also note that Python prefers "-c" patches (context output). I personally prefer "-u" for unified -- I find them easier to read. If your patch modifies a lot of files, you may find it easier to deal with keeping two trees around and using the "-r" option for recursive. Sean -- "We just wanted to give the band a little more thrust than most other bands." - Donald Fagen's reply to why they chose the name 'Steely Dan' Sean Reifschneider, Inimitably Superfluous <[EMAIL PROTECTED]> tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python