Patchwork [4,of,4] namespaces: remove templatename method on the namespaces object

login
register
mail settings
Submitter Sean Farley
Date Jan. 2, 2015, 11:42 p.m.
Message ID <d74b01f30e1010f49a7d.1420242125@laptop.local>
Download mbox | patch
Permalink /patch/7306/
State Accepted
Commit b8b246cffdee8b9fbb345ff62a2efda1e2929101
Headers show

Comments

Sean Farley - Jan. 2, 2015, 11:42 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1419201247 28800
#      Sun Dec 21 14:34:07 2014 -0800
# Node ID d74b01f30e1010f49a7d047a6913b662e217dbc0
# Parent  be5de72834c153d850c1e9c33aeb3cc26db5f088
namespaces: remove templatename method on the namespaces object

Now that there is an object for each individual namespace, we use the
templatename property on that object instead of the method on the collection of
namespaces.
Matt Mackall - Jan. 7, 2015, 8:09 p.m.
On Fri, 2015-01-02 at 15:42 -0800, Sean Farley wrote:
> # HG changeset patch
> # User Sean Farley <sean.michael.farley@gmail.com>
> # Date 1419201247 28800
> #      Sun Dec 21 14:34:07 2014 -0800
> # Node ID d74b01f30e1010f49a7d047a6913b662e217dbc0
> # Parent  be5de72834c153d850c1e9c33aeb3cc26db5f088
> namespaces: remove templatename method on the namespaces object

These are queued for default, thanks.

Patch

diff --git a/mercurial/namespaces.py b/mercurial/namespaces.py
--- a/mercurial/namespaces.py
+++ b/mercurial/namespaces.py
@@ -83,14 +83,10 @@  class namespaces(object):
                     maxrev = max(cl.rev(node) for node in n)
                     return cl.node(maxrev)
                 return n[0]
         raise KeyError(_('no such name: %s') % name)
 
-    def templatename(self, namespace):
-        """method that returns the template name of a namespace"""
-        return self._names[namespace].templatename
-
 class namespace(object):
     """provides an interface to a namespace
 
     Namespaces are basically generic many-to-many mapping between some
     (namespaced) names and nodes. The goal here is to control the pollution of