@@ -42,6 +42,10 class Repository::Mercurial < Repository | |||
|
42 | 42 | changeset.scmid |
|
43 | 43 | end |
|
44 | 44 | |
|
45 | def diff_format_revisions(cs, cs_to, sep=':') | |
|
46 | super(cs, cs_to, ' ') | |
|
47 | end | |
|
48 | ||
|
45 | 49 | def entries(path=nil, identifier=nil) |
|
46 | 50 | entries=scm.entries(path, identifier) |
|
47 | 51 | if entries |
@@ -128,6 +128,9 class RepositoriesMercurialControllerTest < ActionController::TestCase | |||
|
128 | 128 | end |
|
129 | 129 | |
|
130 | 130 | def test_diff |
|
131 | @repository.fetch_changesets | |
|
132 | @repository.reload | |
|
133 | ||
|
131 | 134 | [4, '4', 'def6d2f1254a'].each do |r1| |
|
132 | 135 | # Full diff of changeset 4 |
|
133 | 136 | get :diff, :id => 3, :rev => 4 |
@@ -141,6 +144,25 class RepositoriesMercurialControllerTest < ActionController::TestCase | |||
|
141 | 144 | :sibling => { :tag => 'td', |
|
142 | 145 | :attributes => { :class => /diff_out/ }, |
|
143 | 146 | :content => /def remove/ } |
|
147 | assert_tag :tag => 'h2', :content => /4:def6d2f1254a/ | |
|
148 | end | |
|
149 | end | |
|
150 | end | |
|
151 | ||
|
152 | def test_diff_two_revs | |
|
153 | @repository.fetch_changesets | |
|
154 | @repository.reload | |
|
155 | ||
|
156 | [2, '400bb8672109', '400', 400].each do |r1| | |
|
157 | [4, 'def6d2f1254a'].each do |r2| | |
|
158 | get :diff, :id => 3, :rev => r1, | |
|
159 | :rev_to => r2 | |
|
160 | assert_response :success | |
|
161 | assert_template 'diff' | |
|
162 | ||
|
163 | diff = assigns(:diff) | |
|
164 | assert_not_nil diff | |
|
165 | assert_tag :tag => 'h2', :content => /4:def6d2f1254a 2:400bb8672109/ | |
|
144 | 166 | end |
|
145 | 167 | end |
|
146 | 168 | end |
General Comments 0
You need to be logged in to leave comments.
Login now