Creating a new branch based off sub-directory of an existing branch?

Ian Clatworthy ian.clatworthy at canonical.com
Tue Aug 25 00:54:22 BST 2009


keith321 wrote:
> Hi all,
> 
> I was wondering if anyone knew of an efficient way of creating a new branch
> based off of a part (e.g. sub-directory) of an existing branch?

Hi Keith,

bzr-fastimport has a command called fast-import-filter that's designed
for exactly that. It will create a brand new repository with new
file-ids and revisions-ids, so you'll lose the ability to merge changes
easily from the old repository. On the bright side of things, the new
repository will have history for files in the directory of interest but
no history (or overhead) for the rest of tree.

See http://doc.bazaar-vcs.org/plugins/en/fastimport-plugin.html and the
documentation on fast-import-filter in particular.

Ian C.



More information about the bazaar mailing list