Patchwork [3,of,3] configitems: use devel.all-warnings to replace devel.all

login
register
mail settings
Submitter Jun Wu
Date July 13, 2017, 1:22 a.m.
Message ID <61035c132ae5643796a2.1499908968@x1c>
Download mbox | patch
Permalink /patch/22287/
State Accepted
Headers show

Comments

Jun Wu - July 13, 2017, 1:22 a.m.
# HG changeset patch
# User Jun Wu <quark@fb.com>
# Date 1499898287 25200
#      Wed Jul 12 15:24:47 2017 -0700
# Node ID 61035c132ae5643796a2a5b1571d5cc7f350c133
# Parent  a0df53ed55b26539c62584231cfcb567594ab34a
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r 61035c132ae5
configitems: use devel.all-warnings to replace devel.all

It appears to be a misspell in patch.py.
Augie Fackler - July 14, 2017, 6:42 p.m.
On Wed, Jul 12, 2017 at 06:22:48PM -0700, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark@fb.com>
> # Date 1499898287 25200
> #      Wed Jul 12 15:24:47 2017 -0700
> # Node ID 61035c132ae5643796a2a5b1571d5cc7f350c133
> # Parent  a0df53ed55b26539c62584231cfcb567594ab34a
> # Available At https://bitbucket.org/quark-zju/hg-draft
> #              hg pull https://bitbucket.org/quark-zju/hg-draft -r 61035c132ae5
> configitems: use devel.all-warnings to replace devel.all
>
> It appears to be a misspell in patch.py.
>
> diff --git a/mercurial/configitems.py b/mercurial/configitems.py
> --- a/mercurial/configitems.py
> +++ b/mercurial/configitems.py
> @@ -95,7 +95,4 @@ coreconfigitem('commands', 'update.requi
>      default=False,
>  )
> -coreconfigitem('devel', 'all',
> -    default=False,
> -)
>  coreconfigitem('devel', 'all-warnings',
>      default=False,
> diff --git a/mercurial/patch.py b/mercurial/patch.py
> --- a/mercurial/patch.py
> +++ b/mercurial/patch.py

Nice catch. I've queued this with only the patch.py hunk included (and
a tweak to the commit message).

> @@ -2568,5 +2568,5 @@ def trydiff(repo, revs, ctx1, ctx2, modi
>      gitmode = {'l': '120000', 'x': '100755', '': '100644'}
>
> -    if relroot != '' and (repo.ui.configbool('devel', 'all')
> +    if relroot != '' and (repo.ui.configbool('devel', 'all-warnings')
>                            or repo.ui.configbool('devel', 'check-relroot')):
>          for f in modified + added + removed + copy.keys() + copy.values():
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -95,7 +95,4 @@  coreconfigitem('commands', 'update.requi
     default=False,
 )
-coreconfigitem('devel', 'all',
-    default=False,
-)
 coreconfigitem('devel', 'all-warnings',
     default=False,
diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -2568,5 +2568,5 @@  def trydiff(repo, revs, ctx1, ctx2, modi
     gitmode = {'l': '120000', 'x': '100755', '': '100644'}
 
-    if relroot != '' and (repo.ui.configbool('devel', 'all')
+    if relroot != '' and (repo.ui.configbool('devel', 'all-warnings')
                           or repo.ui.configbool('devel', 'check-relroot')):
         for f in modified + added + removed + copy.keys() + copy.values():