A branch from a sub-directory?
ian.clatworthy at internode.on.net
Sun Feb 15 22:28:13 GMT 2009
> Marius Kruger wrote:
>>> Is there a way to create a branch from that directory without bringing in
>>> the complete history of the previous branch but only the history of files
>>> in that subdirectory?
> Maybe this  suggestion is still valid (with tailor as filter):
> bzr fast-export > dump.txt
> filter dump.txt
> bzr fast-import < dump.txt
>  https://lists.ubuntu.com/archives/bazaar/2008q2/041664.html
That ought to work (though fast-import takes a filename or '-' to
mean 'read from stdin').
Perhaps I should make this use case easier by adding an option to
fast-import that takes a directory name, e.g. something like:
bzr fast-export > dump.txt
bzr init-repo ~/new-proj
bzr fast-import --only mydir dump.txt
bzr rm mydir
bzr commit -m "removed mydir as now a separate project"
If the idea is useful, I'd like some feedback on the best option
name. Would it be better to only support one dir, or make --only
be a list option, or make --only take a file containing the paths
of interest? (My leaning is towards a list option and items can
be plain files or symlinks as well, not just dirs.)
What do you think?
More information about the bazaar