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
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.
精彩评论