fix subversion hooks on windows with repository structure

This commit is contained in:
Sebastian Sdorra
2012-01-04 16:48:46 +01:00
parent 31d4d5d498
commit 8c20f9ef65

View File

@@ -191,21 +191,7 @@ public class SvnRepositoryHook implements FSHook
{
AssertUtil.assertIsNotNull(directory);
String name = null;
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;
return RepositoryUtil.getRepositoryName(handler, directory);
}
//~--- fields ---------------------------------------------------------------