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

login
register
mail settings
Submitter Pierre-Yves David
Date June 27, 2017, 1 p.m.
Message ID <f9a1d0c3ac29bcce9ac9.1498568433@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21771/
State Accepted
Headers show

Comments

Pierre-Yves David - June 27, 2017, 1 p.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 f9a1d0c3ac29bcce9ac9f4c03c1c8e6600ecfa54
# Parent  3266463e776f96e2de692de32c3935ad3f752623
# 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 f9a1d0c3ac29
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 = {}