Mercurial > hg-stable
comparison tests/test-hybridencode.py @ 17590:eb0884680f5c
store: eliminate one level of lambda functions on _hybridencode
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Sun, 16 Sep 2012 11:36:14 +0200 |
parents | f2bcc5975f10 |
children | 9e31a72bede7 |
comparison
equal
deleted
inserted
replaced
17589:b11024849db6 | 17590:eb0884680f5c |
---|---|
1 from mercurial import store | 1 from mercurial import store |
2 | 2 |
3 auxencode = lambda f: store._auxencode(f, True) | 3 hybridencode = lambda f: store._hybridencode(f, True) |
4 hybridencode = lambda f: store._hybridencode(f, auxencode) | |
5 | 4 |
6 enc = hybridencode # used for 'dotencode' repo format | 5 enc = hybridencode # used for 'dotencode' repo format |
7 | 6 |
8 def show(s): | 7 def show(s): |
9 print "A = '%s'" % s.encode("string_escape") | 8 print "A = '%s'" % s.encode("string_escape") |