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

Re: svn diff interface

From: Kirby C. Bohling <kbohling_at_birddog.com>
Date: 2002-05-09 21:50:59 CEST

Both of these spring to mind to solve your problem:

rm patch
for file in foo.c bar.h ; do svn diff $file >> patch ; done

Alterantively:

svndiff diff > tmp.diff
( echo "foo.c bar.h" | xargs -rn1 filterdiff tmp.diff -i ) > patch

would work assuming you have patchutils installed.*

No neither is as convient as the iterative interface, but neither is
singificantly more difficult if you understand the commands involved.

If it is common enough, a person could write the shell script for it
easily enough.

        I love UNIX pipes.

                Kirby

*It also assumes I am reading the man page correctly, I haven't used
that command before, but I believe it works based on the man page.

sam th wrote:
> On Thu, 2002-05-09 at 14:00, Philip Martin wrote:
>
>
>>Yes, but I would prefer to drop the iterative case :-) I don't use it,
>>I think it makes the interface harder to understand, it makes the code
>>harder to write and test, and it makes the interface less consistent
>>with other svn functions.
>>
>
> <unlurk>
> The iterative case is really quite useful. For example, say I've
> changed lots of files in my WC, but I only want to get the diffs for
> foo.c and bar.h. There are lots of times I want to do this. Then, with
> cvs,
> % cvs diff foo.c bar.h > patch
> does just what I want.
> % svn diff foo.c > patch && svn diff bar.h >> patch
> is lots less user-friendly.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu May 9 21:55:39 2002

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

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