简体   繁体   中英

Creating a branch with TortoiseSVN without /trunk structure

Background: We have our source code saved in an SVN repository at our own server. We have Team A working on the main functionality of the website. We are looking to work with a Team B on the design aspects which will be at a different location.

A long time back when setting up the SVN repository, I created it with a structure which was finally accessible at:

svn://www.myserver.com/main/abc

The source code files are present at the 'abc' level and in folders below that.

This has been working fine for us until now when I need to create a branch. Choosing TortoiseSVN → Branch/Tag seems to give me the option of creating a branch at:

svn://www.myserver.com/main/def

However, when I tried it last, it seemed to create a folder WITHIN 'abc' named 'def' which wasn't what I was expecting at all. I was hoping to create a completely separate copy of the repository which Team B could work on, and when it came time to merge the two - that could happen as smoothly as possible.

[I understand that when committing changes in 'abc', we will also have to commit in 'def']

A branch in svn is nothing more than a copy. If you're using an interface that gives the name "trunk" and "branches" special meaning (and the way you describe it, it seems that TortoiseSVN does so), try to avoid its branching function and simply create a copy directly. If you check out svn://www.myserver.com/main/, and then copy abc to def, you're all set. Team B can then check out svn://www.myserver.com/main/def.

Extended version of Hvd's answer

Repository layout is nothing more than accepted agreement about using tree. You can store mainline and side-work in any place of repository tree, while they aren't intersected.

In your description of current state of repo you miss one important thing: Where is repository root , on which level? Both situations "/main/" and "abc/" are solvable , but with different steps.

You can easy detect root even remote, using TSVN's Repository Browser. Can you access svn://www.myserver.com/main/ URL as repository or you'll get error?

Second question, related to repo-root is "Which URL TeamA use now for accessing repo?" Yes, I read and understand

structure which was finally accessible at svn://www.myserver.com/main/abc

but it leave some space for assumptions:

  • does TeamA checkout from svn://www.myserver.com/main/ and have ABC dir inside working copy
  • does TeamA checkout from svn://www.myserver.com/main/abc and have wotking space at the root immediatelly

(first version and svn://www.myserver.com/main as root from Q1 will require later re-checkout repository in order to exclude common root with TeamB space)

Resume

Find Repo-root, write it for us, we'll outline next steps in any case

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM