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

Re: Do we want 'svn patch' to be able to add empty files?

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Thu, 02 Sep 2010 14:24:09 +0100

On Thu, 2010-09-02 at 14:03 +0200, Stefan Sperling wrote:
> On Thu, Sep 02, 2010 at 01:57:49PM +0200, Stefan Sperling wrote:
> > Right now, svn patch will always add an empty file if something is added
> > that only has props. But the patch might want to create a directory instead.
> > Is there a 1:1 mapping svn: propery -> node kind (file or dir)?
> > If so, we could get away with just checking the type of property when
> > deciding whether to create a file or a directory.
> Hmmm... that won't work for custom user properties, so we'll also need
> a more generic way of representing directories in a patch. But this is
> also something we can postpone until after 1.7. We should focus on
> properly supporting the svn: properties first, that's much more important.

Creation of a file or dir should have nothing to do with properties.
Many files and dirs don't even have properties, and for those that do,
we shouldn't care what they are.

I think application of a property diff should require that there is a
node to apply it to, and should not by itself cause the creation (nor
deletion) of a file or dir. This implies that when "svn diff --git"
finds a new file with empty content, it should write an "add a new file"
record before any property-adding diff. Similarly for dirs. Similarly
for deleting.

- Julian
Received on 2010-09-02 15:25:18 CEST

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