From 840bb53f5b652c1373b9072c576a7eed8663eb7b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 14 Dec 2008 15:57:13 +0000 Subject: [PATCH] Fixed: CVS browser should not show dead revisions (deleted files) (#2319). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2135 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/cvs_adapter.rb | 2 +- test/unit/repository_cvs_test.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb index 77a300b60..fc8d56f83 100644 --- a/lib/redmine/scm/adapters/cvs_adapter.rb +++ b/lib/redmine/scm/adapters/cvs_adapter.rb @@ -63,7 +63,7 @@ module Redmine logger.debug " entries '#{path}' with identifier '#{identifier}'" path_with_project="#{url}#{with_leading_slash(path)}" entries = Entries.new - cmd = "#{CVS_BIN} -d #{root_url} rls -ed" + cmd = "#{CVS_BIN} -d #{root_url} rls -e" cmd << " -D \"#{time_to_cvstime(identifier)}\"" if identifier cmd << " #{shell_quote path_with_project}" shellout(cmd) do |io| diff --git a/test/unit/repository_cvs_test.rb b/test/unit/repository_cvs_test.rb index 6615f73bf..47c407037 100644 --- a/test/unit/repository_cvs_test.rb +++ b/test/unit/repository_cvs_test.rb @@ -53,6 +53,12 @@ class RepositoryCvsTest < Test::Unit::TestCase @repository.fetch_changesets assert_equal 5, @repository.changesets.count end + + def test_deleted_files_should_not_be_listed + entries = @repository.entries('sources') + assert entries.detect {|e| e.name == 'watchers_controller.rb'} + assert_nil entries.detect {|e| e.name == 'welcome_controller.rb'} + end else puts "CVS test repository NOT FOUND. Skipping unit tests !!!" def test_fake; assert true end -- 2.39.5