diff --git a/NEWS.mdtext b/NEWS.mdtext index 37ae1a7..51e6e84 100644 --- a/NEWS.mdtext +++ b/NEWS.mdtext @@ -31,6 +31,8 @@ or newer to properly run this version of Indefero! a new project or monotone key, in case an error popped up in the middle (issue 697) - Better error detection and reporting in the SyncMonotone plugin ATTENTION: This needs Pluf 46b7f251 or newer! +- Fix the branch links users of the Subversion frontend get when they enter a wrong revision + and only display this list if there are any branches available for all SCMs ## Documentation diff --git a/src/IDF/Views/Source.php b/src/IDF/Views/Source.php index 758830c..1496e54 100644 --- a/src/IDF/Views/Source.php +++ b/src/IDF/Views/Source.php @@ -66,7 +66,8 @@ class IDF_Views_Source 'commit' => $commit, 'branches' => $branches, ); - return Pluf_Shortcuts_RenderToResponse('idf/source/invalid_revision.html', + $scmConf = $request->conf->getVal('scm', 'git'); + return Pluf_Shortcuts_RenderToResponse('idf/source/'.$scmConf.'/invalid_revision.html', $params, $request); } diff --git a/src/IDF/templates/idf/source/git/invalid_revision.html b/src/IDF/templates/idf/source/git/invalid_revision.html new file mode 100644 index 0000000..2b5822e --- /dev/null +++ b/src/IDF/templates/idf/source/git/invalid_revision.html @@ -0,0 +1,2 @@ +{extends "idf/source/invalid_revision.html"} + diff --git a/src/IDF/templates/idf/source/invalid_revision.html b/src/IDF/templates/idf/source/invalid_revision.html index ded55fd..b030b27 100644 --- a/src/IDF/templates/idf/source/invalid_revision.html +++ b/src/IDF/templates/idf/source/invalid_revision.html @@ -5,6 +5,7 @@
{blocktrans}The branch or revision {$commit} is not valid or does not exist in this repository.{/blocktrans}
+{if count($branches) > 0}{blocktrans}The following list shows all available branches:{/blocktrans}
{blocktrans}The revision {$commit} is not valid or does not exist +in this repository.{/blocktrans}
+ +{if count($branches) > 0} +{blocktrans}The following list shows all available branches:{/blocktrans}
+{blocktrans}If this is a new repository, the reason for this error +could be that you have not committed and / or pushed any change so far. +In this case please take a look at the Help page +how to access your repository.{/blocktrans}
+{/if} + +{/block} +