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

@@ -106,6 +106,9 @@ public class HgImportHandler extends AbstactImportHandler
handler.setWebParameter(web);
}
// issue-97
handler.registerMissingHook(c, repositoryName);
INIConfigurationWriter writer = new INIConfigurationWriter();
writer.write(c, hgrc);

View File

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

View File

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