Project

General

Profile

Defect #7615 » cvs-diff-r4820-trunk.diff

Jim Naslund, 2011-02-12 20:39

View differences:

test/functional/repositories_cvs_controller_test.rb (working copy)
154 154
      assert_tag :tag => 'td', :attributes => { :class => 'line-code diff_in' },
155 155
                               :content => /watched.remove_all_watcher/
156 156
    end
157
                               
158
    def test_diff_new_files
159
      @repository.fetch_changesets
160
      @repository.reload
161
      get :diff, :id => PRJ_ID, :rev => 1, :type => 'inline'
162
      assert_response :success
163
      assert_template 'diff'
164
      assert_tag :tag => 'td', :attributes => { :class => 'line-code diff_out' },
165
                               :content => /watched.remove_watcher/
166
      assert_tag :tag => 'td', :attributes => { :class => 'line-code diff_in' },
167
                               :content => /watched.remove_all_watcher/                               
168
      assert_tag :tag => 'th', :attributes => { :class => 'filename' },
169
                               :content => /test\/README	Thu Dec 13 11:25:10 2007/
170
      assert_tag :tag => 'th', :attributes => { :class => 'filename' },
171
                               :content => /test\/images\/delete.png	Thu Dec 13 11:25:10 2007/
172
      assert_tag :tag => 'th', :attributes => { :class => 'filename' },
173
                               :content => /test\/images\/edit.png	Thu Dec 13 11:25:10 2007/
174
      assert_tag :tag => 'th', :attributes => { :class => 'filename' },
175
                               :content => /test\/sources\/watchers_controller.rb	Thu Dec 13 11:25:10 2007/                        
176
    end
157 177

  
158 178
    def test_annotate
159 179
      @repository.fetch_changesets
lib/redmine/scm/adapters/cvs_adapter.rb (working copy)
346 346
        private
347 347
        def buildRevision(rev)
348 348
          if rev== 0
349
            @base
349
            if @branchid.nil?
350
              @base+".0"
351
            else
352
              @base
353
            end
350 354
          elsif @branchid.nil? 
351 355
            @base+"."+rev.to_s
352 356
          else
lib/redmine/unified_diff.rb (working copy)
28 28
      diff_table = DiffTable.new(diff_type)
29 29
      diff.each do |line|
30 30
        unless diff_table.add_line line
31
          self << diff_table if diff_table.length > 1
31
          self << diff_table
32 32
          diff_table = DiffTable.new(diff_type)
33 33
        end
34 34
        lines += 1
(3-3/4)