A branch from a sub-directory?
Ian Clatworthy
ian.clatworthy at internode.on.net
Sun Feb 15 22:28:13 GMT 2009
Gioele wrote:
> 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 [1] suggestion is still valid (with tailor as filter):
> bzr fast-export > dump.txt
> filter dump.txt
> bzr fast-import < dump.txt
> [1] 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
cd ~/new-proj
bzr fast-import --only mydir dump.txt
cd -
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?
Ian C.
More information about the bazaar
mailing list