Tue, 04 Nov 2014 17:10:44 +0200
- 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)