mac - reinstall bazaar

Asked by thom_s

After reinstalling 10.6 and recovering everything - exept the program folder, just some of them - bazaar would not work.

I tried to install a new version of bazaar, 2.3.1, but it didn't work.
I've tried to clean the old files, https://answers.launchpad.net/bzr/+question/31819, (though I didn't understand Guillermos 1) and 2) - as I'm new to Terminal and "such things".
Reinstalled - not working.
Tried with Python 2.7. Not working.
Reinstalled with python 2.6.6

Then I found there is a "bzr version" command. My says:

bzr version
Bazaar (bzr) 2.3.1
  Python interpreter: /usr/bin/python 2.6.1 (only python, not a version number)
  Python standard library: /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
  Platform: Darwin-10.7.0-i386-64bit
  bzrlib: /Library/Python/2.6/site-packages/bzrlib (not there)
  Bazaar configuration: /Users/thomas/.bazaar (not there)
  Bazaar log file: /Users/thomas/.bzr.log

My problem - see the parenthesises

part of bzr.log:

Ons 2011-03-30 08:46:27 +0200
0.050 bazaar version: 2.3.1
0.050 bzr arguments: [u'init', u'furet_bzr']
0.074 looking for plugins in /Users/thomas/.bazaar/plugins
0.074 looking for plugins in /Library/Python/2.6/site-packages/bzrlib/plugins
0.188 encoding stdout as sys.stdout encoding 'UTF-8'
0.456 creating repository in file:///Users/thomas/_websites/furet/furet_bzr/.bzr/.
0.487 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0x101901810> in file:///Users/thomas/_websites/furet/furet_bzr/
0.539 trying to create missing lock '/Users/thomas/_websites/furet/furet_bzr/.bzr/checkout/dirstate'
0.539 opening working tree '/Users/thomas/_websites/furet/furet_bzr'
0.621 opening working tree '/Users/thomas/_websites/furet/furet_bzr'
0.689 Transferred: 0kB (0.0kB/s r:0kB w:0kB)
0.689 return code 0

Ons 2011-03-30 08:46:33 +0200
0.050 bazaar version: 2.3.1
0.050 bzr arguments: [u'add', u'.']
0.074 looking for plugins in /Users/thomas/.bazaar/plugins
0.074 looking for plugins in /Library/Python/2.6/site-packages/bzrlib/plugins
0.186 encoding stdout as sys.stdout encoding 'UTF-8'
0.215 Transferred: 0kB (0.0kB/s r:0kB w:0kB)
0.223 Traceback (most recent call last):
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 926, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 1126, in run_bzr
    ret = run(*run_argv)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 691, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 713, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/builtins.py", line 648, in run
    tree, file_list = tree_files_for_add(file_list)
  File "/Library/Python/2.6/site-packages/bzrlib/builtins.py", line 96, in tree_files_for_add
    tree, relpath = WorkingTree.open_containing(file_list[0])
  File "/Library/Python/2.6/site-packages/bzrlib/workingtree.py", line 346, in open_containing
    control, relpath = bzrdir.BzrDir.open_containing(path)
  File "/Library/Python/2.6/site-packages/bzrlib/bzrdir.py", line 762, in open_containing
    return BzrDir.open_containing_from_transport(transport)
  File "/Library/Python/2.6/site-packages/bzrlib/bzrdir.py", line 794, in open_containing_from_transport
    raise errors.NotBranchError(path=url)
NotBranchError: Not a branch: "/Users/thomas/_websites/furet/".

Can anyone help me sove this. I'd like to get a clean install of bazaar. is it depending on a special version of python

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
thom_s
Solved:
Last query:
Last reply:
Revision history for this message
Martin Pool (mbp) said :
#1

Sorry thom, I don't really see what the problem is here. Are you saying "bzr version" completes successfully even though it seems to refer to nonexistent directories?

What does "ls -a /Users/thomas/_websites/furet/" tell you?

Revision history for this message
thom_s (thom-s) said :
#2

I do have a bazaar folder with a .bzr

lt-mac-5:furet_bzr thomas$ ls -a
. .. .bzr
lt-mac-5:furet_bzr thomas$ cd .bzr
lt-mac-5:.bzr thomas$ ls -a
. README branch-format checkout
.. branch branch-lock repository

You can see a screenshot of the files in finder here: http://www.screencast.com/t/8Py1zwQhoVn

Revision history for this message
Vincent Ladeuil (vila) said :
#3

0.050 bzr arguments: [u'init', u'furet_bzr']
...
0.050 bzr arguments: [u'add', u'.']
...NotBranchError: Not a branch: "/Users/thomas/_websites/furet/".

Try:

  cd furet_bzr
  bzr add .

or more probably you wanted:

  cd /Users/thomas/_websites/furet/
  bzr init .
  bzr add .

you can then 'rm -fr furet_bzr'

You need to be in a directory where bzr can find a '.bzr' directory (or find one in the *parent* directories). bzr will never search for a '.bzr' directory in subdirectories.

Revision history for this message
thom_s (thom-s) said :
#4

Thanks a lot!

Seems that my problem was a restart of the computer...
Now when I try the same command as I did earlier, it creates a .bzr directory. Earlier it created a "normal" directory with the name I gave it in the init command.

Now I've also got the user/.bazaar directory.
 /Library/Python/2.6/site-packages/bzrlib is also there

Restart seemed to do all that. I don't know why, but as long as it works it's ok:)