From 94a5464155aa03030712a95ca25fd8e50e8b810a Mon Sep 17 00:00:00 2001 From: Thomas Keller Date: Tue, 27 Apr 2010 23:28:52 +0200 Subject: [PATCH] * idf.php-dist: no need to configure a branch prefix any longer now that the project owner can define the master branch name * Monotone.php: change accordingly to use the configured master branch name and fallback to all branches ("*") if noone is found --- src/IDF/Scm/Monotone.php | 8 ++++++-- src/IDF/conf/idf.php-dist | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/IDF/Scm/Monotone.php b/src/IDF/Scm/Monotone.php index 8c8b83f..160bf75 100644 --- a/src/IDF/Scm/Monotone.php +++ b/src/IDF/Scm/Monotone.php @@ -366,11 +366,15 @@ class IDF_Scm_Monotone extends IDF_Scm public static function getAnonymousAccessUrl($project) { + $conf = $project->getConf(); + if (false === ($branch = $conf->getVal('mtn_master_branch', false)) + || empty($branch)) { + $branch = "*"; + } return sprintf( Pluf::f('mtn_remote_url'), $project->shortname, - Pluf::f('mtn_branch_prefix'), - $project->shortname + $branch ); } diff --git a/src/IDF/conf/idf.php-dist b/src/IDF/conf/idf.php-dist index 412826d..6f46f17 100644 --- a/src/IDF/conf/idf.php-dist +++ b/src/IDF/conf/idf.php-dist @@ -76,8 +76,7 @@ $cfg['svn_remote_url'] = 'http://localhost/svn/%s'; # Same as for git, you can have multiple repositories, one for each # project or a single one for all the projects. $cfg['mtn_repositories'] = '/home/mtn/repositories/%s.mtn'; -$cfg['mtn_branch_prefix'] = 'com.indefero.projects.'; -$cfg['mtn_remote_url'] = 'mtn://localhost/~%s/%s%s'; +$cfg['mtn_remote_url'] = 'mtn://localhost/~%s/%s'; # Mercurial repositories path #$cfg['mercurial_repositories'] = '/home/mercurial/repositories/%s';