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

Re: svn diff or properties

From: David Mankin <mankin_at_ants.com>
Date: 2003-01-20 19:09:48 CET

On Monday, January 20, 2003, at 07:58 AM, Ben Collins-Sussman wrote:

> David Mankin <mankin@ants.com> writes:
>> 1) (already discussed before) I want the diff to just list differences
>> on the current directory, not on the files in it. I need "svn diff
>> . --depth=0".
> Hmmm, what does 'svn diff --non-recursive' do? Is that depth 0 (dir
> propchanges only), or depth 1 (includes children)?

depth 1.

>> 2) This is what the property diff looks like:
>> Property changes on:
>> ___________________________________________________________________
>> Name: svn:ignore
>> + classes
>> dist
>> docs/javadoc
>> tags
>> From what I read in the book it sounds like there's no way the
>> maintainer can apply that patch. I don't even fully know how to read
>> it. Wouldn't it be more practical to send a diff of the
>> .svn/dir-props file? Then patch could apply it directly. Or maybe
>> I'm missing something?
> That strategy won't work, since the props files are just hash-dumps,
> and thus the entries can be in any random order.

For the number of properties likely to be on any particular file or
directory, it probably wouldn't be out of the question to define it as
a hash-dump sorted by key. But maybe there are still other hurdles to
simply diffing the props file?

> We still don't have a patch format that can express property diffs or
> tree rearrangements. This has long been a goal, but no one has got a
> Round Tuit yet. In theory, it would be nice to design a patch format
> that allows us to interoperate with other free systems, like arch.

Ok, as a stop-gap solution to make the property diff more readable,
what if each property were diffed as if it was its own file? I imagine
the above should look like this:

Index: .svn/PROPPATCH/./svn:ignore
--- .svn/PROPPATCH/./svn:ignore (revision 12)
+++ .svn/PROPPATCH/./svn:ignore (working copy)
@@ -0,0 +1,4 @@
+ classes
+ dist
+ docs/javadoc
+ tags

And a property on a file:

Index: .svn/PROPPATCH/README.txt/svn:eol-style
--- .svn/PROPPATCH/README.txt/svn:eol-style (revision 12)
+++ .svn/PROPPATCH/README.txt/svn:eol-style (working copy)
@@ -1,1 +1,1 @@
+ native

Then a script could be hacked together to do some propgetting,
diff3'ing, and propsetting, as appropriate to apply the patch.

-David Mankin

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jan 20 19:10:11 2003

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.