Indefero

Indefero Commit Details


Date:2008-11-24 13:27:03 (16 years 27 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:39d015a586c4cb35b9c393a126ba295a6533080c
Parents: 9d1a4cad017619addeddb354917213dff18e17d3
Message:Added a simpler way to configure the repositories.

Changes:

File differences

src/IDF/Scm/Git.php
4343
4444
4545
46
47
48
49
50
46
5147
5248
5349
......
5854
5955
6056
61
62
63
64
57
6558
6659
6760
*/
public static function getRemoteAccessUrl($project)
{
$url = Pluf::f('git_remote_url');
if (Pluf::f('git_repositories_unique', true)) {
return $url;
}
return $url.'/'.$project->shortname.'.git';
return sprintf(Pluf::f('git_remote_url'), $project->shortname);
}
/**
*/
public static function factory($project)
{
$rep = Pluf::f('git_repositories');
if (false == Pluf::f('git_repositories_unique', false)) {
$rep = $rep.'/'.$project->shortname.'.git';
}
$rep = sprintf(Pluf::f('git_repositories'), $project->shortname);
return new IDF_Scm_Git($rep);
}
src/IDF/Scm/Mercurial.php
4242
4343
4444
45
46
47
48
49
45
5046
5147
5248
......
5753
5854
5955
60
61
62
63
56
6457
6558
6659
*/
public static function getRemoteAccessUrl($project)
{
$url = Pluf::f('mercurial_remote_url');
if (Pluf::f('mercurial_repositories_unique', true)) {
return $url;
}
return $url.'/'.$project->shortname;
return sprintf(Pluf::f('mercurial_remote_url'), $project->shortname);
}
/**
*/
public static function factory($project)
{
$rep = Pluf::f('mercurial_repositories');
if (false == Pluf::f('mercurial_repositories_unique', false)) {
$rep = $rep.'/'.$project->shortname;
}
$rep = sprintf(Pluf::f('mercurial_repositories'), $project->shortname);
return new IDF_Scm_Mercurial($rep);
}
src/IDF/Scm/Svn.php
5555
5656
5757
58
59
60
61
62
58
6359
6460
6561
......
7975
8076
8177
82
83
84
85
78
8679
8780
8881
// Remote repository
return $url;
}
$url = Pluf::f('svn_remote_url');
if (Pluf::f('svn_repositories_unique', true)) {
return $url;
}
return $url.'/'.$project->shortname;
return sprintf(Pluf::f('svn_remote_url'), $project->shortname);
}
/**
$conf->getVal('svn_username'),
$conf->getVal('svn_password'));
} else {
$rep = Pluf::f('svn_repositories');
if (false == Pluf::f('svn_repositories_unique', false)) {
$rep = $rep.'/'.$project->shortname;
}
$rep = sprintf(Pluf::f('svn_repositories'), $project->shortname);
return new IDF_Scm_Svn($rep);
}
}
src/IDF/conf/idf.php-dist
2626
2727
2828
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
4450
4551
4652
......
4955
5056
5157
52
53
54
58
59
5560
5661
57
58
59
60
61
62
63
64
65
66
67
68
69
62
63
7064
7165
7266
......
178172
179173
180174
175
181176
182177
183178
// to start with, it can be practical.
$cfg['debug'] = false;
// if you have a single git repository, just put the full path to it
// without trailing slash.
// If within a folder you have a series of bare git repository, just
// put the folder without a trailing slash.
// InDefero will automatically append a slash, the project shortname
// and .git to create the name of the repository.
$cfg['git_repositories'] = '/home/git/repositories/indefero.git';
$cfg['git_repositories_unique'] = true;
$cfg['git_remote_url'] = 'git://projects.ceondo.com/indefero.git';
// One git repository per project. "/".$project->shortname.".git"
// is automatically added to the end of the path/url.
//$cfg['git_repositories'] = '/home/git/repositories';
//$cfg['git_repositories_unique'] = false;
//$cfg['git_remote_url'] = 'git://projects.ceondo.com';
// If you have a single git repository, just put the full path to it
// without trailing slash. The path is the path to the git database,
// so you need to include the /.git folder.
// For example: '/path/to/my/project/.git'
//
// If you have multiple repositories, you need to put %s where you
// want the shortname of the project to be replaced.
// For example:
// - You have many projects on your local computer and want to use
// InDefero to see them. Put: '/home/yourlogin/Projects/%s/.git'
// - You have many projects on a remote server with only "bare" git
// repositories. Put: '/home/git/repositories/%s.git'
//
$cfg['git_repositories'] = '/home/git/repositories/%s.git';
//
// Like for the git_repositories definition, the path can contains %s
// and it will be automatically replaced. You can ignore this
// configuration variable as it is only for information use in the
// tree view.
//
$cfg['git_remote_url'] = 'git://projects.ceondo.com/%s.git';
// Same as for git, you can have multiple repositories, one for each
// project or a single one for all the projects.
// remote repository from the web interface. From the web interface
// you can define a local repository, local repositories are defined
// here. This if for security reasons.
$cfg['svn_repositories'] = 'file:///home/svn/repositories/indefero';
$cfg['svn_repositories_unique'] = true;
$cfg['svn_remote_url'] = 'http://projects.ceondo.com/svn/indefero';
$cfg['svn_repositories'] = 'file:///home/svn/repositories/%s';
$cfg['svn_remote_url'] = 'http://projects.ceondo.com/svn/%s';
// Mercurial repositories path
//$cfg['mercurial_repositories'] = '/home/mercurial/repositories';
//$cfg['mercurial_repositories_unique'] = false;
//$cfg['mercurial_remote_url'] = 'http://projects.ceondo.com/hg';
// Example of one *local* subversion repository for each project:
// the path to the repository on disk will automatically created to be
// 'file:///home/svn/repositories'.'/'.$project->shortname
// the url will be generated the same way:
// 'http://projects.ceondo.com/svn'.'/'.$project->shortname
// $cfg['svn_repositories'] = 'file:///home/svn/repositories';
// $cfg['svn_repositories_unique'] = false;
// $cfg['svn_remote_url'] = 'http://projects.ceondo.com/svn';
//$cfg['mercurial_repositories'] = '/home/mercurial/repositories/%s';
//$cfg['mercurial_remote_url'] = 'http://projects.ceondo.com/hg/%s';
// admins will get an email in case of errors in the system in non
// debug mode.
# SCM base configuration
$cfg['allowed_scm'] = array('git' => 'IDF_Scm_Git',
'svn' => 'IDF_Scm_Svn',
'mercurial' => 'IDF_Scm_Mercurial',
);

Archive Download the corresponding diff file

Page rendered in 0.08849s using 13 queries.