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

Re: replace and changelists

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Thu, 24 Feb 2011 18:32:19 +0000

On Thu, 2011-02-24 at 18:01 +0000, Philip Martin wrote:
> Julian Foad <julian.foad_at_wandisco.com> writes:
>
> > On Thu, 2011-02-24, Philip Martin wrote:
> >> "C. Michael Pilato" <cmpilato_at_collab.net> writes:
> >> > On 02/23/2011 12:17 PM, Philip Martin wrote:
> >> >> Philip Martin <philip.martin_at_wandisco.com> writes:
> >> >>
> >> >>> Changelists only contain files in 1.6, but in 1.7 files can be replaced
> >> >>> with directories:
> >> >>>
> >> >>> $ svn changelist qq wc/foo
> >> >>> $ svn rm wc/foo
> >> >>> $ svn mkdir wc/foo
> >> >>>
> >> >>> Does the changelist qq refer to the replacing dir foo or only to the
> >> >>> replaced file foo?
> >> >
> >> > If a directory replaces a file with a changelist, the changelist should be
> >> > removed from that path. We do not allow changelist assignments on
> >> > directories, period, making the rest of your thread irrelevant:
> >>
> >> That's not what happens at present, I'll raise an issue. Should the
> >> mkdir fail, or should it remove the file from the changelist, or raise a
> >> tree conflict? This currently also happens during merge.
> >
> > The 'mkdir' should definitely NOT raise a tree conflict. Tree conflicts
> > are the result of merging two conflicting tree-change operations that
> > both apply to the same starting node. That's not at all what's
> > happening here.
>
> So mkdir should fail or remove the file from the changelist.

Yes. The "changelist" concept is simply not designed to support tree
changes and as a consequence we decided it didn't make sense for it to
support directories. We can't do anything clever here: we have to
accept this limitation (unless/until we redesign the "changelist"
concept).

> What about merge? It can replace a file with a directory. If the file
> has local mods then a tree conflict arises:

If we choose to remove the changelist association rather than bail out,
then we should do so not at the time of recording the conflict but at
the time of resolving it, i.e. at the time when the "working" version of
the file is deleted and replaced with the incoming dir. That will avoid
losing the changelist association if the user chooses to keep "mine",
which is good behaviour.

- Julian
Received on 2011-02-24 19:32:59 CET

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.