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

Re: Compare file with repository

From: Paul Koning <pkoning_at_equallogic.com>
Date: 2005-12-13 17:04:24 CET

>>>>> "Pieter" == Pieter Ennes <pieter.ennes@q-go.com> writes:

 Pieter> Paul Koning wrote: Hello list, Is it possible to do a diff
 Pieter> between a regular local file (which is not a working copy),
 Pieter> and a repository?
>>
 Pieter> Something like: svn diff
 Pieter> http://host/svn/etc/apache/httpd.conf /etc/apache/httpd.conf
>> svn cat URL | diff - localfile

 Pieter> Thank you, i had also come up with something
 Pieter> similar. However, i still fail to see how this approach can
 Pieter> easily be used on directories in stead of single files...

True. A simple shell script loop will do that, though. Something
like:
        for f in *; do
            svn cat svn://foo.com/bar/baz/$f | diff - $f
        done

If you want to recurse, you can use some magic with the "find" command
and the -execute switch.

 Pieter> As a side-note, are there any theoretical/design problems
 Pieter> with diff-ing against an export, or is it just something that
 Pieter> no-one has implemented yet/found useful enough.

An export is just a local file system subtree, there are no traces of
Subversion in it.

           paul

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Dec 13 17:27:37 2005

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