bzr: Detach a repository subdirectory into a new repo

China☆狼群 提交于 2019-12-12 01:18:55

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!