Patchwork [2,of,3] Replace cmdutil with registrar

login
register
mail settings
Submitter Rishabh Madan
Date June 3, 2017, 10:28 p.m.
Message ID <dfc1e6491b96127ae645.1496528895@bunty>
Download mbox | patch
Permalink /patch/21166/
State Accepted
Headers show

Comments

Rishabh Madan - June 3, 2017, 10:28 p.m.
# HG changeset patch
# User Rishabh Madan <rishabhmadan96@gmail.com>
# Date 1496522264 -7200
#      Sat Jun 03 22:37:44 2017 +0200
# Node ID dfc1e6491b96127ae64504e8dad6cac037b80b6a
# Parent  de126cd5bbe0a42f36e60f35861b8b11a4e36571
Replace cmdutil with registrar

Since cmdutil will be dropped after version 4.6, this patch replaces it with
registrar for the releasenotes extension.

Patch

diff -r de126cd5bbe0 -r dfc1e6491b96 hgext/releasenotes.py
--- a/hgext/releasenotes.py	Fri Jun 02 23:33:30 2017 +0200
+++ b/hgext/releasenotes.py	Sat Jun 03 22:37:44 2017 +0200
@@ -20,14 +20,14 @@ 
 
 from mercurial.i18n import _
 from mercurial import (
-    cmdutil,
+    registrar,
     error,
     minirst,
     scmutil,
 )
 
 cmdtable = {}
-command = cmdutil.command(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