subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philip Martin <>
Subject Re: Switching
Date Thu, 22 Aug 2013 17:56:38 GMT
John Maher <> writes:

> I use one folder for my source code (all branches) mainly because of
> vendor requirements the code must be run from the same directory.  I
> have created two branches for two new features.  One feature extends
> an existing library.  The other feature adds a new library as well as
> extending an existing one.  When I switch I create a conflict because
> the directory exists in one branch and not the other:
> local unversioned, incoming add upon switch
> This may or may not be what is supposed to happen, that would be the
> first thing I would like to know.  How to fix it would be the second
> thing that I would like to know.

svnadmin create repo
svn -mm mkdir file://`pwd`/repo/A
svn -mm cp file://`pwd`/repo/A ^/B
svn -mm mkdir file://`pwd`/repo/B/X
svn co file://`pwd`/repo/B wc
touch wc/X/f                        # an unversioned file

Switch can't remove wc/X because wc/X/f exists:

svn sw ^/A wc
svn st wc
?       wc/X

The unversioned wc/X will cause a conflict when switching back:

svn sw ^/B wc --accept postpone
svn st wc
D     C wc/X
      >   local dir unversioned, incoming dir add upon switch
?       wc/X/f
Summary of conflicts:
  Tree conflicts: 1

The conflict can be resolved by reverting the delete:

svn revert -R wc/X
svn st wc
?       wc/X/f

The original unversioned wc/X/f has been preserved across both switches.

Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*

View raw message