开发者

bzr: Detach a repository subdirectory into a new repo

开发者 https://www.devze.com 2022-12-22 19:39 出处:网络
I have a bzr repository called misc. Naturally, it got clogged with lots of subdirectories which now deserve a repo of their own.

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-br开发者_JAVA技巧anch at will.

Thanks,

Adam


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
0

精彩评论

暂无评论...
验证码 换一张
取 消