add subtree reference should not traceback on non-subtree formats

Bug #188954 reported by zurgutt
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

I tried to have part of working tree in two repositories, like this:

zrg@aivas:~$ mkdir webroot
zrg@aivas:~$ mkdir webroot/subsite

zrg@aivas:~$ cd webroot/subsite
zrg@aivas:~/webroot/subsite$ bzr init --rich-root-pack
zrg@aivas:~/webroot/subsite$ echo "v1" > subsite_file.txt
zrg@aivas:~/webroot/subsite$ bzr add
added subsite_file.txt
zrg@aivas:~/webroot/subsite$ bzr commit -m "Subsite initial, v1"
Committing to: /home/zrg/webroot/subsite/
added subsite_file.txt
Committed revision 1.

zrg@aivas:~/webroot/subsite$ cd ..
zrg@aivas:~/webroot$ bzr init --rich-root-pack
zrg@aivas:~/webroot$ bzr join subsite --reference
zrg@aivas:~/webroot$ bzr add

bzr: ERROR: exceptions.AssertionError: repository of <WorkingTree4 of /home/zrg/webroot> doesn't support tree references required by entry 'subsite'

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 806, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 762, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 384, in run
    no_recurse, action=action, save=not dry_run)
  File "/usr/lib/python2.5/site-packages/bzrlib/mutabletree.py", line 51, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/mutabletree.py", line 284, in smart_add
    inv = self.inventory
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 425, in _get_inventory
    self._generate_inventory()
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 363, in _generate_inventory
    % (self, name)
AssertionError: repository of <WorkingTree4 of /home/zrg/webroot> doesn't support tree references required by entry 'subsite'

Revision history for this message
James Westby (james-w) wrote :

Hi,

The error is trying to tell you that the format you are using does not
support subtrees. Admittedly this is a bit cryptic, and it would
be good to have a sensible error here.

You should bzr upgrade --pack-0.92-subtree to enable
support.

This option is hidden as subtree support is still experimental.

Thanks,

James

Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
tags: added: join
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.