Server complaing about repo format

Asked by Panos Laganakos

I'm trying to push a 2a repo (through bzr+ssh), to my deployment server, though it won't let me saying:

bzr: ERROR: Server sent an unexpected error: ('error', "'Bazaar repository format 2a (needs bzr 1.16 or later)\\n'")

The user I'm pushing to though, has 2.1.0b3 installed locally (the system bzr is 1.14).

Shouldn't when using bzr+ssh the user's installation take precedence over the system install? Is there a way to enforce it? (the local bin comes in first by defining it i .bash_profile)

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
John A Meinel
Solved:
Last query:
Last reply:
Revision history for this message
John A Meinel (jameinel) said :
#1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Panos Laganakos wrote:
> New question #90844 on Bazaar:
> https://answers.launchpad.net/bzr/+question/90844
>
> I'm trying to push a 2a repo (through bzr+ssh), to my deployment server, though it won't let me saying:
>
> bzr: ERROR: Server sent an unexpected error: ('error', "'Bazaar repository format 2a (needs bzr 1.16 or later)\\n'")
>
> The user I'm pushing to though, has 2.1.0b3 installed locally (the system bzr is 1.14).
>
> Shouldn't when using bzr+ssh the user's installation take precedence over the system install? Is there a way to enforce it? (the local bin comes in first by defining it i .bash_profile)
>

Most often 'ssh' does not include user-local paths when running without
a shell. (Usually $HOME/bin is added to PATH during bash's startup.)

Instead, you can configure the remote bzr location in 'locations.conf'
(~/.bazaar/locations.conf on Linux)

In there you can add a line like:

[bzr+ssh://host]
bzr_remote_path = /home/user/bin/bzr

Which should cause us to try that bzr rather than the system-wide install.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksFUx8ACgkQJdeBCYSNAAN9AgCgiXZuZCStxEAxjV5RnSxLPvPI
bG0AoJJsYf2wFSxCZtCBO4gClZLUPMC4
=Fzrw
-----END PGP SIGNATURE-----

Revision history for this message
Panos Laganakos (panosl) said :
#2

Thanks John, will give it a try and get back to you :D

Revision history for this message
Panos Laganakos (panosl) said :
#3

Now it calls the right binary, but it still tries to load the module of the OS installation:

bzr: WARNING: bzrlib version doesn't match the bzr program.
This may indicate an installation problem.
bzrlib from ['/usr/lib/python2.6/dist-packages/bzrlib'] is version (1, 13, 1, 'final', 0)
Traceback (most recent call last):
...

When installing bzr with --home=~ it puts the bzrlib at ~/lib/python/bzr-2.1*

Revision history for this message
Best John A Meinel (jameinel) said :
#4

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Panos Laganakos wrote:
> Question #90844 on Bazaar changed:
> https://answers.launchpad.net/bzr/+question/90844
>
> Status: Answered => Open
>
> Panos Laganakos is still having a problem:
> Now it calls the right binary, but it still tries to load the module of
> the OS installation:
>
> bzr: WARNING: bzrlib version doesn't match the bzr program.
> This may indicate an installation problem.
> bzrlib from ['/usr/lib/python2.6/dist-packages/bzrlib'] is version (1, 13, 1, 'final', 0)
> Traceback (most recent call last):
> ...
>
> When installing bzr with --home=~ it puts the bzrlib at
> ~/lib/python/bzr-2.1*
>

So I always run from source by just doing:

python setup.py build_ext -i

and then using a symlink from
$HOME/bin/bzr => $HOME/source/bzr.dev/bzr

That finds the right 'bzrlib'.

I don't have much experience with getting stuff like PYTHONPATH set
correctly for ssh access, etc.

If you wanted, you could probably edit the first few lines of
"$HOME/bin/bzr" to do:

import sys # probably already done

sys.path.insert(0, '/home/user/lib/python/bzr-2.1...')

And then it should find the right bzrlib.

I thought there was something about using "py setup.py install --user"
or --prefix, or ... The details of custom installs of python libs and
scripts is a bit arcane to me. (Hence why I run from source :)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksFdFoACgkQJdeBCYSNAAOGqQCfWbp81JpYCJwC/DO1BCTO+jh8
aN0AoNXjk5GjCerKGpADkwFhsv1xfMkU
=fxmE
-----END PGP SIGNATURE-----

Revision history for this message
Panos Laganakos (panosl) said :
#5

Hey John,

injecting the home path /home/<user>/lib/python at the start of sys.path did the trick :D

I wish it could be solved in a cleaner way though :(

Revision history for this message
Panos Laganakos (panosl) said :
#6

Thanks John A Meinel, that solved my question.