Patchwork chgserver: call "load" for new ui objects

login
register
mail settings
Submitter Jun Wu
Date Dec. 5, 2016, 9:37 p.m.
Message ID <b1877dc4bd741a4855c3.1480973872@x1c>
Download mbox | patch
Permalink /patch/17822/
State Accepted
Headers show

Comments

Jun Wu - Dec. 5, 2016, 9:37 p.m.
# HG changeset patch
# User Jun Wu <quark@fb.com>
# Date 1480973795 0
#      Mon Dec 05 21:36:35 2016 +0000
# Node ID b1877dc4bd741a4855c3fda0d473e5d821f5c4e2
# Parent  2463b16bbd3710b619e0e948651db9948341f990
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r b1877dc4bd74
chgserver: call "load" for new ui objects

After d83ca854fa21, we need to call "ui.load" explicitly to load config
files.
Kostia Balytskyi - Dec. 5, 2016, 10:08 p.m.
LGTM.

On 12/5/16 9:37 PM, Jun Wu wrote:
> # HG changeset patch

> # User Jun Wu <quark@fb.com>

> # Date 1480973795 0

> #      Mon Dec 05 21:36:35 2016 +0000

> # Node ID b1877dc4bd741a4855c3fda0d473e5d821f5c4e2

> # Parent  2463b16bbd3710b619e0e948651db9948341f990

> # Available At https://bitbucket.org/quark-zju/hg-draft

> #              hg pull https://bitbucket.org/quark-zju/hg-draft -r b1877dc4bd74

> chgserver: call "load" for new ui objects

>

> After d83ca854fa21, we need to call "ui.load" explicitly to load config

> files.

>

> diff --git a/mercurial/chgserver.py b/mercurial/chgserver.py

> --- a/mercurial/chgserver.py

> +++ b/mercurial/chgserver.py

> @@ -256,5 +256,5 @@ def _loadnewui(srcui, args):

>       from . import dispatch  # avoid cycle

>   

> -    newui = srcui.__class__()

> +    newui = srcui.__class__.load()

>       for a in ['fin', 'fout', 'ferr', 'environ']:

>           setattr(newui, a, getattr(srcui, a))

> _______________________________________________

> Mercurial-devel mailing list

> Mercurial-devel@mercurial-scm.org

> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Yuya Nishihara - Dec. 6, 2016, 12:33 p.m.
On Mon, 5 Dec 2016 21:37:52 +0000, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark@fb.com>
> # Date 1480973795 0
> #      Mon Dec 05 21:36:35 2016 +0000
> # Node ID b1877dc4bd741a4855c3fda0d473e5d821f5c4e2
> # Parent  2463b16bbd3710b619e0e948651db9948341f990
> # Available At https://bitbucket.org/quark-zju/hg-draft
> #              hg pull https://bitbucket.org/quark-zju/hg-draft -r b1877dc4bd74
> chgserver: call "load" for new ui objects

Good catch! Queued, thanks.

Patch

diff --git a/mercurial/chgserver.py b/mercurial/chgserver.py
--- a/mercurial/chgserver.py
+++ b/mercurial/chgserver.py
@@ -256,5 +256,5 @@  def _loadnewui(srcui, args):
     from . import dispatch  # avoid cycle
 
-    newui = srcui.__class__()
+    newui = srcui.__class__.load()
     for a in ['fin', 'fout', 'ferr', 'environ']:
         setattr(newui, a, getattr(srcui, a))