various suggestions for mr

Adam Spiers vcs-home at adamspiers.org
Sun Nov 6 23:12:27 CET 2011


On Sun, Oct 30, 2011 at 1:26 PM, Adam Spiers <vcs-home at adamspiers.org> wrote:
> On Sat, Oct 29, 2011 at 5:52 PM, Joey Hess <joey at kitenet.net> wrote:
>> Adam Spiers wrote:
>>> However, the basename operation does not preserve the uniqueness
>>> property which $MR_REPO had, and that's why I say that we need an
>>> additional namespace.
>>
>> So pick an operation that does? tr / _ would do, for example.
>
> The other implicit requirement of this namespace was that it is
> easy to remember and type.  The rest of my previous email
> gives the context for this requirement.

OK, I've made a patch which fulfills this requirement pretty well.
Hopefully you'll find it reasonably clean and unintrusive:

    https://github.com/aspiers/kitenet-mr/commit/b9a4e45aefe87c11ade1e4c4022e511f0d96d53c

With this patch, if you have .mrconfig files defining repositories:

    [path/to/foo]
    ...

    [path/to/bar]
    ...

then you can limit mr to only act on those via:

    mr -r foo,bar $action

If there is a clash of directory names, then it can be resolved via a
new special parameter 'name':

    [path/to/foo]
    checkout = git clone ...
    name = foo.git

    [path/to/a/different/foo]
    checkout = cvs checkout ...
    name = foo.cvs

and then you can do:

    mr -r foo.cvs update

etc.


More information about the vcs-home mailing list