What's the best practice to make a new branch based on project without trunk directory in SVN?

StackOverflow https://stackoverflow.com/questions/11335680

  •  19-06-2021
  •  | 
  •  

Question

I just jumped in a project, and the project is maintained in SVN. However it does not have trunk directory, and now I want to do some experiments on the project, but I don't want to interfere with other people's work, then I think I should make a branch, but I can not reorganize the project with a new trunk, then what's the best practice to make a new branch based on project without trunk directory?

Was it helpful?

Solution

trunk is just a conventional name. If everything is at least contained in a directory (and not directly at the root), you may create a branch of this directory. If everything is directly under the root, talk to your colleagues and decide to follow the best practices with them: move everything under a trunk directory.

OTHER TIPS

You could make a trunk directory and move the tree into it using a SVN relocate command.

Alternatively you could just make a tags/branches directory and use them, its messy but without some re-org then its always going to be messy :(

Create a branches folder at the parent level of the project and branch to it.

Let's use a distributed version control system (as Baazar, but Git or Mercurial will go the same).

With BZR, you can make a branch from SVN, and push that branch where you want : locally on your HDD, network, http/ftp server etc ...
You have the benefit to be sync with SVN, and to put you branch where you want, even push it back to SVN quickly. No interference with other people repository.

And you can use all the new features from such distribute tool (3 way merges, local commit, greater speed).
I would recommand Bazaar as it is really close to SVN.

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