Question

The background is, I am basically a user of VSS i.e. visual source safe. I used to create branches there, such that : I have a folder in VSS named as 0.75 i.e. the version number, and all code files reside inside it. When the team completes working on 0.75, I create a branch (folder) named as 0.76 and branch all the code from 0.75 to 0.76. I also revoke all rights from 0.75 so that the code gets freeze and no one can make changes in the old branch. All starts using 0.76 then.

The question is, I want exactly same solution in SVN tortoise but I am unable to do it. It is confusing because the folder "Trunk" contains all the code currently i.e. code in 0.75 folder in my case. In which folder should I create 0.76 i.e. the next branch, in Trunk, Branch or Tag? And how to revoke rights from all the team from 0.75 folder?

Was it helpful?

Solution

The answer depends a bit on your goals. A lot of Subversion tools break or need to be told when there is no trunk folder. It's not set in stone but it's a common convention like what you have with VSS that everyone creates new branches all the time.

In Subversion, you don't create a new folder to work in. Instead, you always work in trunk/. Everyone does. No locking of files. Period.

When a new version is ready, you "copy" trunk into branch/0.76. So the workflow is exactly the other way around: You always work in a single folder (and you never revoke rights) and that folder is called trunk/.

Customers and consumers always get the latest version from branches/ which only contains stable versions.

Now this can cause all kinds of problems. If you want to keep your workflow, my suggestion is this: Create another top level folder, say users/. Every developer gets their own folder inside of that. So that would give us users/asma/ and users/digulla.

We both work on our folders independently. When merging, we decide who does it. Let's say you get to do it. Then I will tell you the revision of my "developer branch" that is stable.

You then check out trunk somewhere, merge your changes into trunk. When you're done, you then merge my changes into trunk as well. This version goes into testing. As we fix bugs, we do those in our work branches. They are then merged into trunk.

When trunk is ready to be released, a copy is made in branches/ which assigns it a new version.

That said, you may want to skip Subversion and move directly to a DVCS like Mercurial or Git. They make merging and branching almost painless, especially compared to VSS or SVN.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top