title: Creating new repositories using mercurial-server
body: <p>According to the "Creating repositories" at <a href="http://dev.lshift.net/paul/mercurial-server/docbook.html" rel="noreferrer">http://dev.lshift.net/paul/mercurial-server/docbook.html</a> all we need to do to create new repository - is to <code>clone</code> not existent one.</p>
  
  <p>But in 1.1 I doesn't work. And if we look at code:</p>
  
  <pre><code>if cmd is None:
      fail("direct logins on the hg account prohibited")
  elif cmd.startswith('hg -R ') and cmd.endswith(' serve --stdio'):
      repo = getrepo("read", cmd[6:-14])
      if not os.path.isdir(repo + "/.hg"):
          fail("no such repository %s" % repo)
      dispatch.dispatch(['-R', repo, 'serve', '--stdio'])
  elif cmd.startswith('hg init '):
      repo = getrepo("init", cmd[8:])
      if os.path.exists(repo):
          fail("%s exists" % repo)
      d = os.path.dirname(repo)
      if d != "" and not os.path.isdir(d):
          os.makedirs(d)
      dispatch.dispatch(['init', repo])
  else:
      fail("illegal command %r" % cmd)
  </code></pre>
  
  <p>we can see, that to create we need to pass specifically <code>init</code> command.</p>
  
  <p>This command works as expected:</p>
  
  <pre><code>"TortoisePlink.exe" -ssh -2 hg@mercurial "hg init tst"
  </code></pre>
  
  <p>but I hope it is some more elegant command to do so.</p>
  
  <p>Well, is it a "bug" in documentation or am I doing something wrong?</p>
  
  <p><strong>UPDATE</strong>:</p>
  
  <p>My question is only about creating repositories remotely using <code>mercurial-server</code>.</p>
  
  <p><strong>UPDATE 2</strong>:</p>
  
  <p>It was my misunderstanding, since it was not clear for me that there should be already created local repository, that will be cloned remotely.</p>