Patchwork [7,of,7] templater: mark .joinfmt as a private attribute

login
register
mail settings
Submitter Yuya Nishihara
Date April 4, 2018, 2:48 p.m.
Message ID <8cf313b60c1eb83eeeed.1522853338@mimosa>
Download mbox | patch
Permalink /patch/30262/
State Accepted
Headers show

Comments

Yuya Nishihara - April 4, 2018, 2:48 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1521293425 -32400
#      Sat Mar 17 22:30:25 2018 +0900
# Node ID 8cf313b60c1eb83eeeedfa2e1ef09acbcc1de581
# Parent  3e8117550703c88ed14a84e9db133eb2390adaa4
templater: mark .joinfmt as a private attribute
Augie Fackler - April 4, 2018, 5:54 p.m.
On Wed, Apr 04, 2018 at 11:48:58PM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1521293425 -32400
> #      Sat Mar 17 22:30:25 2018 +0900
> # Node ID 8cf313b60c1eb83eeeedfa2e1ef09acbcc1de581
> # Parent  3e8117550703c88ed14a84e9db133eb2390adaa4
> templater: mark .joinfmt as a private attribute

queued, thanks

Patch

diff --git a/mercurial/templateutil.py b/mercurial/templateutil.py
--- a/mercurial/templateutil.py
+++ b/mercurial/templateutil.py
@@ -87,7 +87,7 @@  class hybrid(wrapped):
         self._gen = gen  # generator or function returning generator
         self._values = values
         self._makemap = makemap
-        self.joinfmt = joinfmt
+        self._joinfmt = joinfmt
         self.keytype = keytype  # hint for 'x in y' where type(x) is unresolved
 
     def itermaps(self, context):
@@ -97,7 +97,7 @@  class hybrid(wrapped):
 
     def join(self, context, mapping, sep):
         # TODO: switch gen to (context, mapping) API?
-        return joinitems((self.joinfmt(x) for x in self._values), sep)
+        return joinitems((self._joinfmt(x) for x in self._values), sep)
 
     def show(self, context, mapping):
         # TODO: switch gen to (context, mapping) API?