Patchwork [1,of,3] configitems: add alias for 'ui.username'

login
register
mail settings
Submitter David Demelier
Date June 27, 2017, 6:17 p.m.
Message ID <e79846f1dbf02981993a.1498587420@kiwi.home>
Download mbox | patch
Permalink /patch/21784/
State Accepted
Headers show

Comments

David Demelier - June 27, 2017, 6:17 p.m.
# HG changeset patch
# User David Demelier <markand@malikania.fr>
# Date 1497954110 -7200
#      Tue Jun 20 12:21:50 2017 +0200
# Node ID e79846f1dbf02981993aa524df33a40722c98b72
# Parent  eb4c49f55f1f0d7719f514c16bec54515eb54f62
configitems: add alias for 'ui.username'

Patch

diff -r eb4c49f55f1f -r e79846f1dbf0 mercurial/configitems.py
--- a/mercurial/configitems.py	Sun Jun 25 22:30:14 2017 -0700
+++ b/mercurial/configitems.py	Tue Jun 20 12:21:50 2017 +0200
@@ -19,9 +19,10 @@ 
     :default: default value for this item,
     """
 
-    def __init__(self, section, name, default=None):
+    def __init__(self, section, name, alias=None, default=None):
         self.section = section
         self.name = name
+        self.alias = alias
         self.default = default
 
 coreitems = {}
@@ -48,3 +49,6 @@ 
 coreconfigitem('ui', 'quiet',
     default=False,
 )
+coreconfigitem('ui', 'username',
+    alias=[('ui', 'user')]
+)