Patch/Diff tool + something else?

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Patch/Diff tool + something else?

Post by alex.barylski »

Preferably a Debian CLI series of tools.

1. I have two versions of PHP applications.
2. I want to use diff/patch to basically build the differences of files/folders

The caveat is, the ouput of patch doesn't seem to do as I need. I need the output to essentially mirror the latest version but only iunclude the files/folders which were actually changed, nothing more.

Uploading this 'mirror' over top the existing (older) installation to basically bring it up-to-date by overwriting older files and ignoring files which have no changes.

Possible? Can you please show me how this would be done?

Cheers,
Alex
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: Patch/Diff tool + something else?

Post by AbraCadaver »

Check into SVN. Also, rsync may work if you don't need the versioning.

-Shawn
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Patch/Diff tool + something else?

Post by alex.barylski »

I"m already using SVN not really what I need, but maybe.

I have two versions in separate snapshots under tags

1.0.0.0
1.0.0.5

I need a diff of all files/folders added, with the caveat that I really only need a file/folder listing of updated/added files as well as added folders.

Basically I need a patch to be a directory structure containing only the differences between the two versions so I can upload and overwrite all affected files as opposed to re-uploading all files, all the time, even for trivial changes.

Custom script or is there a combination of CLI tools I can use to do this? VladSun? :P

Cheers,
Alex
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Patch/Diff tool + something else?

Post by Christopher »

PCSpectra wrote:I need a diff of all files/folders added, with the caveat that I really only need a file/folder listing of updated/added files as well as added folders.
rsync may be able to do this. Check the options.
PCSpectra wrote:Custom script or is there a combination of CLI tools I can use to do this? VladSun? :P
I would look into using find. It can run a script/program for each file found in a tree. Have it call a little shell script copies a file if it is different than the same file in parallel tree.
(#10850)
Post Reply