Status doesn't work over symlink

Bug #250600 reported by Alexandre Garnier
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

When referencing a branch through a symlink without trailing '/', bzr status doesn't work (unlike diff) with a not very helpfull message :

$ bzr init branch
$ touch branch/file
$ bzr add branch/file
added file
$ bzr st branch
added:
  file
$ bzr st branch/
added:
  file
$ ln -s branch link
$ ls -l
total 4,0K
drwxr-xr-x 3 alex alex 4,0K 2008-07-21 21:25 branch/
lrwxrwxrwx 1 alex alex 6 2008-07-21 21:25 link -> branch/
$ bzr st link
bzr: ERROR: link is not in the same branch as link
$ bzr st link/
added:
  file
$ bzr diff link
=== added file 'file'

.bzr.log of error :
0.062 encoding stdout as sys.stdout encoding 'UTF-8'
0.063 bzr arguments: [u'st', u'link']
0.063 looking for plugins in /home/alex/.bazaar/plugins
0.090 looking for plugins in /usr/lib/python2.5/site-packages/bzrlib/plugins
0.090 Plugin name __init__ already loaded
0.090 Plugin name __init__ already loaded
0.101 encoding stdout as sys.stdout encoding 'UTF-8'
0.158 opening working tree '/home/alex/tmp/bzr/branch'
0.161 Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 834, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 790, 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/commands.py", line 800, in ignore_pipe
    result = func(*args, **kwargs)
  File "/home/alex/.bazaar/plugins/xmloutput/__init__.py", line 75, in run
    builtins.cmd_status.run(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 800, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 185, in run
    tree, file_list = tree_files(file_list)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 67, in tree_files
    (e.path, file_list[0]))
BzrCommandError: link is not in the same branch as link

0.161 return code 3

0.062 encoding stdout as sys.stdout encoding 'UTF-8'
0.063 bzr arguments: [u'st', u'link/']
0.063 looking for plugins in /home/alex/.bazaar/plugins
0.089 looking for plugins in /usr/lib/python2.5/site-packages/bzrlib/plugins
0.090 Plugin name __init__ already loaded
0.090 Plugin name __init__ already loaded
0.101 encoding stdout as sys.stdout encoding 'UTF-8'
0.157 opening working tree '/home/alex/tmp/bzr/branch'
0.161 check paths: ['']
0.163 return code 0

James Westby (james-w)
Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Martin Pool (mbp) wrote :

This has the same root cause as bug 128562 and with that fixed, you should see:

 bzr st link/ -- status of the referenced branch
 bzr st link -- tells you about changes to the link

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.