Patchwork [2,of,2] chgserver: add [alias] to confighash

login
register
mail settings
Submitter Jun Wu
Date May 7, 2016, 2:18 p.m.
Message ID <3863d4110df0d196b352.1462630706@x1c>
Download mbox | patch
Permalink /patch/14966/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

Jun Wu - May 7, 2016, 2:18 p.m.
# HG changeset patch
# User Jun Wu <quark@fb.com>
# Date 1462629092 -3600
#      Sat May 07 14:51:32 2016 +0100
# Node ID 3863d4110df0d196b352d894efc5030f9df0c887
# Parent  e4e2efae9f13369bd9e9691edd48a7da6fd18fcb
chgserver: add [alias] to confighash

The [alias] config section affects a global state: commands.table. It's hard
to trace whether an alias is added by a config option or an extension, and
add/remove aliases in a safe way per chg request. It will hurt performance a
bit if we clean the table and parse aliases every time. Therefore let's just
add it to confighash.

This will make chg pass test-pager.t.
Yuya Nishihara - May 8, 2016, 12:58 p.m.
On Sat, 7 May 2016 15:18:26 +0100, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark@fb.com>
> # Date 1462629092 -3600
> #      Sat May 07 14:51:32 2016 +0100
> # Node ID 3863d4110df0d196b352d894efc5030f9df0c887
> # Parent  e4e2efae9f13369bd9e9691edd48a7da6fd18fcb
> chgserver: add [alias] to confighash

Sure, queued the patch 2, thanks.

I'll look into the patch 1 tomorrow if nobody review it yet.

Patch

diff --git a/hgext/chgserver.py b/hgext/chgserver.py
--- a/hgext/chgserver.py
+++ b/hgext/chgserver.py
@@ -80,6 +80,7 @@ 
 
 # sensitive config sections affecting confighash
 _configsections = [
+    'alias',  # affects global state commands.table
     'extdiff',  # uisetup will register new commands
     'extensions',
 ]