سؤال

I've gotten the OpenERP source using the instructions.

I've moved the whole source directory somewhere else in my home.

Now, when I try to pull changes it throws errors:

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⟫

It isn't the make script that's at fault:

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⟫

The paths that are printed above seem to be stemming from each repository's .bzr/branch/location file.

I've discovered this file when I tried to fix this issue by using grep -rI /home/shahar. And then I've changed the path within this file from what it was to what you see now. I thought that it could perhaps fix the issue but it didn't. I still got the same errors (with the new paths).

I couldn't find any info about moving bzr repositories in the whole of the interwebs with Google or in StackOverflow.

Thanks.

هل كانت مفيدة؟

المحلول

The installation script you used seems to use the bzr-colo plugin to manage colocated branches. The bzr-colo manual indicates that because absolute pathnames are used to store references to branches, when a colocated workspace is moved on disk, the link from the checkout to the current branch gets broken.
This can theoretically be fixed by running bzr colo-fixup in the broken branch directory, however it does not seem work very often (in my experience).

In that case the manual recommends running this command to re-force a branch switch:

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

According to the output of your commands, this should be:

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

for you.

You do not even need to edit the .bzr/branch/location first, as it will be correct after the switch. This has always fixed the situation for me.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top