'hg grep'は履歴を検索してしまうし、'hg locate "set:grep('hogehoge')"'はマッチした行を表示してくれないので、この二つのコマンドの間の子を作って見ました。 https://bitbucket.org/troter/hg-grepfile 設定 [extensions] grepfile = [path to]/grepfile.py 使い方 こんな感じで管理下のファイルを検索できます。 % hg grepfile -n ctx.walk mercurial/cmdutil.py:1777: for abs in ctx.walk(m): mercurial/commands.py:283: for abs in ctx.walk(m): mercurial/commands.py:1085: for abs in ctx.walk(m): mercu