Commits

Sebastian Sdorra  committed 54ad6f0

execute "hg init" in the scm home directory instead of current working directory

  • Participants
  • Parent commits 6e2cb7b
  • Branches issue-97

Comments (0)

Files changed (1)

File scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/HgRepositoryHandler.java

   protected ExtendedCommand buildCreateCommand(Repository repository,
           File directory)
   {
-    return new ExtendedCommand(config.getHgBinary(), "init",
-                               directory.getPath());
+    ExtendedCommand cmd = new ExtendedCommand(config.getHgBinary(), "init",
+                            directory.getPath());
+
+    // issue-97
+    cmd.setWorkDirectory(baseDirectory);
+
+    return cmd;
   }
 
   /**