http://dev.lshift.net/paul/mercurial-server/docbook.htmlの「Creating repositories」によると、新しいリポジトリを作成するために必要なことは、clone
存在しないものにすることだけです。
しかし、1.1 では動作しません。コードを見ると、次のようになります。
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)
作成するには、具体的にコマンドを渡す必要があることがわかりますinit
。
このコマンドは期待どおりに機能します。
"TortoisePlink.exe" -ssh -2 hg@mercurial "hg init tst"
しかし、そうするためのよりエレガントなコマンドであることを願っています。
それはドキュメントの「バグ」ですか、それとも何か間違っていますか?
更新:
私の質問は、を使用してリモートでリポジトリを作成することについてのみですmercurial-server
。
更新 2 :
リモートで複製されるローカルリポジトリがすでに作成されている必要があることは明らかではなかったため、これは私の誤解でした。