Homebrewでinstall vimが失敗する

今度はvimが入りませんでした。

$ brew install vim
==> Cloning https://vim.googlecode.com/hg/
Updating /Library/Caches/Homebrew/vim--hg
pulling from https://vim.googlecode.com/hg/
searching for changes
no changes found
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
==> Checking out tag v7-3-896
hg archive: option --subrepos not recognized
hg archive [OPTION]... DEST

create an unversioned archive of a repository revision

    By default, the revision used is the parent of the working
    directory; use -r/--rev to specify a different revision.

    To specify the type of archive to create, use -t/--type. Valid
    types are:

    "files" (default): a directory full of files
    "tar": tar archive, uncompressed
    "tbz2": tar archive, compressed using bzip2
    "tgz": tar archive, compressed using gzip
    "uzip": zip archive, uncompressed
    "zip": zip archive, compressed using deflate

    The exact name of the destination archive or directory is given
    using a format string; see 'hg help export' for details.

    Each member added to an archive file has a directory prefix
    prepended. Use -p/--prefix to specify a format string for the
    prefix. The default is the basename of the archive, with suffixes
    removed.

options:

    --no-decode  do not pass files through decoders
 -p --prefix     directory prefix for files in archive
 -r --rev        revision to distribute
 -t --type       type of distribution to create
 -I --include    include names matching the given patterns
 -X --exclude    exclude names matching the given patterns

use "hg -v help archive" to show global options
Error: Failure while executing: /usr/local/bin/hg archive --subrepos -y -r v7-3-896 -t files /private/tmp/vim-DXwl

Mercurial (hg)がらみのエラーのようです。
--subrepos オプションが見つからない、とのことなのでhgのバージョンの問題でしょうか。


普段使っていないだけあってHomebrew経由ではなく、バージョンも4年前のものでした。

$ hg --version
Mercurial Distributed SCM (version 1.3.1)

Copyright (C) 2005-2009 Matt Mackall <mpm@selenic.com> and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


このバイナリは/usr/local/binにあるので、brew installがsymlinkを作るのを邪魔します。
念のため古き良き方法でバックアップしておきましょう。

$ mv -i /usr/local/bin/hg /usr/local/bin/hg.20130416
$ brew install mercurial
==> Downloading http://mercurial.selenic.com/release/mercurial-2.5.4.tar.gz
Already downloaded: /Library/Caches/Homebrew/mercurial-2.5.4.tar.gz
==> make local
==> Caveats
Extensions have been installed to:
  /usr/local/opt/mercurial/libexec/hgext

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
/usr/local/Cellar/mercurial/2.5.4: 531 files, 7.3M, built in 11 seconds


これでvimが入ります

$ brew install vim
==> Cloning https://vim.googlecode.com/hg/
Updating /Library/Caches/Homebrew/vim--hg
warning: vim.googlecode.com certificate with fingerprint bc:0f:42:98:b6:f1:fb:34:19:55:b2:fb:d4:df:c8:e4:b6:bb:0d:6e not verified (check hostfingerprints or web.cacerts config setting)
pulling from https://vim.googlecode.com/hg/
searching for changes
no changes found
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
==> Checking out tag v7-3-896
==> ./configure --prefix=/usr/local --mandir=/usr/local/Cellar/vim/7.3.896/share/man --enable-gui=no --without-x --enable-multibyte --with-tlib=ncurse
==> make
==> make install prefix=/usr/local/Cellar/vim/7.3.896 STRIP=/usr/bin/true
/usr/local/Cellar/vim/7.3.896: 1531 files, 24M, built in 74 seconds
$ vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Apr 16 2013 07:47:30)
MacOS X (unix) version
Included patches: 1-896


ちなみにmac vimはエラーなしでした。

$ brew install macvim
==> Downloading https://github.com/b4winckler/macvim/archive/snapshot-66.tar.gz
######################################################################## 100.0%
==> ./configure --with-features=huge --with-tlib=ncurses --enable-multibyte --with-macarchs=x86_64 --enable-perlinterp --enable-pythoninterp --enable-
==> make getenvy
==> make
==> Caveats
MacVim.app installed to:
  /usr/local/Cellar/macvim/7.3-66

To link the application to a normal Mac OS X location:
    brew linkapps
or:
    ln -s /usr/local/Cellar/macvim/7.3-66/MacVim.app /Applications
==> Summary
/usr/local/Cellar/macvim/7.3-66: 1759 files, 27M, built in 2.1 minutes
$ brew linkapps
Linking /usr/local/Cellar/macvim/7.3-66/MacVim.app
Finished linking. Find the links under /Users/all/Applications.

おつかれさまでした。