You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Pieter Ennes <pi...@q-go.com> on 2005/12/13 09:46:28 UTC
Compare file with repository
Hello list,
Is it possible to do a diff between a regular local file (which is not a
working copy), and a repository?
Something like:
svn diff http://host/svn/etc/apache/httpd.conf /etc/apache/httpd.conf
I have read about comparing working copies with the repository using
--old and --new, but i don't want to make /etc/apache a working copy,
it's just an export.
Any help is greatly appreciated.
Please cc me, as i'm not on the list... thanks,
--
- Pieter
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Compare file with repository
Posted by Pieter Ennes <pi...@q-go.com>.
Paul Koning wrote:
> 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.
Yes, although this will fail if there are any new files in the
repository, which are not yet on the local filesystem i guess... that's
why i was looking for a more svn-integrated command.
Thanks for your help though, Paul.
--
- Pieter
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Compare file with repository
Posted by Paul Koning <pk...@equallogic.com>.
>>>>> "Pieter" == Pieter Ennes <pi...@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
Re: Compare file with repository
Posted by Pieter Ennes <pi...@q-go.com>.
Paul Koning wrote:
> Pieter> Hello list, Is it possible to do a diff between a regular
> Pieter> local file (which is not a working copy), 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
Thank you, i had also come up with something similar. However, i still
fail to see how this approach can easily be used on directories in stead
of single files...
As a side-note, are there any theoretical/design problems with diff-ing
against an export, or is it just something that no-one has implemented
yet/found useful enough.
Thanks anyway, bye!
--
- Pieter
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Compare file with repository
Posted by Paul Koning <pk...@equallogic.com>.
>>>>> "Pieter" == Pieter Ennes <pi...@q-go.com> writes:
Pieter> Hello list, Is it possible to do a diff between a regular
Pieter> local file (which is not a working copy), 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
paul
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org