]> source.dussan.org Git - redmine.git/commitdiff
Fixed: CVS browser should not show dead revisions (deleted files) (#2319).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 14 Dec 2008 15:57:13 +0000 (15:57 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 14 Dec 2008 15:57:13 +0000 (15:57 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2135 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/cvs_adapter.rb
test/unit/repository_cvs_test.rb

index 77a300b60218f7d6880ec14f74dd0800cefbb25b..fc8d56f83ae975c4a5245c298269bbf4b31c13af 100644 (file)
@@ -63,7 +63,7 @@ module Redmine
           logger.debug "<cvs> 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|
index 6615f73bfc1e120c019f86e0d6ec3299c147c8ed..47c4070374680b18c50bd793937d685adf1ddc4f 100644 (file)
@@ -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