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

Jesse Glick mercurial-bugs at selenic.com
Mon Jan 7 14:34:35 CST 2008


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.

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.

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.

----------
messages: 4837
nosy: jglick
priority: wish
status: unread
title: Option to copy some of .hg/hgrc upon local clone
topic: ui

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue918>
____________________________________________________



More information about the Mercurial-devel mailing list