- try print dateversion more correctly

Tue, 04 Nov 2014 17:10:44 +0200

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Tue, 04 Nov 2014 17:10:44 +0200
changeset 60
b2db21672012
parent 59
6a7199a714a1
child 61
8d1098095dec

- try print dateversion more correctly

cobalt.py file | annotate | diff | comparison | revisions
--- a/cobalt.py	Tue Nov 04 17:07:46 2014 +0200
+++ b/cobalt.py	Tue Nov 04 17:10:44 2014 +0200
@@ -1134,14 +1134,15 @@
 
 			try:
 				data = repo.hg_command ("log", "-r", node, "--template",
-					"{node|short}@@@@@@@{desc}@@@@@@@{author}@@@@@@@{diffstat}@@@@@@@{date(date, '%s')}")
+					"{node|short}@@@@@@@{desc}@@@@@@@{author}@@@@@@@{diffstat}@@@@@@@{date(date, '%y%m%d-%H%M')}@@@@@@@{date(date, '%s')}")
 				data = data.split ('@@@@@@@')
 
 				node = data[0]
 				message = data[1]
 				author = data[2]
 				diffstat = data[3]
-				date = datetime.fromtimestamp (int (data[4]))
+				dateversion = data[4]
+				date = datetime.fromtimestamp (int (data[5]))
 				delta = datetime.now() - date
 				datestring = ''
 
@@ -1173,7 +1174,7 @@
 				#fi
 
 				self.privmsg (replyto, 'changeset %s (%s): committed by %s %s (%s)' % \
-					(node, date.strftime('%g%m%d-%H%M'), author, datestring, diffstat))
+					(node, dateversion, author, datestring, diffstat))
 
 				for line in message.split ('\n'):
 					self.privmsg (replyto, '    ' + line)

mercurial