diff --git a/src/IDF/Scm/Monotone.php b/src/IDF/Scm/Monotone.php index 20c1acf..49c40b0 100644 --- a/src/IDF/Scm/Monotone.php +++ b/src/IDF/Scm/Monotone.php @@ -420,7 +420,8 @@ class IDF_Scm_Monotone extends IDF_Scm /** * monotone has no concept of a "main" branch, so just return - * the confiured one + * the configured one. Ensure however that we can select revisions + * with it at all. * * @see IDF_Scm::getMainBranch() */ @@ -431,6 +432,14 @@ class IDF_Scm_Monotone extends IDF_Scm || empty($branch)) { $branch = "*"; } + + if (count($this->_resolveSelector("h:$branch")) == 0) + { + throw new IDF_Scm_Exception( + "Branch $branch is empty" + ); + } + return $branch; }