Defect #7615 » cvs-diff-r4820-trunk.diff
| test/functional/repositories_cvs_controller_test.rb (working copy) | ||
|---|---|---|
|
assert_tag :tag => 'td', :attributes => { :class => 'line-code diff_in' },
|
||
|
:content => /watched.remove_all_watcher/
|
||
|
end
|
||
|
|
||
|
def test_diff_new_files
|
||
|
@repository.fetch_changesets
|
||
|
@repository.reload
|
||
|
get :diff, :id => PRJ_ID, :rev => 1, :type => 'inline'
|
||
|
assert_response :success
|
||
|
assert_template 'diff'
|
||
|
assert_tag :tag => 'td', :attributes => { :class => 'line-code diff_out' },
|
||
|
:content => /watched.remove_watcher/
|
||
|
assert_tag :tag => 'td', :attributes => { :class => 'line-code diff_in' },
|
||
|
:content => /watched.remove_all_watcher/
|
||
|
assert_tag :tag => 'th', :attributes => { :class => 'filename' },
|
||
|
:content => /test\/README Thu Dec 13 11:25:10 2007/
|
||
|
assert_tag :tag => 'th', :attributes => { :class => 'filename' },
|
||
|
:content => /test\/images\/delete.png Thu Dec 13 11:25:10 2007/
|
||
|
assert_tag :tag => 'th', :attributes => { :class => 'filename' },
|
||
|
:content => /test\/images\/edit.png Thu Dec 13 11:25:10 2007/
|
||
|
assert_tag :tag => 'th', :attributes => { :class => 'filename' },
|
||
|
:content => /test\/sources\/watchers_controller.rb Thu Dec 13 11:25:10 2007/
|
||
|
end
|
||
|
def test_annotate
|
||
|
@repository.fetch_changesets
|
||
| lib/redmine/scm/adapters/cvs_adapter.rb (working copy) | ||
|---|---|---|
|
private
|
||
|
def buildRevision(rev)
|
||
|
if rev== 0
|
||
|
@base
|
||
|
if @branchid.nil?
|
||
|
@base+".0"
|
||
|
else
|
||
|
@base
|
||
|
end
|
||
|
elsif @branchid.nil?
|
||
|
@base+"."+rev.to_s
|
||
|
else
|
||
| lib/redmine/unified_diff.rb (working copy) | ||
|---|---|---|
|
diff_table = DiffTable.new(diff_type)
|
||
|
diff.each do |line|
|
||
|
unless diff_table.add_line line
|
||
|
self << diff_table if diff_table.length > 1
|
||
|
self << diff_table
|
||
|
diff_table = DiffTable.new(diff_type)
|
||
|
end
|
||
|
lines += 1
|
||