Skip to content

Commit

Permalink
Fixing MercurialRule.registerHook
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Nov 16, 2021
1 parent 9f3c7b2 commit 8bcdc70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/java/hudson/plugins/mercurial/MercurialRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ public void registerHook(FilePath repo) throws Exception {

FilePath hook = hgDir.child("hook.py");

String hook_text = IOUtils.toString(this.getClass().getResourceAsStream("hook.py"), "UTF-8");
StringUtils.replace(hook_text, "@JENKINS_URL@", j.getURL().toString());
StringUtils.replace(hook_text, "@REPO_URL@", repo.toURI().toString());
String hook_text = IOUtils.toString(MercurialRule.class.getResourceAsStream("/hook.py"), "UTF-8");
hook_text = StringUtils.replace(hook_text, "@JENKINS_URL@", j.getURL().toString());
hook_text = StringUtils.replace(hook_text, "@REPO_URL@", repo.toURI().toString());
hook.write(hook_text, null);

hgDir.child("hgrc").write(
Expand Down

0 comments on commit 8bcdc70

Please sign in to comment.