What is a branch?
Jesse Glick
jesse.glick at sun.com
Sun Feb 10 14:36:48 CST 2008
Mark A. Flacy wrote:
> Perhaps it would be more useful to mention those cases where
> manipulating a "set of changesets in a named branch in a repository
> containing other named branches" is superior to manipulating a "set
> of changesets in a special repository." I cannot think of any, but
> there are others in the list who should be able to do so.
1. Using a separate repository forces you to have a separate working
directory, which is a big deal if your checkout is a gigabyte and your
build process takes an hour and you have environment variables and
various tools expecting your sources at a particular file path. Could
also be solved using the experimental local branches extension, I guess.
Using a separate repository does have the advantage that you can leave
uncommitted local modifications in one repository while working on
another, without using the often-wished-for "shelve" feature or its
equivalent.
2. For long-lived branches that get merged back, committing to a named
branch records a branch name in history, making it perhaps easier to
understand where a set of changes came from. Otherwise the branch is
anonymous after it has been merged and its old repository is discarded.
More information about the Mercurial
mailing list