Indefero

Indefero Commit Details


Date:2008-11-23 07:41:41 (16 years 29 days ago)
Author:Loic d'Anterroches
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:380df7380b8b911dfb31ee835256841ff1699599
Parents: a643cbbc0c05baa66f66c31c3d8e367643f603f3
Message:Fixed the regex to match the commit and the path.

Changes:

File differences

src/IDF/Tests/TestSource.php
4444
4545
4646
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
4764
$this->assertEqual($mime, $m[0]);
}
}
public function testRegexCommit()
{
$regex = '#^/p/([\-\w]+)/source/tree/([^\/]+)/(.*)$#';
$tests = array('/p/test_project/source/tree/default/current/sources' =>
array('test_project', 'default', 'current/sources'),
'/p/test_project/source/tree/3.6/current/sources' =>
array('test_project', '3.6', 'current/sources'),
);
foreach ($tests as $test => $res) {
$m = array();
$t = preg_match($regex, $test, $m);
$this->assertEqual($res[0], $m[1]);
$this->assertEqual($res[1], $m[2]);
$this->assertEqual($res[2], $m[3]);
}
}
}
src/IDF/conf/urls.php
147147
148148
149149
150
150
151151
152152
153153
154154
155155
156
156
157157
158158
159159
160160
161161
162
162
163163
164164
165165
166166
167167
168
168
169169
170170
171171
172172
173173
174
174
175175
176176
177177
178178
179179
180
180
181181
182182
183183
// ---------- SCM ----------------------------------------
$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/tree/([\S^/]+)/$#',
$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/tree/([^/]+)/$#',
'base' => $base,
'priority' => 4,
'model' => 'IDF_Views_Source',
'method' => 'treeBase');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/tree/([\S^/]+)/(.*)$#',
$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/tree/([^/]+)/(.*)$#',
'base' => $base,
'priority' => 4,
'model' => 'IDF_Views_Source',
'method' => 'tree');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/changes/([\S^/]+)/$#',
$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/changes/([^/]+)/$#',
'base' => $base,
'priority' => 4,
'model' => 'IDF_Views_Source',
'method' => 'changeLog');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/commit/([\S^/]+)/$#',
$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/commit/([^/]+)/$#',
'base' => $base,
'priority' => 4,
'model' => 'IDF_Views_Source',
'method' => 'commit');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/download/([\S^/]+)/$#',
$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/download/([^/]+)/$#',
'base' => $base,
'priority' => 4,
'model' => 'IDF_Views_Source',
'method' => 'download');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/file/([\S^/]+)/(.*)$#',
$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/file/([^/]+)/(.*)$#',
'base' => $base,
'priority' => 4,
'model' => 'IDF_Views_Source',

Archive Download the corresponding diff file

Page rendered in 0.08648s using 13 queries.