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

Re: [PATCH] Merge deleting a file - compare its content

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 07 Aug 2008 14:12:59 +0100

On Thu, 2008-08-07 at 14:08 +0200, Jens Seidel wrote:
> On Wed, Aug 06, 2008 at 05:53:53PM -0400, Paul Burba wrote:
> > On Wed, Aug 6, 2008 at 7:29 AM, Julian Foad <julianfoad_at_btopenworld.com> wrote:
> > > Here's an improved version. It now compares the properties as well as
> > > the text content. It ignores the "svn:mergeinfo" property because that
> > > property does not contribute to a difference in the file's current state
> > > but only tells how the file reached its current state.
>
> The svn:executable, svn:mime-type and svn:eol-style should not matter as
> well. This file is not changed just because it differs in these properties.

In some cases, you are right: the user would not care about the change
they made to one of those properties, if the file is simply being
deleted. However, in other cases, especially if the file is deleted
because the incoming change is renaming/moving it, then the user
probably does care and they will want to notice this difference and copy
the new property value to the new file. Therefore I think it is better
not to guess that the user won't care, but instead guess that they will
care.

> I often change these in one branch but forget it in another
> one (and merging is not always possible if the branches diverged a lot).

I'm not sure about "merging is not always possible": remember that the
very case we're discussing IS a merge.

> If the content is equal but other (non-trivial) properties are not, it

I cannot think of a rule that we could use to distinguish "important"
properties from "trivial" ones.

> is a good idea to keep the properties as proposed. But would it be OK to
> change the file to an empty one (the content matched the to be removed
> file, we are in trouble because of the properties only)? Maybe also
> changing the file content into:
>
> <<<<<<<<
> ========
> Subversion note: This file was indented to be removed but
> the properties didn't match. That's why it still exists with
> this pseudo conflict in it but with removed content.
> >>>>>>>>

Eww, no, I don't think it would be nice to have yet another "in-between"
result. Let us stick to the simple results: either the deletion is done
or it is not done.

Note that tree conflict handling will make this better. Specifically, if
the properties differ then a conflict will be raised and the user will
easily be able to say "resolve by using Theirs" which means delete the
file.

Thanks,
- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-08-07 15:13:25 CEST

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.