Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do you apply a Patch (.diff)?


raneman

Recommended Posts

My personal advice is to not bother and go find a different contribution that doesn't use .diff patches. These are meant to be used with a particular UNIX utility which will work only if the original file is absolutely identical to whatever the author used as a base. It's not worth the hassle.

Link to comment
Share on other sites

My personal advice is to not bother and go find a different contribution that doesn't use .diff patches.  These are meant to be used with a particular UNIX utility which will work only if the original file is absolutely identical to whatever the author used as a base.  It's not worth the hassle.

 

 

I took your advise and hand coded everything myself. It works perfectly.

 

thx

Link to comment
Share on other sites

  • 3 weeks later...

>These are meant to be used with a particular UNIX utility which will work only if the original file is >absolutely identical to whatever the author used as a base. It's not worth the hassle.

 

The above is not true - the patch command can find the correct place to put the patach even if the file has been changed.

 

Contributions SHOULD be posted as patch files using

Creating a Patch File:

diff -Naur olddir newdir > new-patch

- or -

diff -Naur oldfile newfile >new-patch

 

There are diff and patch cammands available for Windows

 

Then applying a contribution would be as simple as:

Using the Patch Command:

 

patch -p0 <new-patch

 

You have to be in the correct directory.

------------------------------------------------------------------------

The first panacea for a mismanaged nation is inflation

of the currency; the second is war. Both bring a
temporary prosperity; both bring permanent ruin.
Ernest Hemingway
------------------------------------------------------------------------

Link to comment
Share on other sites

I disagree with this, though you're right in saying that if you've inserted or removed some lines not affected by the patch, it MAY be able to find the right place. Perhaps. As long as some other contribution or change didn't alter the lines being replaced.

 

I think patches are an awful way of providing contributions.

Link to comment
Share on other sites

I think patches are an awful way of providing contributions.

 

I'm with you. I remember finding one contribution that looked interesting, but I never installed it because it used a damned patch file...

"Buy the ticket, take the ride..." -HST

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...