diff hgext/journal.py @ 29691:69890b5dd32b

journal: use fm.formatlist() to pass hashes in appropriate type (BC)
author Yuya Nishihara <yuya@tcha.org>
date Sun, 31 Jul 2016 16:56:26 +0900
parents 12f04946053c
children e54bdd3aa23b
line wrap: on
line diff
--- a/hgext/journal.py	Sun Jul 10 21:03:06 2016 +0900
+++ b/hgext/journal.py	Sun Jul 31 16:56:26 2016 +0900
@@ -475,8 +475,10 @@
     for count, entry in enumerate(repo.journal.filtered(name=name)):
         if count == limit:
             break
-        newhashesstr = ','.join([fm.hexfunc(hash) for hash in entry.newhashes])
-        oldhashesstr = ','.join([fm.hexfunc(hash) for hash in entry.oldhashes])
+        newhashesstr = fm.formatlist(map(fm.hexfunc, entry.newhashes),
+                                     name='node', sep=',')
+        oldhashesstr = fm.formatlist(map(fm.hexfunc, entry.oldhashes),
+                                     name='node', sep=',')
 
         fm.startitem()
         fm.condwrite(ui.verbose, 'oldhashes', '%s -> ', oldhashesstr)