composer/satis — pull request #31 by khepin (2012-07-05 12:34:10+00:00)
Title: [WIP] add commands to create and maintain a local mirror

I just want to check if there is any interest for this directly inside of satis or if I should create a separate thing to deal with creating local mirrors.

Added 3 commands:

* `mirror` would take a `composer.lock` file as an input and create a `mirror clone` of each of the repositories.
* * The reason for using a composer.lock is that all the dependencies are already resolved and simple to use. I couldn't find how through composer I could give a `composer.json` and get all the dependencies back. It seems a lot of code would need to be duplicated (at first glance).
* * It takes 2 arguments and one option:
* * * argument: `file`: the composer.lock file
* * * argument: `output-dir`: the directory where this repository will be cloned
* * * option: `--config-file`: if specified, then the command will update a satis `config.json` file with the info from the added repositories.
* `add` does the same as `mirror` except it doesn't take a file as argument but the name of a package
* `update` will go through all of the repositories and fetch the latest code.

Limitations:
* Only works with github and git repositories so far.
* Only works if installed on the same machine so far as repository urls are specified with `file:///`