0

What is the default behaviour of an svn update command on a parent that has a switched child, more precisely, what is the effect on the switched child?

For instance:

trunk/
trunk/child1/
trunk/child2/ <- switched to branch/myBranch/child2/

In this situation branch/myBranch/ is a copy of trunk/ (done with Copy within repository...).

If I do a svn update on trunk/, will child2/ be updated to the HEAD revision of myBranch or will it be left untouched?

I thought it would have been left untouched, and assumed that for years, but I recently noticed that my switched directory was also updated in the process. I'm wondering if I was assuming wrong, or if there was a bug with my client.

The SVN book at red-bean is mute on that subject.

My client is SmartSVN 7.6.3 (build #69).

Thanks all for the input.

Vaillancourt
  • 1,380
  • 1
  • 11
  • 42
  • as Dr Egon from ghostbusters said, "don't cross the streams". You're going to be a happier camper if you just checkout the project again on the branch. If you find yourself often mixing branches in your working copy - you may consider moving some of those directories up to be their own project. – thekbb Dec 17 '13 at 16:42
  • Unfortunately, I'm quite stuck with the current structure of our repository/projects; each `child` is a project (it contains files and folders), and we have only one repository. Doing additional checkouts would take time and be tedious because the content is quite large and the local working copy is expected to be in a specific location on disk. In the end, I'll be able to manage it one way or another (switch everything or be careful when I update/merge), but still, I'm curious to know what's the default behaviour in that situation. – Vaillancourt Dec 17 '13 at 17:03

2 Answers2

1

It will be updated against its switched directory. This is the desired feature. That way you can build your working directory tree based on various branches.

The command

svn status

will indicate you that an item have a switched URL with a 'S' in the fifth column. And the command

svn info

will show you against wich repository your working file or directory will be synchronized with.

ptitpion
  • 156
  • 4
  • It seems I've been living a lie for the last couple of years, as this has also been confirmed by the maker of SmartSVN. Thanks! – Vaillancourt Dec 17 '13 at 18:31
0

You might also like set the 'svn:external' keyword property on some directory. That way you can have multiple svn repository and separate history for your various repository/projects.

ptitpion
  • 156
  • 4