[PATCH] devel: rename 'all' to 'all-warnings' (BC)

Augie Fackler raf at durin42.com
Wed May 27 00:03:33 CDT 2015


On Tue, May 26, 2015 at 06:40:31PM -0700, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com>
> # Date 1432674876 25200
> #      Tue May 26 14:14:36 2015 -0700
> # Node ID e6736020ee15408a410eb90239c98ab62cd1754e
> # Parent  61b3529e23778f542044d24bb1ccd5688516a7f0
> devel: rename 'all' to 'all-warnings' (BC)
>

queued with some copyediting on the commit message, thanks

>
> We have started to isolate extra usecase for developer only output that are not
> warning. As the section has a fairly generic name 'devel' it would make sense to
> sneak them there. If so 'all' becomes a bit miss leading so we rename it to
> 'all-warnings'. This will break some developer setup but the test are still fine
> and developer will likely spot this change.
>
> diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
> --- a/mercurial/localrepo.py
> +++ b/mercurial/localrepo.py
> @@ -942,11 +942,11 @@ class localrepository(object):
>          if tr and tr.running():
>              return tr
>          return None
>
>      def transaction(self, desc, report=None):
> -        if (self.ui.configbool('devel', 'all')
> +        if (self.ui.configbool('devel', 'all-warnings')
>                  or self.ui.configbool('devel', 'check-locks')):
>              l = self._lockref and self._lockref()
>              if l is None or not l.held:
>                  scmutil.develwarn(self.ui, 'transaction with no lock')
>          tr = self.currenttransaction()
> @@ -1247,11 +1247,11 @@ class localrepository(object):
>              l.lock()
>              return l
>
>          # We do not need to check for non-waiting lock aquisition.  Such
>          # acquisition would not cause dead-lock as they would just fail.
> -        if wait and (self.ui.configbool('devel', 'all')
> +        if wait and (self.ui.configbool('devel', 'all-warnings')
>                       or self.ui.configbool('devel', 'check-locks')):
>              l = self._lockref and self._lockref()
>              if l is not None and l.held:
>                  scmutil.develwarn(self.ui, '"wlock" acquired after "lock"')
>
> diff --git a/tests/run-tests.py b/tests/run-tests.py
> --- a/tests/run-tests.py
> +++ b/tests/run-tests.py
> @@ -756,11 +756,11 @@ class Test(unittest.TestCase):
>          hgrc.write(b'backout = -d "0 0"\n')
>          hgrc.write(b'commit = -d "0 0"\n')
>          hgrc.write(b'shelve = --date "0 0"\n')
>          hgrc.write(b'tag = -d "0 0"\n')
>          hgrc.write(b'[devel]\n')
> -        hgrc.write(b'all = true\n')
> +        hgrc.write(b'all-warnings = true\n')
>          hgrc.write(b'[largefiles]\n')
>          hgrc.write(b'usercache = %s\n' %
>                     (os.path.join(self._testtmp, b'.cache/largefiles')))
>
>          for opt in self._extraconfigopts:
> diff --git a/tests/test-basic.t b/tests/test-basic.t
> --- a/tests/test-basic.t
> +++ b/tests/test-basic.t
> @@ -3,11 +3,11 @@ Create a repository:
>    $ hg config
>    defaults.backout=-d "0 0"
>    defaults.commit=-d "0 0"
>    defaults.shelve=--date "0 0"
>    defaults.tag=-d "0 0"
> -  devel.all=true
> +  devel.all-warnings=true
>    largefiles.usercache=$TESTTMP/.cache/largefiles (glob)
>    ui.slash=True
>    ui.interactive=False
>    ui.mergemarkers=detailed
>    ui.promptecho=True
> diff --git a/tests/test-commandserver.t b/tests/test-commandserver.t
> --- a/tests/test-commandserver.t
> +++ b/tests/test-commandserver.t
> @@ -176,11 +176,11 @@ check that local configs for the cached
>    bundle.mainreporoot=$TESTTMP/repo
>    defaults.backout=-d "0 0"
>    defaults.commit=-d "0 0"
>    defaults.shelve=--date "0 0"
>    defaults.tag=-d "0 0"
> -  devel.all=true
> +  devel.all-warnings=true
>    largefiles.usercache=$TESTTMP/.cache/largefiles
>    ui.slash=True
>    ui.interactive=False
>    ui.mergemarkers=detailed
>    ui.foo=bar
> diff --git a/tests/test-devel-warnings.t b/tests/test-devel-warnings.t
> --- a/tests/test-devel-warnings.t
> +++ b/tests/test-devel-warnings.t
> @@ -42,11 +42,11 @@
>
>    $ cat << EOF >> $HGRCPATH
>    > [extensions]
>    > buggylocking=$TESTTMP/buggylocking.py
>    > [devel]
> -  > all=1
> +  > all-warnings=1
>    > EOF
>
>    $ hg init lock-checker
>    $ cd lock-checker
>    $ hg buggylocking
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list