Defect #7524

Root repository directory not displayed with Bazaar on Ubuntu 10.04

Added by David Bailey over 6 years ago.

Status:NewStart date:2011-02-02
Priority:LowDue date:
Assignee:-% Done:

0%

Category:SCM
Target version:-
Resolution: Affected version:

Description

On the Ubuntu 10.04 default install, the root directory of a Bazaar repository fails to display. The revisions are all present and all subdirectories and contents are present (eg I can manually set the "show" repository URL to pull out the full directory listing and revisions).

I traced this down to the construction of the 'bzr ls -v --show-ids' command at line 55 of 'bazaar_adapter.rb'

The issue is that, for the root directory of a repository, the 'target(path)' is constructed with a trailing '/'. For subdirectories there is no trailing '/' in the constructed path.

The output format of the 'bzr ls' command appears to differ depending on whether there is a trailing '/' or not, which causes the Regexp on line 59 to fail to match in the case of the root directory.

My fix was to change 'bazaar_adapter.rb:55' from:

cmd << " #{target(path)}"

to

cmd << " #{target(path).sub(/\/\'$/, "'")}"

I suspect there is a more elegant solution but this fix works for me!

Component versions as follows:

  • Redmine (Redmine 0.9.3.stable)
  • SQLite 3.6.22
  • Bazaar 2.1.1
  • Ruby 1.8.7
  • Rails 2.2.3-2

Apologies in advance but I don't have time to prepare a proper patch or to test against the latest version. As this is the current Ubuntu LTS release, I expect I'm not the only person who's come across this.

I trust this information is useful!

Regards, Dave

Related issues

Related to Redmine - Feature #2799: Support for Bazaar's shared reposetories (created with in... New 2009-02-21

Also available in: Atom PDF