在bazaar存储库中配置.bzr目录路径

发布于 2024-11-10 02:33:05 字数 374 浏览 4 评论 0原文

我想创建一个 bazaar 存储库,并将 .bzr 目录放在版本化文件旁边。 我正在 git 中寻找像“--git-dir”这样的选项,或者一种实现相同目标的方法。最终我也会接受黑客攻击。

使用 bzrlib 的解决方案是可行的

当前结构示例

project/.bzr
project/foo_versioned_file
project/bar_versioned_file

Wannabe 结构

project/foo_versioned_file
project/bar_versioned_file
/unrelated_path/.bzr

I want to create a bazaar repository and have the .bzr directory not alongside the versioned files.
I'm searching for an option like "--git-dir" in git, or a way to achieve the same thing. Evenctually I'd accept an hack too.

A solution using bzrlib is feasible

Example current structure

project/.bzr
project/foo_versioned_file
project/bar_versioned_file

Wannabe structure

project/foo_versioned_file
project/bar_versioned_file
/unrelated_path/.bzr

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

﹉夏雨初晴づ 2024-11-17 02:33:05

bzr 中没有像 --git-dir 这样的东西,但如果您只需要避免在工作树上拥有完整的历史记录,那么值得考虑使用轻量级签出。轻量级签出允许您仅使用 .bzr/ 目录中的少量文件(但无论如何您都必须拥有它),并且真正的分支及其存储库及其历史记录可以保留在工作树之外。所以:

bzr branch bzr+ssh://HOST/REPO/BRANCH /unrelated_path
bzr checkout --lightweight /unrelated_path project

There is nothing like --git-dir in bzr, but if you only need avoid having the full history along your working tree, then it's worth to consider using lightweight checkouts. Lightweight checkouts allow you to use only small number of files in .bzr/ directory (but you have to have it anyway) and the real branch with its repository and its history can be kept outside the working tree. So:

bzr branch bzr+ssh://HOST/REPO/BRANCH /unrelated_path
bzr checkout --lightweight /unrelated_path project
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文