“bzr 克隆”、“bzr 分支”和“bzr 签出”之间有区别吗?
显然,当给定 URL 作为参数并在非 bzr 目录中执行时,bzrclone
、bzrbranch
和 bzrcheckout
都会执行相同的操作。
后期Bazaar工作流程有什么不同吗?即 bzr commit
、bzr 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
分支和克隆是相同的,但分支和签出不相同。
查看结帐教程,您会发现结帐本质上将您直接执行的每个操作绑定在一起分行。因此,您所做的任何事情本质上都是“推送”的——显然,这是一个巨大的工作流程差异。
Branching and cloning are the same, but branching and checkouts are not the same.
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
push
ed when you do it -- obviously that's a huge workflow difference.bzr Branch
和bzr checkout
执行非常不同的操作。它们都为您提供了一个工作树,但是bzr checkout
只为您提供了一个工作树;直接在源存储库上提交和更新工作。bzrbranch
为您提供存储库新分支的工作树;此分支上的提交不会自动应用于源分支。我不确定克隆
。更新:根据评论,
checkout
为您提供完整的历史记录;看来是对的。从语义上讲,checkout
看起来和感觉就像是本地分支的集中式 VCS 结账;它通过保留本地历史记录(您可以离线浏览 - 一个优点)来实现这一点,但将其链接回原始历史记录,这样您只能在最新时提交,并且提交会自动推送。此外,可以通过解绑签出来在没有连接的情况下提交,在这种情况下它成为常规分支。bzr branch
andbzr checkout
do very different things. They both give you a working tree, butbzr 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 onclone
.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.正如其他发帖者所说,“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".