“bzr 克隆”、“bzr 分支”和“bzr 签出”之间有区别吗?

发布于 2024-09-04 04:49:30 字数 201 浏览 7 评论 0原文

显然,当给定 URL 作为参数并在非 bzr 目录中执行时,bzrclonebzrbranchbzrcheckout 都会执行相同的操作。

后期Bazaar工作流程有什么不同吗?即 bzr commitbzr update 和朋友。

Obviously bzr clone, bzr branch and bzr checkout all do the same thing when given an URL as parameter and executed in a non-bzr directory.

Is there any difference for later Bazaar workflow? i.e. bzr commit, bzr update and friends.

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

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

发布评论

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

评论(3

老旧海报 2024-09-11 04:49:30

分支和克隆是相同的,但分支和签出相同。

$ bzr help branch
...
Aliases:  get, clone
See also: checkout

查看结帐教程,您会发现结帐本质上将您直接执行的每个操作绑定在一起分行。因此,您所做的任何事情本质上都是“推送”的——显然,这是一个巨大的工作流程差异。

分支和结账之间的区别

我们首先要说什么都没有
您可以通过结帐来完成
不能用普通的分支。一个
结帐只是启用不同的
默认值和工作流程助手。

结帐有什么作用

无论何时创建,都可以通过结帐
本地分支中的新条目,它也
在远程分支中创建它们。这
对应于诸如 bzr 之类的命令
提交
bzr pull。如果您尝试
提交新的更改,然后远程
Branch 的状态与
本地的,它会阻止你,并且
让你知道你已经过时了。
您可以使用bzr update来应用
本地远程更改。

Branching and cloning are the same, but branching and checkouts are not the same.

$ bzr help branch
...
Aliases:  get, clone
See also: checkout

Looking over the Checkout Tutorial, you'll see that a checkout essentially binds every action you take directly to the branch. So anything you do is essentially pushed when you do it -- obviously that's a huge workflow difference.

Difference between a Branch and a Checkout

Let's start by saying there is nothing
you can do with a Checkout that you
can't do with plain Branches. A
Checkout just enables different
defaults and workflow helpers.

What does Checkout do

With a Checkout, whenever you create
new entries in a local Branch, it also
creates them in a remote Branch. This
corresponds to commands like bzr
commit
and bzr pull. If you attempt to
commit a new changes, and the remote
Branch has a different state than the
local one, it will prevent you, and
let you know that you are out of date.
You can use bzr update to apply the
remote changes locally.

故事还在继续 2024-09-11 04:49:30

bzr Branchbzr checkout 执行非常不同的操作。它们都为您提供了一个工作树,但是 bzr checkout 只为您提供了一个工作树;直接在源存储库上提交和更新工作。 bzrbranch 为您提供存储库新分支的工作树;此分支上的提交不会自动应用于源分支。我不确定克隆

更新:根据评论,checkout为您提供完整的历史记录;看来是对的。从语义上讲,checkout 看起来和感觉就像是本地分支的集中式 VCS 结账;它通过保留本地历史记录(您可以离线浏览 - 一个优点)来实现这一点,但将其链接回原始历史记录,这样您只能在最新时提交,并且提交会自动推送。此外,可以通过解绑签出来在没有连接的情况下提交,在这种情况下它成为常规分支。

bzr branch and bzr checkout do very different things. They both give you a working tree, but bzr checkout gives you only a working tree; commits and updates work directly on/from the source repository. bzr branch gives you a working tree of a new branch of the repository; commits on this branch will not be automatically applied to the source branch. I'm not sure on clone.

Update: according to the comment, checkout gives you the full history; that seems right. Semantically, checkout looks and feels like a centralized VCS checkout with the branch locally; it implements this by keeping a local history (which you can browse offline - a plus), but linking it back to the original history so you can only commit when you're up-to-date and commits get automatically pushed. Moreover, it is possible to commit without connection by unbinding the checkout, in which case it becomes a regular branch.

定格我的天空 2024-09-11 04:49:30

正如其他发帖者所说,“bzr checkout”是“bzr clone/branch”的超集,因为“bzr checkout”创建了一个绑定分支。每当执行更新操作时,绑定分支都会从源存储库中拉出,并在执行提交时推送到源存储库。

要绑定克隆分支或取消绑定签出分支,请使用“bzr bind”/“bzr unbind”。

As the other posters have said, "bzr checkout" is a superset of "bzr clone/branch", in that "bzr checkout" creates a bound branch. Bound branches pull from the source repo whenever an update operation is performed and push to the source repo whenever a commit is performed.

To bind a cloned branch or unbind a checked-out branch, use "bzr bind"/"bzr unbind".

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