Page 1 of 1

Patch/Diff tool + something else?

Posted: Mon Nov 30, 2009 11:35 am
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

Re: Patch/Diff tool + something else?

Posted: Mon Nov 30, 2009 12:08 pm
by AbraCadaver
Check into SVN. Also, rsync may work if you don't need the versioning.

-Shawn

Re: Patch/Diff tool + something else?

Posted: Mon Nov 30, 2009 6:43 pm
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

Re: Patch/Diff tool + something else?

Posted: Mon Nov 30, 2009 6:48 pm
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.