[issue918] Option to copy some of .hg/hgrc upon local clone

Thomas Arendsen Hein thomas at intevation.de
Wed Jan 9 02:12:20 CST 2008


* Jesse Glick <mercurial-bugs at selenic.com> [20080107 23:13]:
> New submission from Jesse Glick <jesse.glick at sun.com>:
> 
> Sometimes there are important pieces of configuration in .hg/hgrc which (1)
> cannot be in global config, (2) would make sense in most or all clones of that
> repo as well (just not in unrelated repos).
> 
> In particular, ui.username may need to have a project-specific value. For
> working on Hg sources, I want to use my full email address. For working on
> NetBeans sources, I want to use 'jglick' - a login ID tied to authentication and
> other site functions such as bug tracking.

But if you are on a multi user system and someone clones from you,
he will start to commit with your ui.username.

This isn't theoretical, I clone from coworkers.

> When doing an initial clone of the remote repository, I need to remember to set
> 
> [ui]
> username=jglick
> 
> which is OK. But when I do a local clone, I need to remember to set it again,
> which is irritating.

You could also call it consistent :)

> It would be nice if there were some way to mark in hgrc that certain sections
> ought to be copied to the new hgrc after a local clone (subject to the normal
> security checks, i.e. only if cloned by the same user). Perhaps
> 
> [clone]
> username.ui =
> 
> and the clone command would check for any keys listed in this section and try to
> copy them.
> 
> Would be happy to supply a patch if it is agreed the enhancement would be desirable.

Maybe you can talk to Glenn Ammons who suggests an extension to make
certain hgrc parameters accessible over the network, too.
If your ideas are combined, you could e.g. transfer the repository
description during cloning, regardless of local clone or over the
network (to get consistent behaviour).

Thomas

-- 
thomas at intevation.de - http://intevation.de/~thomas/ - OpenPGP key: 0x5816791A
Intevation GmbH, Osnabrueck - Register: Amtsgericht Osnabrueck, HR B 18998
Geschaeftsfuehrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner


More information about the Mercurial-devel mailing list