You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Blair Zajac <bl...@orcaware.com> on 2008/09/16 14:52:12 UTC

Directory conflict when adding and switching a file

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@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

Regards,
Blair


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Directory conflict when adding and switching a file

Posted by Julian Foad <ju...@btopenworld.com>.
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@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@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Directory conflict when adding and switching a file

Posted by Julian Foad <ju...@btopenworld.com>.
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@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.

- Julian



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org