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

Re: Directory conflict when adding and switching a file

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 16 Sep 2008 17:06:11 +0100

On Tue, 2008-09-16 at 16:21 +0100, Julian Foad wrote:
> On Tue, 2008-09-16 at 07:52 -0700, Blair Zajac wrote:
> > Hi Julian,
> >
> > When trying to merge r33082 from trunk into the file-conflicts branch,
> > I ran into a problem with a directory conflict on the directory that
> > will contain a file external. File externals are set up in a wc by
> > adding a new empty file and then switching it to the external URL.
> >
> > Here's how to replicate it using trunk_at_33094
> >
> > $ svn co http://svn.collab.net/repos/svn/trunk/notes/tree-conflicts
> > $ cd tree-conflicts/
> > $ touch foobar
> > $ svn add foobar
> > $ svn status
> > A foobar
> > $ svn switch http://svn.collab.net/repos/svn/trunk/notes/tree-conflicts/resolution.txt
> > foobar
> > E foobar
> > C .
> > $ svn status
> > C .
> > S foobar
>
> Thanks for the recipe. That's not supposed to happen! I'll take a look.

This is the subject of switch_tests.py 22: "switch a scheduled-add
file". The test just checks that the switch command doesn't throw an
error. I don't yet know what the intended behaviour was.

In fact, it seems it might never have been intended:

------------------------------------------------------------------------
r22489 | cmpilato | 2006-11-28 20:22:23 +0000 (Tue, 28 Nov 2006) | 13
lines

Add a new regression test for a behavior that I'm quite fond of, but
honestly was surprised to see in Subversion. That way, just in case
the behavior is accidental, it doesn't disappear as unintentionally as
it appeared.

The behavior: Subversion allows you to switch a scheduled-add file to
an arbitrary location without an intermediate commit. This is really
useful for implementing config-spec-like scenarios where custom files
need to be pulled into a working copy from somewhere else.

* subversion/tests/cmdline/switch_tests.py
  (switch_scheduled_add): New test.
  (test_list): Add reference to switch_scheduled_add().
------------------------------------------------------------------------

I'll go and find out what it used to do.

- 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-09-16 18:06:24 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.