[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Export entire changed files for zip patch

From: Eli Carter <eli.carter_at_commprove.com>
Date: 2007-06-27 22:38:15 CEST

On Wednesday 27 June 2007, Nathan Nobbe wrote:
> just guessing a bit; as i havent used this myself; but isnt this what
> patch<http://en.wikipedia.org/wiki/Patch_%28Unix%29>is for?
> basically the flow here is to diff the to repositories; dump the diff of
> each file in the repo to a diff file.
> then recursively apply the diff files to the target source base using patch.
> you would still need to handle adding new files and removing deleted files
> though.
> in order to get a listing of the files that have changed between 2
> components of the repository (typically a development branch and the trunk)
> svn diff -x -w svn+ssh://user@repohost/trunk
> | grep '+++'
> svn diff -x -w svn+ssh://suer@repohost/trunk
> | grep '\-\-\-'

You'd probably rather use 'diffstat'.

> so, in my mind i would start out by using those commands to generate a list
> of files then iterate over the list producing the diff files.

svn diff will give you the diff over all the files; no need to build it up

> note here, im assuming the diff output from svn is compatible w/ gnu diff
> (because thats what patch takes as input).

It's almost compatible. You'll run into problems when patching binary files.
svn diff --diff-cmd diff -x -au --force
may work better.
And adding/removing files may have issues; I haven't double-checked that yet.

Have fun,


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jun 27 22:38:52 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.