Mercurial インストール メモ
作業しているとフォルダーが増えてカオスになるので,Mercurial を導入したときのお話.
Mercurial を選んだ理由は名前をみてときめいたから.
インストーラー
http://mercurial.selenic.com/downloads/
does not require admin rights
と書いてあるが,Administrators は UAC が発動するようだ.
インストール後,動くか確認.
PS C:\Users\himeno> hg Mercurial Distributed SCM basic commands: add add the specified files on the next commit annotate show changeset information by line for each file clone make a copy of an existing repository commit commit the specified files or all outstanding changes diff diff repository (or selected files) export dump the header and diffs for one or more changesets forget forget the specified files on the next commit init create a new repository in the given directory log show revision history of entire repository or files merge merge working directory with another revision pull pull changes from the specified source push push changes to the specified destination remove remove the specified files on the next commit serve start stand-alone webserver status show changed files in the working directory summary summarize working directory state update update working directory (or switch revisions) use "hg help" for the full list of commands or "hg -v" for details PS C:\Users\himeno>
設定
hgrc(5) が参考になる.
今回はユーザー名と SSH 接続で使うコマンド,それと文字エンコードなんかを指定した.
[ui] username = himeno ssh = "C:\Program Files\PuTTY\plink.exe" -2 -i "C:\Users\himeno\Documents\ひみつかぎ.ppk" -C -l hg [extensions] hgext.win32mbcs = [web] encoding = UTF-8
Bitbucket に SSH で接続したいんだけど…
動かない….
ググって*1もなかなか出てこないが,どうやら plink.exe が known_hosts に登録するか確認しているものの,それが表示されていないようなのであらかじめ接続して登録しておくことにした.
PS C:\Program Files\PuTTY> .\plink.exe -ssh -2 -l hg -i 'C:\Users\himeno\Documents\ひみつかぎ.ppk' bitbucket.org
もっといい方法があったらおしえてください….
公開鍵を登録しよう
管理画面に設定欄がある.
鍵はコピーして Bitbucket の管理画面に貼り付けると編集する必要がなくなるので楽.
参考
*1:海外ドラマの邦訳で「ググってみよう」と言っていたし,問題ないよね?