开发者

bazaar bind branches

开发者 https://www.devze.com 2023-04-10 06:35 出处:网络
In my project , i have local branch for working and branch on network drive i did \"bind branch\" between local one and network one

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 :

  1. Log on network branch will show the updated tree . Does the files are updated ? or i must do "update" ?
  2. automirror plugin will help me for this scenario?
开发者_开发知识库

thanks


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 use bzr 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号