[PATCH 1 of 1] Add create option to push command
Shane Holloway
shane.holloway at ieee.org
Fri Mar 2 03:28:32 UTC 2007
>> I did not think it would be appropriate for hg clone to add an
>> entry to the hgrc for the path with an option, but
>> that could be pursued.
>>
>
> An existing .hg/hgrc should never be modified my Mercurial, only by
> the user. So clone to a different repo should only edit the target's
> hgrc if this is in the local filesystem.
>
That's what I guessed from the way other commands work. :)
> But for your use case:
> As soon as you push your repo to an ssh location, does this become
> the canonical location for it? If yes, you probably always want to
> change .hg/hgrc [paths] default to this location.
>
It becomes one of the canonical locations, but not the default. Say
I have a library called "notifications", one of many such libraries
in one of our products. That library is used across many different
products, at varying revisions. Our products have one "official"
location per version that only the release manager can push to, but
many shared areas -- usually one per developer, per feature branch
they are working on. This allows developers to work together
remotely with the full support of mercurial, and never worrying about
"breaking the build" for uninterested developers.
In summary, we have many named working areas per repository, and
creation of new ones is a relatively common occurrence.
> A small shell script (or even a small hg python extension to have it
> easily available as a new subcommand) could do this for you in the
> way _you_ want. Even if it shouldn't be named 'default, supporting
> options in own commands is easy to implement.
>
Yes, I can certainly do that. I already cut my teeth on creating one
for something else, and it is an altogether wonderful process to be
able to customize your SCC tool. Thanks for all the thought the dev
team has put into this! I thought this particular change might have
a wider audience, and so made a patch instead. A command that allows
us to add a named path entry would be useful, too, and that's what I
will pursue for the team here.
> BTW, you don't need -U for remote clones, because it only does init
> and push, no checkout is created.
>
Good to know!
Thanks for your time!
-Shane
More information about the Mercurial
mailing list