Author Topic: patch  (Read 4130 times)

infestor1

  • Posts: 142
  • Turrets: +6/-28
    • 345356745i624567
patch
« on: May 27, 2009, 04:25:43 am »
Ok, this is my second thread about .patch. I already posted one, and got a reply, that helped, but not too much...

http://tremulous.net/forum/index.php?topic=10953.0

How do I "apply the patch" to the "common source code" to make the "patched source code"? How?

Btw, I'm on a Mac, so I'm not going to run off and download VB or something.

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Re: patch
« Reply #1 on: May 27, 2009, 01:50:27 pm »
cd /path/to/the/source ; patch -p0 < ./whatever.patch
You may have to do -p1 depending on how the patch was made.
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.

infestor1

  • Posts: 142
  • Turrets: +6/-28
    • 345356745i624567
Re: patch
« Reply #2 on: May 28, 2009, 02:26:44 am »
cd /path/to/the/source ; patch -p0 < ./whatever.patch
You may have to do -p1 depending on how the patch was made.

So that would be two separate commands?

cd tremulous-svn

then

patch -p0 < ./crap.patch

And /path/to/the/source is the tremulous source? The original source?

And the patch file has to be in that same folder, and it updates the source with the patch, it doesnt make a whole new folder?


David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Re: patch
« Reply #3 on: May 28, 2009, 12:11:23 pm »
Yep, two commands.  Bash treats ; the same as a new-line.
/path/to/the/source is which ever source you want to patch.
The patch file doesn't have to be in the same directory as long as you give the right path to it, and it modifies the current source, if you want a copy you have to copy it yourself.
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.