pypa/pip — Issue #454: Compatibility with Mercurial 2.1
Author: petrilli
Created: 2012-02-10 00:40:27+00:00
State: open

I recently upgraded to Mercurial v2.1 on my Mac notebook running Lion. Suddenly, pip stopped working. I'm using pip v1.0.2 with Python 2.7.2, and when you have a command in a requirements file like this:

-e git+git://github.com/earle/django-bootstrap.git#egg=bootstrap

When you do an `pip install -r requirements.txt`, you get the following:

```
Command /usr/local/bin/hg pull -q failed with error code 1
Exception information:
Traceback (most recent call last):
File "/Users/petrilli/src/ebert/lib/python2.7/site-packages/pip/basecommand.py", line 126, in main
self.run(options, args)
File "/Users/petrilli/src/ebert/lib/python2.7/site-packages/pip/commands/install.py", line 223, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/Users/petrilli/src/ebert/lib/python2.7/site-packages/pip/req.py", line 936, in prepare_files
req_to_install.update_editable(not self.is_download)
File "/Users/petrilli/src/ebert/lib/python2.7/site-packages/pip/req.py", line 384, in update_editable
vcs_backend.obtain(self.source_dir)
File "/Users/petrilli/src/ebert/lib/python2.7/site-packages/pip/vcs/mercurial.py", line 78, in obtain
if self.check_destination(dest, url, rev_options, rev_display):
File "/Users/petrilli/src/ebert/lib/python2.7/site-packages/pip/vcs/__init__.py", line 189, in check_destination
self.update(dest, rev_options)
File "/Users/petrilli/src/ebert/lib/python2.7/site-packages/pip/vcs/mercurial.py", line 66, in update
call_subprocess([self.cmd, 'pull', '-q'], cwd=dest)
File "/Users/petrilli/src/ebert/lib/python2.7/site-packages/pip/__init__.py", line 255, in call_subprocess
% (command_desc, proc.returncode))
InstallationError: Command /usr/local/bin/hg pull -q failed with error code 1
```

It appears, for some reason, that `hg pull -q` has a process return code of 1, even when it's not made any updates. This is documented in [upgrade instructions for Mercurial v2.1](http://mercurial.selenic.com/wiki/UpgradeNotes#A2.1:_phases.2C_various_minor_changes) as being intentional to match.

Not sure what the right thing to do is here, so I'm reporting it, and downgrading to 2.0.2.