title: How to write mercurial hooks on windows?
body: <p>I want to add a hook to my repository. I can't work out where i need to put the hook file. The hgrc file is as follows:</p>
  
  <pre><code>[hooks]
  precommit.test =  precommithook
  </code></pre>
  
  <p>Location is C:\Code\RepoTest.hg\hgrc</p>
  
  <p>Hook file is:</p>
  
  <pre><code>echo "hello world"
  </code></pre>
  
  <p>Location is C:\Code\RepoTest.hg\precommithook</p>
  
  <p>When i run </p>
  
  <blockquote>
    <p>hg commit -m"test"</p>
  </blockquote>
  
  <p>from the command line i get</p>
  
  <pre><code>running hook precommit.test: precommithook
  'precommithook' is not recognized as an internal or external command,
  operable program or batch file.
  abort: precommit.test hook exited with status 1
  </code></pre>
  
  <p>I've tried various paths but nothing works. </p>
  
  <p>Most of the examples i googled with regards to Mercurial hooks are Unix based.</p>
  
  <p>Is it possible to write hooks in a powershell? </p>