Reusing or delete branch name/path in a central repository
Talden
talden at gmail.com
Mon Dec 1 19:59:38 GMT 2008
> There does not seam to be a way to delete a branch from a central repository
> using Bazaar commands, e.g. "bzr branch –delete <path>". Is there a known
> workaround for this without providing access to the actual file system where
> the Bazaar repository is stored?
>
> I guess there is a good reasons for not including the delete branch support,
> and I would appreciate some comments regarding this issue, or if some one
> can post a link or search phrase with more information. I have searched for
> information and found this:
>
> https://bugs.launchpad.net/bugs/276295
>
>
> I imagine two uses for deleting branches:
>
> 1) After a branch has been merged into the parent, there is often little use
> of keeping the branch, especially after some time when the project has moved
> forward.
>
> 2) It would make it possible to reuse branch names/paths. E.g. the second
> time that someone wants to implement a specific feature.
Time to see if my own mental-model of bzr is correct since I know
little about the actual code.
Assumptions
1. You have a shared repository
2. You have several branches within that shared repository - that is,
their revisions are stored in the shared repository.
EG
/sharedrepo/
branch1/
branch2/
dev/
To remove the branch itself is trivial. Use the OS to delete the
branch folder. EG delete the "/sharedrepo/branch2" folder to remove
branch 2.
Now if that branch was never merged to anywhere and you want to
throwaway the revisions themselves you have a tougher problem as bzr
doesn't seem to provide an easy way to do this.
You could.
1. create another shared repo
2. create branches in the new shared repo from the branches you want
to keep from the old repo.
That will only pull the revisions you need across. However if there
were revisions without branch folders for you to branch in the old
repo you'll need to find out all unmerged tips of branches and then
branch from those (the 'heads' command from bzrtools can help here).
It would be nice if bzr offered a means of actively deleting an
unmerged tip back to the point it sprouted. Does anyone know if there
is a plugin to assist?
--
Talden
More information about the bazaar
mailing list