mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-07 05:55:44 +01:00
fix subversion hooks on windows with repository structure
This commit is contained in:
@@ -191,21 +191,7 @@ public class SvnRepositoryHook implements FSHook
|
|||||||
{
|
{
|
||||||
AssertUtil.assertIsNotNull(directory);
|
AssertUtil.assertIsNotNull(directory);
|
||||||
|
|
||||||
String name = null;
|
return RepositoryUtil.getRepositoryName(handler, directory);
|
||||||
String path = directory.getCanonicalPath();
|
|
||||||
int directoryLength =
|
|
||||||
handler.getConfig().getRepositoryDirectory().getCanonicalPath().length();
|
|
||||||
|
|
||||||
if (directoryLength < path.length())
|
|
||||||
{
|
|
||||||
name = IOUtil.trimSeperatorChars(path.substring(directoryLength));
|
|
||||||
}
|
|
||||||
else if (logger.isWarnEnabled())
|
|
||||||
{
|
|
||||||
logger.warn("path is shorter as the main hg repository path");
|
|
||||||
}
|
|
||||||
|
|
||||||
return name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//~--- fields ---------------------------------------------------------------
|
//~--- fields ---------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user