tags:

views:

3415

answers:

4

Under what circumstances would this or would this not be safe? I have a branch that has a four changes (no file add or deletes). Would this be safe to delete?

Edit: The reason for wanting to delete it is that it was misnamed and is going to lead to confusion.

+3  A: 

I believe that CVS won't actually delete the branch, it will just remove the tag from the branch -- so the branch is still present in each ",v" file that is affected, it just won't be trivially accessible any more. The result is weird, but probably not dangerous.

Curt Hagenlocher
This is a really good point. Removing the name of the branch is different from actually removing the branch completely (which requires modifying the repository directly). Other than compulsive neatness, there's porobably no good reason to try to remove a branch from the repository.
Mark Bessey
A: 

Curt is correct, to delete a branch you have to physically run a delete command from the box.

It seems like in the case you mentioned, it would be ok to delete it.

Mike Fielden
+1  A: 

Deleting branches is normally not recommended because it loses so much history and cannot be undone. The general recommendation is actually to only remove a branch when it is very young, and when you've made a mistake. Like a typo in the branch name.

Darron
+1  A: 

If a branch is empty (you didn´t commit anything in it), than it is ok to deleted, it work just like untagging files. But if you already have a commited some files a few times, this would be a little dangerous since you can remove the branch reference, but not the files under it. This would be messy at least.

Instead if really want to "secure" this branch, you could lock the files under(by script is better) so no one could make changes to it anymore and forget about it.

Decio Lira