集市绑定树枝
在我的项目中,我有本地工作分支和网络驱动器上的分支 我在本地和网络一之间进行了“绑定分支” 我的想法是使用绑定选项自动备份每个本地提交。
当我在本地分支提交文件后,我在网络分支中收到一条消息 “工作树已过时,请运行‘bzr update’。”
我的问题是:
- 登录网络分支将显示更新的树。文件有更新吗?或者我必须“更新”?
- automirror 插件可以帮助我解决这种情况吗?
谢谢
In my project , i have local branch for working and branch on network drive
i did "bind branch" between local one and network one
My idea is to use the bind option for auto backup of each local commit.
After i commit files in the local branch , i receive a message in network branch
" Working tree is out of date, please run 'bzr update'."
my question is :
- Log on network branch will show the updated tree . Does the files are updated ? or i must do "update" ?
- automirror plugin will help me for this scenario?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将本地分支绑定到远程分支意味着对本地分支的提交将自动将该提交推送到远程分支。如果远程分支和本地分支不同步,提交将失败,本地或远程分支都不会受到影响,并且您的更改仍将位于工作树中。要使本地分支与远程分支同步,请使用
bzr update
。如果您的网络分支有工作树,那么当提交从本地分支推送到网络分支时,工作树不会自动更新。网络分支的工作树必须使用
bzr update
或 自动镜像或推送和更新。除非您确实需要网络分支中的工作树,否则我建议您使用 bzr reconfigure --branch 将分支重新配置为无树。如果您有网络分支所属的共享存储库,则还需要在存储库上使用 bzr reconfigure --with-no-trees 来阻止它在新分支上创建树。
Binding a local branch to a remote branch means that commits to the local branch will automatically push that commit to the remote branch. If the remote branch and the local branch are not in sync, the commit will fail and neither the local or remote branch will be affected and your changes will still be sitting in your working tree. To get your local branch in sync with the remote branch, use
bzr update
.If your network branch has a working tree, then the working tree is not automatically updated when commits are pushed from the local branch into the network branch. The network branch's working tree has to be updated with
bzr update
or plugins like automirror or push-and-update.Unless you actually need the working tree in the network branch, I would recommend that you reconfigure the branch to be tree-less using
bzr reconfigure --branch
. If you have a shared repository that the network branch belongs to, you will also need to usebzr reconfigure --with-no-trees
on the repository to stop it creating trees on new branches.仅当您的本地和网络分支最新时,“绑定分支”功能才会成功。
因此提交失败,因为这两个工作副本之间存在差异。
The 'bind branch' feature will succeed only if your local and network branches are up-to-date.
So the commit failed as there is a difference between these 2 working copies.