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

Re: svn commit: r1089856 - /subversion/trunk/subversion/tests/cmdline/switch_tests.py

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Tue, 12 Apr 2011 14:58:15 +0100

"Bert Huijben" <bert_at_qqmail.nl> writes:

> Ok, if I read this right you are assuming that that the switched path
> doesn't have local modifications.


Here's an example:

svnadmin create repo
svn mkdir -mm --parents file://`pwd`/repo/A/B/C
svn cp -mm file://`pwd`/repo/A file://`pwd`/repo/X
svn co file://`pwd`/repo/A wc
svn sw ^/X/B/C wc/B/C
svn cp wc/B wc/Z
svn ps p v wc/Z/C

So Z in the working copy is a copy of B and Z/C is a copy of the
switched B/C. Status sould show something like:

$ svn st wc
     S wc/B/C
A + wc/Z
 M S wc/Z/C

The copied switch doesn't get committed, it's just a switch, and changes
to Z/C affect the switch source /A/B/C not some future new URL. So a
commit would create /A/Z in the repository as a copy of /A/B_at_2 and
change the properties on /X/B/C. After the commit Z/C in the working
copy is still switched.

I don't know whether this is feasible in the current 1.7 model. It
probably involves putting Z/C at op-depth=0 inside the copy, which may
or may not work. It would also mean, as you pointed out, that the user
would want to be able to run 'svn up' on the op-depth=0 part of copy
which is likely to be difficult.

Once we can update inside the copy we can also implement switch inside
the copy, with that "switch-copy-commit", "copy-switch-commit" and
"copy-commit-switch" would all produce the same result.

Received on 2011-04-12 15:58:53 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.