On Thu, Sep 02, 2010 at 11:14:27AM +0300, Daniel Shahaf wrote:
> > Note that we allow empty files to be created for regular diffs too if
> > they have property changes. This patch will create an empty file with
> > property 'foo' set on it:
> > 
> > Index: empty
> > ===================================================================
> > 
> > Property changes on: empty
> > ___________________________________________________________________
> > Added: foo
> > ## -0,0 +1 ##
> > +value
> 
> So this implicitly creates the file if it doesn't exist already; in
> other words, we do not distinguish setting a property on an existing
> file (without content changes) from adding a file with properties.

No. It does make that distinction.

> Would it be better to make a distinction --- for example, by generating
> a /^new file/ line in the latter case?  (that would be explicit and more
> friendly to non-property-aware tools)

That's already happening. Here's an empty file foo, which starts
out as locally added + an svn:keywords file set on it:

$ svn diff --git foo
Index: foo
===================================================================
diff --git a/trunk/foo b/trunk/foo
new file mode 10644

Property changes on: trunk/foo
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id

$ svn ci -mm foo
Adding         foo
Transmitting file data .
Committed revision 3.
$ svn ps svn:eol-style native foo
property 'svn:eol-style' set on 'foo'
$ svn diff --git foo
Index: foo
===================================================================
diff --git a/trunk/foo b/trunk/foo
--- a/trunk/foo (revision 3)
+++ b/trunk/foo (working copy)

Property changes on: trunk/foo
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
$ 

Stefan

Reply via email to