Patch #1685

Bazaar repository browsing

Added by Dmitry Shaposhnik about 9 years ago. Updated almost 9 years ago.

Status:ClosedStart date:2008-07-27
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:SCM
Target version:0.8

Description

When using Redmine with shared bzr repository (only .bzr dir) repository browser doesn't show any files.
It is caused by using 'bzr ls' command without arguments. To show last revision 'bzr ls' should be called with '-r last:1' or '-r -1' param (they are equal).
So here is the patch:

Index: lib/redmine/scm/adapters/bazaar_adapter.rb
===================================================================
--- lib/redmine/scm/adapters/bazaar_adapter.rb    (revision 1699)
+++ lib/redmine/scm/adapters/bazaar_adapter.rb    (working copy)
@@ -50,7 +50,8 @@
           path ||= ''
           entries = Entries.new
           cmd = "#{BZR_BIN} ls -v --show-ids" 
-          cmd << " -r#{identifier.to_i}" if identifier && identifier.to_i > 0
+          identifier=-1 unless identifier && identifier.to_i > 0 
+          cmd << " -r#{identifier.to_i}" 
           cmd << " #{target(path)}" 
           shellout(cmd) do |io|
             prefix = "#{url}/#{path}".gsub('\\', '/')

Associated revisions

Revision 1994
Added by Jean-Philippe Lang almost 9 years ago

Fixed Bazaar shared repository browsing (#2101, patch #1685 by Dmitry Shaposhnik).

History

#1 Updated by Jean-Philippe Lang almost 9 years ago

  • Status changed from New to Closed
  • Target version set to 0.8

Committed in r1994. Thanks for the fix.

Also available in: Atom PDF