No need to create hg working copies just to parse tags/branches
Merge pull request #2427 from webfactory/hg-no-working-copy

No need to create hg working copies just to parse tags/branches
Use cache directory when downloading composer.phar

Since there is a cache dir there is no need to populate the project
directory with temp files. Plus the permissions on the project dir
might not allow that.
Check if current dir is writable and if not try the cache dir from settings
Cache path never ends with '/'
Merge remote-tracking branch 'jimmykane/master'
Add preFileDownload event on package.json fetch
don't require the error message have the first line of HTTP output in it
Merge pull request #2435 from ptarjan/master

don't require the error message have the first line of HTTP output in it
[CreateProject] allowed pretty version constraint
Cache in VersionConstraint
Merge pull request #2431 from bamarni/create-project-pretty-constraint

[CreateProject] allowed pretty constraint
Merge remote-tracking branch 'AlexeyKupershtokh/cache-version-constraint'
Rename a few things
Merge pull request #2434 from JJK801/extend-pre-file-download

Add preFileDownload event on packages.json fetch
Fix vcs repo constructor, fixes #2444
Fix pear ctor, refs #2444
Only replace version in Composer.php, fix user agent
Add test for RepositoryManager repo creation
Detect failed gethostbyname, refs #2449