Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should default folders be used?

I've seen repositories in SVN that did not at least create a local trunk, branches, and tags folders on the client.

So are the default folders required for use with SVN?

I'm using TortoiseSVN. I don't see why some people have the folders, but some do not in some implementations of repositories.

like image 725
PositiveGuy Avatar asked Nov 29 '22 20:11

PositiveGuy


1 Answers

As others have said, it is not required to have the trunk/branches/tags. These folders have no special meaning to subversion, it's just a best practice that you may use if it fits your needs.

But since you mentioned TortoiseSVN, there is one small detail: Tortoise will warn you when you try to commit to a sub-folder of /tags. It enforces that a tag is not modified once it is created (another best-practice).


Update (in response of your comment):

The best practices say that you should have "trunk", "branches" and "tags" folders in your repository. One way (probably the most common one) to use these folders is this:

  • trunk is where the main development takes place.
  • tags contains snapshots (copies) of important revisions/version of your source code (e.g. releases such as 1.0, 1.1, 2.0).
  • branches are used for maintenance of older versions, e.g. your product is on version 2, then you have the need to fix a bug in version 1.0 (you can then copy your 1.0 tag to a new branch and make modifications there).

Now to subversion, all folders (trunk, tags, branches) are "normal" folders. They have now special meaning and subversion does not treat them any different (which means you could modify what you have in "/tags/1.0" for example).

TortoiseSVN tries to enforce best-practices by warning you when you try to commit to a tag (since usually you want to keep tags as they were to be able to rebuild an older version of your product at any time).

like image 127
M4N Avatar answered Dec 09 '22 09:12

M4N