mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 17:05:43 +01:00
fixed mercurial PreReceiveRepositoryHooks
The problem seems to be that guice had multiple options for injecting HgContext. HgContextProvider bound via Module and HgContext bound void RequestScoped annotation. It looks like that Guice 4 injects randomly the one or the other, in SCMv1 (Guice 3) everything works as expected. To fix the problem we have created a new class annotated with RequestScoped, which holds an instance of HgContext. This way only the HgContextProvider is used for injection.
This commit is contained in:
@@ -134,6 +134,8 @@ public final class HgUtil
|
||||
|
||||
repoConfiguration.setHgBin(handler.getConfig().getHgBinary());
|
||||
|
||||
logger.debug("open hg repository {}: encoding: {}, pending: {}", directory, enc, pending);
|
||||
|
||||
return Repository.open(repoConfiguration, directory);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user