Fossil

View Ticket
Login

View Ticket

Ticket Hash: 6778fd3f4a480b4d4090513aca2a67684cc2ac54
Title: Need a Branch Delete option
Status: Fixed Type: Feature_Request
Severity: Important Priority:
Subsystem: Resolution: Overcome_By_Events
Last Modified: 2010-01-02 03:13:28
Version Found In: d5695157d0
Description:
Please add the ability to delete a branch using "fossil branch del xxx". This is great for experimental work where you create a branch to try out a feature, and then you simply delete it if things don't work out and you no longer have use for that branch.

chi added on 2009-12-21 00:46:47:
What do you mean by "delete"? Only removing the branch tag? That would be doable with the tag cancel subcommand.

Or do you want to remove all the checkins of that branch from the repository? This would be more difficult, was Fossil try hard never to forget anything already committed. Furthermore there would be the problem, that removed branches could come back by syncing with another repository that still has said branch. So this feature ought to have a very complex semantik I fear ...


anonymous added on 2009-12-31 17:14:59:
From what I get, I believe the original reporter ask for something similar to what git has.

git co -b crazyFeature hack, hack, hack... git ci -a hack, hack, hack... git ci -a

If you see that the crazy feature did finish correctly, then you are set up:

git co master; git merge crazyFeature; git branch -d crazyFeature

If the crazy feature was, well... just crazy, and you just want to drop away that crazy code:

git co master; git branch -d crazyFeature


anonymous added on 2010-01-01 22:32:12:
That is exactly what I meant. Assume the sole purpose of a branch I am creating is to implement a single feature and merge it into the main trunk. So, the branch is really obsolete after the merge is complete and I simply want to clear up the versioning clutter created by it. It is a simple method to cluster a group of work into its own manageable entity which allows for extremely easy cleanup with no versioning clutter if I decide to abandon the effort. Part of the beauty of distributed scm is that a novice like me can hack away on an experimental branch, then only merge things in a clean and professional fashion and delete all the mess and clutter I created in my experimental branch. This is important to me since some times it takes me many times to finally work out all the bugs in a code snippet and I don't really care for the rest of the world to see this. So, if deleting a branch isn't feasible, then simply making a branch private and non-pullable is good enough (which might already be implemented by fossil). Thanks for all your help, you guys do wonderful work :)


drh added on 2010-01-02 03:13:28:
To create a private branch, do this:

fossil commit -private

The resulting branch will never be synced to other repositories.