Bazaar存储库被移动它破坏了

时间:2013-11-28 19:30:49

标签: directory branch openerp rename bazaar

我使用the instructions获得了OpenERP源代码。

我已将整个source目录移到我home的其他位置。

现在,当我尝试pull更改时,它会抛出错误:

shahar@shahar-desktop:~/src/openerp⟫ make pull
# update all trunk branch
for i in addons client oldweb web server; do [ -d $i ] && (cd $i && bzr pull && cd ..); done
bzr: ERROR: Not a branch: "/home/shahar/src/openerp/addons/.bzr/branches/origin/trunk/
/".
bzr: ERROR: Not a branch: "/home/shahar/src/openerp/client/.bzr/branches/origin/trunk/
/".
bzr: ERROR: Not a branch: "/home/shahar/src/openerp/web/.bzr/branches/origin/trunk/
/".
bzr: ERROR: Not a branch: "/home/shahar/src/openerp/server/.bzr/branches/origin/trunk/
/".
make: *** [pull] Error 3
2 shahar@shahar-desktop:~/src/openerp⟫

make脚本不是错误的:

2 shahar@shahar-desktop:~/src/openerp⟫ cd server/
shahar@shahar-desktop:~/src/openerp/server⟫ bzr pull
bzr: ERROR: Not a branch: "/home/shahar/src/openerp/server/.bzr/branches/origin/trunk/
/".
3 shahar@shahar-desktop:~/src/openerp/server⟫

上面打印的路径似乎源于每个存储库的.bzr/branch/location文件。

当我尝试使用grep -rI /home/shahar解决此问题时,我发现了此文件。然后我将此文件中的路径从原来的路径更改为您现在看到的路径。我认为它可能解决问题,但事实并非如此。我仍然遇到相同的错误(使用新路径)。

我找不到任何关于在Google或StackOverflow中在整个互联网中移动bzr存储库的信息。

感谢。

1 个答案:

答案 0 :(得分:5)

您使用的安装脚本似乎使用bzr-colo插件来管理共置分支。 bzr-colo手册指出,因为绝对路径名用于存储对分支的引用,所以当在磁盘上移动共同定位的工作空间时,从结账到当前分支的链接会被破坏。 理论上可以通过在损坏的分支目录中运行bzr colo-fixup来解决这个问题,但是根据我的经验,它看起来并不常用。

在这种情况下,manual建议运行此命令以重新强制分支交换机:

    bzr switch --force .bzr/branches/<current branch name>

根据命令的输出,这应该是:

    bzr switch --force .bzr/branches/origin/trunk

给你。

您甚至不需要先编辑.bzr/branch/location,因为切换后它是正确的。这一直是我的情况。