Patchwork [4,of,6] blackbox: minor code reordering

login
register
mail settings
Submitter Pierre-Yves David
Date June 22, 2017, 7:34 a.m.
Message ID <878499c8ccc070730292.1498116873@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21603/
State Changes Requested
Headers show

Comments

Pierre-Yves David - June 22, 2017, 7:34 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1497699688 -7200
#      Sat Jun 17 13:41:28 2017 +0200
# Node ID 878499c8ccc070730292887a0c3278de427d756d
# Parent  f69b5b8655172cc33f0765809c9c7620978910c0
# EXP-Topic config.register
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 878499c8ccc0
blackbox: minor code reordering

The version declaration should come first in my opinion. This will help gather
the command table with the config table.

Patch

diff --git a/hgext/blackbox.py b/hgext/blackbox.py
--- a/hgext/blackbox.py
+++ b/hgext/blackbox.py
@@ -49,13 +49,15 @@  from mercurial import (
     util,
 )
 
-cmdtable = {}
-command = registrar.command(cmdtable)
 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
 # be specifying the version(s) of Mercurial they are tested with, or
 # leave the attribute unspecified.
 testedwith = 'ships-with-hg-core'
+
+cmdtable = {}
+command = registrar.command(cmdtable)
+
 lastui = None
 
 filehandles = {}