merge with branch issue-97

This commit is contained in:
Sebastian Sdorra
2012-02-24 17:47:08 +01:00
3 changed files with 19 additions and 2 deletions

View File

@@ -105,6 +105,9 @@ public class HgImportHandler extends AbstactImportHandler
repository.setContact(web.getParameter("contact")); repository.setContact(web.getParameter("contact"));
handler.setWebParameter(web); handler.setWebParameter(web);
} }
// issue-97
handler.registerMissingHook(c, repositoryName);
INIConfigurationWriter writer = new INIConfigurationWriter(); INIConfigurationWriter writer = new INIConfigurationWriter();

View File

@@ -483,8 +483,13 @@ public class HgRepositoryHandler
protected ExtendedCommand buildCreateCommand(Repository repository, protected ExtendedCommand buildCreateCommand(Repository repository,
File directory) File directory)
{ {
return new ExtendedCommand(config.getHgBinary(), "init", ExtendedCommand cmd = new ExtendedCommand(config.getHgBinary(), "init",
directory.getPath()); directory.getAbsolutePath());
// issue-97
cmd.setWorkDirectory(baseDirectory);
return cmd;
} }
/** /**

View File

@@ -95,6 +95,9 @@ public class HgCGIServlet extends HttpServlet
/** Field description */ /** Field description */
public static final String ENV_URL = "SCM_URL"; public static final String ENV_URL = "SCM_URL";
/** Field description */
public static final String SCM_CREDENTIALS = "SCM_CREDENTIALS";
/** Field description */ /** Field description */
private static final long serialVersionUID = -3492811300905099810L; private static final long serialVersionUID = -3492811300905099810L;
@@ -200,6 +203,12 @@ public class HgCGIServlet extends HttpServlet
env.set(key, session.getAttribute(key).toString()); env.set(key, session.getAttribute(key).toString());
} }
} }
// issue-97
if (!env.containsKey(SCM_CREDENTIALS))
{
env.set(SCM_CREDENTIALS, Util.EMPTY_STRING);
}
} }
/** /**