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

Re: [Issue 3474] making a new subdir, moving files into it and then renaming the subdir, breaks history of the moved files

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Tue, 14 Sep 2010 04:07:24 +0200

Johan Corveleyn wrote on Sat, Sep 11, 2010 at 00:02:16 +0200:
> On Fri, Sep 10, 2010 at 11:45 PM, <johanco_at_tigris.org> wrote:
> > http://subversion.tigris.org/issues/show_bug.cgi?id=3474
> >
> > ------- Additional comments from johanco_at_tigris.org Fri Sep 10 14:45:17 -0700 2010 -------
> > This issue seems to be fixed on trunk. The described scenario now goes as follows:
> >
> > (assuming we're in a working copy with a versioned file a.txt)
> > [[[
> > $ svn mkdir subdir
> > A         subdir             # same as in 1.6
> >
> > $ svn mv a.txt subdir
> > A         subdir\a.txt
> > D         a.txt              # same as in 1.6
> >
> > $ svn st
> > A       subdir
> > A  +    subdir\a.txt
> > D       a.txt                # same as in 1.6
> >
> > $ svn mv subdir subdir2
> > A         subdir2
> > D         subdir\a.txt
> > D         subdir             # different! will ask on dev list about this.
>
> Is the above output an expected change of behavior? Previously (in
> 1.6) the above action generated the following output (as can be seen
> in the original description of issue 3474):
>
> [[[
> $ svn mv subdir/ subdir2
> A subdir2
> A subdir2\a.txt
> D subdir
> ]]]
>
> It's no problem for me (the result is perfectly fine), just wondering ...
>
> In fact, I never quite understood the output in 1.6 (why are all
> children of a moved directory shown as deleted, and not as added in
> the new dir?). But I don't understand it now either (I can reverse the
> question).

The other way around, right? What you describe here as 1.6's behaviour
is in fact 1.7's behaviour (and vice-versa)...

> Is there any rational explanation, any underlying
> reasoning, principles, ... ?
>

When a directory is removed, then everything under it (all children and
descendants) implicitly ceases to exist too. (Consider the grandfather
paradox.) So I can see the 'D subdir/a.txt' notification as redundant.

On the other hand, after the move two new nodes exist: 'subdir2/' and
'subdir2/a.txt'. So it would be appropriate to generate notifications
that allow the client to infer that both of them exist.

There are several options to do that: perhaps 'A + subdir2/' or (more
accurately) 'A subdir2/ has_children=True', or 'A subdir2/; A subdir2/a.txt'.

> Cheers,
> --
> Johan
Received on 2010-09-14 04:11:40 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.