Patchwork [2,of,3] config: give a more detailed sample repo config

login
register
mail settings
Submitter Jordi Gutiérrez Hermoso
Date Aug. 24, 2014, 11:51 p.m.
Message ID <12718916f03b4a917609.1408924296@Iris>
Download mbox | patch
Permalink /patch/5582/
State Superseded
Commit 5a831e4e6d7a4a33651f51c73ff413cb3d77eb9e
Headers show

Comments

Jordi Gutiérrez Hermoso - Aug. 24, 2014, 11:51 p.m.
# HG changeset patch
# User Jordi Gutiérrez Hermoso <jordigh@octave.org>
# Date 1408923803 14400
#      Sun Aug 24 19:43:23 2014 -0400
# Node ID 12718916f03b4a917609ecf41bb8d93fbd1024ca
# Parent  cfec84ed3d8f5b9877f48ec079eb0583b51f56ad
config: give a more detailed sample repo config

Some examples of the typical configurations that one might want to do
in an .hg/hgrc file.

I insist on the myfork terminology for a server-side clone. Bitbucket,
Github, and others have widely popularised this meaning of "fork".
Pierre-Yves David - Aug. 26, 2014, 8:59 p.m.
On 08/25/2014 01:51 AM, Jordi Gutiérrez Hermoso wrote:
> # HG changeset patch
> # User Jordi Gutiérrez Hermoso <jordigh@octave.org>
> # Date 1408923803 14400
> #      Sun Aug 24 19:43:23 2014 -0400
> # Node ID 12718916f03b4a917609ecf41bb8d93fbd1024ca
> # Parent  cfec84ed3d8f5b9877f48ec079eb0583b51f56ad
> config: give a more detailed sample repo config
>
> Some examples of the typical configurations that one might want to do
> in an .hg/hgrc file.

Still not trace of the obvious candidate "default-push" are you reading 
people's review?
Jordi Gutiérrez Hermoso - Aug. 27, 2014, 12:13 a.m.
On Tue, 2014-08-26 at 22:59 +0200, Pierre-Yves David wrote:
> 
> On 08/25/2014 01:51 AM, Jordi Gutiérrez Hermoso wrote:
> > # HG changeset patch
> > # User Jordi Gutiérrez Hermoso <jordigh@octave.org>
> > # Date 1408923803 14400
> > #      Sun Aug 24 19:43:23 2014 -0400
> > # Node ID 12718916f03b4a917609ecf41bb8d93fbd1024ca
> > # Parent  cfec84ed3d8f5b9877f48ec079eb0583b51f56ad
> > config: give a more detailed sample repo config
> >
> > Some examples of the typical configurations that one might want to do
> > in an .hg/hgrc file.
> 
> Still not trace of the obvious candidate "default-push" 

I honestly find that a bit too specialised for a simple example hgrc.
I think people are more likely to want to know about local and remote
clones. A fourth example path already seems too cluttered. Personally,
I never use default-push.

> are you reading people's review?

Of course, otherwise I wouldn't have made two separate patches for
each of proposed sample hgrcs nor would I have split the other patch
on merge-{local,other}.

- Jordi G. H.
Pierre-Yves David - Sept. 2, 2014, 7:09 p.m.
On 08/27/2014 02:13 AM, Jordi Gutiérrez Hermoso wrote:
> On Tue, 2014-08-26 at 22:59 +0200, Pierre-Yves David wrote:
>>
>> On 08/25/2014 01:51 AM, Jordi Gutiérrez Hermoso wrote:
>>> # HG changeset patch
>>> # User Jordi Gutiérrez Hermoso <jordigh@octave.org>
>>> # Date 1408923803 14400
>>> #      Sun Aug 24 19:43:23 2014 -0400
>>> # Node ID 12718916f03b4a917609ecf41bb8d93fbd1024ca
>>> # Parent  cfec84ed3d8f5b9877f48ec079eb0583b51f56ad
>>> config: give a more detailed sample repo config
>>>
>>> Some examples of the typical configurations that one might want to do
>>> in an .hg/hgrc file.
>>
>> Still not trace of the obvious candidate "default-push"
>
> I honestly find that a bit too specialised for a simple example hgrc.
> I think people are more likely to want to know about local and remote
> clones. A fourth example path already seems too cluttered.
> Personally, I never use default-push.

default-push saved the life of multiple of my logilabian by preventing 
them to push to the wrong repo by mistake. I feel like it is a valid 
example because it make a feature discoverable. Most people will not 
suspect it ever exist otherwise

I'm still not super fan of the `myxxx` names. It may just be that is 
read like `phpmyeditconfig` to me.

If you do not like having more than three, we could maybe drop one of 
them in favor of default-push.

You should also put a reference to the documentation and a small comment 
to highlight we have reserved name (default) with special meaning and 
also arbitrary ones.

>> are you reading people's review?
>
> Of course, otherwise I wouldn't have made two separate patches for
> each of proposed sample hgrcs nor would I have split the other patch
> on merge-{local,other}.

This is mostly a (silly?) rhetorical question from an upset me. Seeing a 
new version of a patch that does not apply your review comment and 
mention nothing about them is quite anoying.

Cheers,
Jordi Gutiérrez Hermoso - Sept. 3, 2014, 2:11 p.m.
On Tue, 2014-09-02 at 21:09 +0200, Pierre-Yves David wrote:
> 
> On 08/27/2014 02:13 AM, Jordi Gutiérrez Hermoso wrote:
> > On Tue, 2014-08-26 at 22:59 +0200, Pierre-Yves David wrote:
> >>
> >> On 08/25/2014 01:51 AM, Jordi Gutiérrez Hermoso wrote:
> >>> # HG changeset patch
> >>> # User Jordi Gutiérrez Hermoso <jordigh@octave.org>
> >>> # Date 1408923803 14400
> >>> #      Sun Aug 24 19:43:23 2014 -0400
> >>> # Node ID 12718916f03b4a917609ecf41bb8d93fbd1024ca
> >>> # Parent  cfec84ed3d8f5b9877f48ec079eb0583b51f56ad
> >>> config: give a more detailed sample repo config
> >>>
> >>> Some examples of the typical configurations that one might want to do
> >>> in an .hg/hgrc file.
> >>
> >> Still not trace of the obvious candidate "default-push"
> >
> > I honestly find that a bit too specialised for a simple example hgrc.
> > I think people are more likely to want to know about local and remote
> > clones. A fourth example path already seems too cluttered.
> > Personally, I never use default-push.
> 
> default-push saved the life of multiple of my logilabian by preventing 
> them to push to the wrong repo by mistake. I feel like it is a valid 
> example because it make a feature discoverable. Most people will not 
> suspect it ever exist otherwise

Okay, I'll add it.

> I'm still not super fan of the `myxxx` names. It may just be that is 
> read like `phpmyeditconfig` to me.

Okay, I can change these names, but we already have a precedence for
"my_path" in the paths section of `hg help hgrc`.

> If you do not like having more than three, we could maybe drop one of 
> them in favor of default-push.

Maybe a tiny bit of clutter will be ok.

> You should also put a reference to the documentation and a small comment 
> to highlight we have reserved name (default) with special meaning and 
> also arbitrary ones.

I wish it were possible to give a reference to a particular section of
`hg help hgrc`, which is a rather long document.

> Seeing a new version of a patch that does not apply your review
> comment and mention nothing about them is quite anoying.

Sorry, I'll try to annoy you less.

Should I resend the entire series?

- Jordi G. H.
Pierre-Yves David - Sept. 3, 2014, 3:06 p.m.
On 09/03/2014 04:11 PM, Jordi Gutiérrez Hermoso wrote:
> On Tue, 2014-09-02 at 21:09 +0200, Pierre-Yves David wrote:
>>
>> On 08/27/2014 02:13 AM, Jordi Gutiérrez Hermoso wrote:
>>> On Tue, 2014-08-26 at 22:59 +0200, Pierre-Yves David wrote:
>>>>
>>>> On 08/25/2014 01:51 AM, Jordi Gutiérrez Hermoso wrote:
>>>>> # HG changeset patch
>>>>> # User Jordi Gutiérrez Hermoso <jordigh@octave.org>
>>>>> # Date 1408923803 14400
>>>>> #      Sun Aug 24 19:43:23 2014 -0400
>>>>> # Node ID 12718916f03b4a917609ecf41bb8d93fbd1024ca
>>>>> # Parent  cfec84ed3d8f5b9877f48ec079eb0583b51f56ad
>>>>> config: give a more detailed sample repo config
>>>>>
>>>>> Some examples of the typical configurations that one might want to do
>>>>> in an .hg/hgrc file.
>>>>
>>>> Still not trace of the obvious candidate "default-push"
>>>
>>> I honestly find that a bit too specialised for a simple example hgrc.
>>> I think people are more likely to want to know about local and remote
>>> clones. A fourth example path already seems too cluttered.
>>> Personally, I never use default-push.
>>
>> default-push saved the life of multiple of my logilabian by preventing
>> them to push to the wrong repo by mistake. I feel like it is a valid
>> example because it make a feature discoverable. Most people will not
>> suspect it ever exist otherwise
>
> Okay, I'll add it.

Thanks

>
>> I'm still not super fan of the `myxxx` names. It may just be that is
>> read like `phpmyeditconfig` to me.
>
> Okay, I can change these names, but we already have a precedence for
> "my_path" in the paths section of `hg help hgrc`.

Sold.

>
>> If you do not like having more than three, we could maybe drop one of
>> them in favor of default-push.
>
> Maybe a tiny bit of clutter will be ok.
>
>> You should also put a reference to the documentation and a small comment
>> to highlight we have reserved name (default) with special meaning and
>> also arbitrary ones.
>
> I wish it were possible to give a reference to a particular section of
> `hg help hgrc`, which is a rather long document.

Sounds like a good idea `hg help hgrc.paths`. Care to send a patches?

>> Seeing a new version of a patch that does not apply your review
>> comment and mention nothing about them is quite anoying.
>
> Sorry, I'll try to annoy you less.
>
> Should I resend the entire series?

patches 1 and 3 have been pushed. just resend 2.

Having the [phases]publish=True section the repohgrc could be nice too 
(but another patches)

Patch

diff --git a/mercurial/config.py b/mercurial/config.py
--- a/mercurial/config.py
+++ b/mercurial/config.py
@@ -27,7 +27,12 @@  username =
 
     'local':
 """# example repository config (see "hg help config" for more info)
-""",
+
+[paths]
+# path aliases to other clones of this repo in URLs or filesystem paths
+# default = http://example.com/hg/example-repo
+# myfork  = ssh://jdoe@example.net/hg/jdoes-fork
+# myclone = /home/jdoe/jdoes-clone""",
 
     'global':
 """# example system-wide hg config (see "hg help config" for more info)