Patchwork [05,of,10,RFC] templater: add local versions of labelify and delabelify

login
register
mail settings
Submitter Sean Farley
Date Dec. 21, 2012, 5:37 a.m.
Message ID <7db04bb18ded6799e2a8.1356068275@laptop.local>
Download mbox | patch
Permalink /patch/239/
State Superseded
Headers show

Comments

Sean Farley - Dec. 21, 2012, 5:37 a.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1355961686 21600
# Node ID 7db04bb18ded6799e2a8f4d5aa935ded9454c240
# Parent  5c79792796ac3141f0501d8e20d97b26dd8f5f4f
templater: add local versions of labelify and delabelify

I'm not sure this should be its own commit or folded into the next one, but I thought I'd be safe and split it up.

Patch

diff --git a/mercurial/templater.py b/mercurial/templater.py
--- a/mercurial/templater.py
+++ b/mercurial/templater.py
@@ -284,10 +284,12 @@ 
 
 # template engine
 
 path = ['templates', '../templates']
 stringify = templatefilters.stringify
+labelify = templatefilters.labelify
+delabelify = templatefilters.delabelify
 
 def _flatten(thing):
     '''yield a single stream from a possibly nested set of iterators'''
     if isinstance(thing, str):
         yield thing