Send repository id with hg hook request

This commit is contained in:
René Pfeuffer
2018-11-27 14:06:11 +01:00
parent 00ab764dab
commit bc629ec648
6 changed files with 30 additions and 64 deletions

View File

@@ -80,6 +80,9 @@ public class HgCGIServlet extends HttpServlet implements ScmProviderHttpServlet
/** Field description */
public static final String ENV_REPOSITORY_PATH = "SCM_REPOSITORY_PATH";
/** Field description */
public static final String ENV_REPOSITORY_ID = "SCM_REPOSITORY_ID";
/** Field description */
public static final String ENV_SESSION_PREFIX = "SCM_";
@@ -261,6 +264,7 @@ public class HgCGIServlet extends HttpServlet implements ScmProviderHttpServlet
executor.setStatusCodeHandler(exceptionHandler);
executor.setContentLengthWorkaround(true);
executor.getEnvironment().set(ENV_REPOSITORY_NAME, repository.getNamespace() + "/" + repository.getName());
executor.getEnvironment().set(ENV_REPOSITORY_ID, repository.getId());
executor.getEnvironment().set(ENV_REPOSITORY_PATH,
directory.getAbsolutePath());