uh, we should really share one mtn instance per project and request...

master
Thomas Keller 2010-06-24 02:27:38 +02:00
parent 4fdf248cb6
commit f3268b3d37
1 changed files with 8 additions and 1 deletions

View File

@ -391,6 +391,8 @@ class IDF_Scm_Monotone extends IDF_Scm
private $stdio;
private static $instances = array();
/**
* @see IDF_Scm::__construct()
*/
@ -873,7 +875,12 @@ class IDF_Scm_Monotone extends IDF_Scm
*/
public static function factory($project)
{
return new IDF_Scm_Monotone($project);
if (!array_key_exists($project->shortname, self::$instances))
{
self::$instances[$project->shortname] =
new IDF_Scm_Monotone($project);
}
return self::$instances[$project->shortname];
}
/**