快速将bzr下的目录作为远程存储的共享存储库

发布于 2024-08-27 05:00:06 字数 503 浏览 3 评论 0原文

我在一堆不同计算机上的一堆不同目录中有一堆小项目。我还有一个远程服务器,我可以愉快地通过 bzr+ssh 访问它。

看起来应该非常容易(1)将目录置于 bzr 控制之下(“bzr init ; bzr add”——好吧,不用担心); (2) 将该目录放置在远程服务器上(当然,“bzr Push”可以工作); (3) 将整个内容转换为共享存储库(嗯...?); (4) 让服务器拥有主副本(嗯?...); (5) 能够从其他地方以标准 SVN 样式格式查看它。

我见过的每个教程都以错误的(“我是服务器管理员”)方向进行:它首先告诉您在登录到远程服务器时挥动神奇的 init-repo 魔杖,然后移动文件,等等。 ETC。;但重点是我不想多次做那些忙碌的工作。

我见过人们以“正确”的方式做到这一点——四到五行,一切都已设置完毕,从本地计算机上充满文件的目录开始,到仍然存在的同一目录结束,充当远程共享存储库(作为奖励,通过 bzr+ssh 完成所有远程工作,这样您就不必在单独的 shell 中远程登录)。他们是如何做到的?

I've got a bunch of little projects in a bunch of different directories on a bunch of different computers. I also have a remote server that I can happily bzr+ssh to.

It seems that it should be really easy to (1) put a directory under bzr control ("bzr init ; bzr add"--okay, no worries); (2) place that directory on the remote server ("bzr push" works, of course); (3) convert the whole thing to a shared repository (um...?); (4) make the server have the master copy (um?...); and (5) be able to check it out in standard SVN-style format from somewhere else.

Every tutorial I've seen goes about this in the wrong ("I am the server administrator") direction: it first tells you to wave your magic init-repo wand while logged into the remote server, and then move files over, etc. etc.; but the whole point is that I don't want to do all that busywork a bunch of times.

I've seen people do this the "right" way--four or five lines and it's all set up, starting with a directory full of files on the local machine, and ending with that same directory still there acting as a checkout of a remote shared repository (and as a bonus, doing all the remote work via bzr+ssh so you never have to log in remotely in a separate shell). How do they do it?

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

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

发布评论

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

评论(1

心舞飞扬 2024-09-03 05:00:06

我想说你把步骤(2)和(3)颠倒了。我还假设您可以 sftp 访问远程计算机上的目录,该目录将保存共享存储库,例如 sftp://rkerr@server/home/source。

I can't test this, but I think it would go something like:
(1) bzr init; bzr add
(2) bzr init-repo --no-trees sftp://rkerr@server/home/source/sharedRepo/
(3) bzr push --remember sftp://rkerr@server/home/source/sharedRepo/branchName
(4) start calling the server version the master copy* :)
(4.5) login elsewhere
(5) bzr checkout sftp://rkerr@server/home/source/sharedRepo/branchName

* 其他有用的事情是更改初始分支的 .bzr/branch/branch.conf 中的 *_location 属性。但实际上,DVCS 的全部要点是没有分支真正需要成为“主”分支。设置位置只是意味着 Bazaar 可以智能地猜测你想要推送、合并、拉取哪个分支等。

I would say that you have steps (2) and (3) reversed. I also assume that you have sftp access to a directory on the remote machine which will hold the shared repositories, say sftp://rkerr@server/home/source.

I can't test this, but I think it would go something like:
(1) bzr init; bzr add
(2) bzr init-repo --no-trees sftp://rkerr@server/home/source/sharedRepo/
(3) bzr push --remember sftp://rkerr@server/home/source/sharedRepo/branchName
(4) start calling the server version the master copy* :)
(4.5) login elsewhere
(5) bzr checkout sftp://rkerr@server/home/source/sharedRepo/branchName

* Other useful things to do would be to change the *_location properties in .bzr/branch/branch.conf of the initial branch. Really though, the whole point of DVCS is that no branch really needs to be the "master" branch. Setting locations just means that Bazaar can intelligently guess which branch you want to push, merge, pull, etc.

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