问题
I have a bzr repository called misc
. Naturally, it got clogged with lots of subdirectories which now deserve a repo of their own.
How do I detach a subdirectory, say misc/docs
, into a new repo called doc
?
I have tried:
bzr split misc/docs
But got :
bzr: ERROR: To use this feature you must upgrade your branch at
file:///home/adam/bzr/misc/ to a format which supports rich roots.
The repo is pushed into an external server, so I can delete and re-branch at will.
Thanks,
Adam
回答1:
Take a look at bzr-fastimport plugin. It has the command fast-import-filter which allows you to "filter" part of your tree. So usual workflow would be:
bzr fast-export > out.fi
bzr fast-import-filter -i mysubdir out.fi > new.fi
bzr fast-import new.fi
来源:https://stackoverflow.com/questions/2448161/bzr-detach-a-repository-subdirectory-into-a-new-repo