changeset 10705:194342b34870

filelog: no need to optimize an uncommon case, assume meta = {}
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Tue, 16 Mar 2010 01:16:04 +0100
parents 1ee60e82333c
children d8d1b56d4519
files mercurial/filelog.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/filelog.py	Mon Mar 15 16:36:32 2010 -0500
+++ b/mercurial/filelog.py	Tue Mar 16 01:16:04 2010 +0100
@@ -33,9 +33,7 @@
 
     def add(self, text, meta, transaction, link, p1=None, p2=None):
         if meta or text.startswith('\1\n'):
-            mt = ""
-            if meta:
-                mt = ["%s: %s\n" % (k, v) for k, v in sorted(meta.iteritems())]
+            mt = ["%s: %s\n" % (k, v) for k, v in sorted(meta.iteritems())]
             text = "\1\n%s\1\n%s" % ("".join(mt), text)
         return self.addrevision(text, transaction, link, p1, p2)