Wed, 05 Nov 2014 01:36:38 +0200
- fixed: .cset didn't operate properly with dates
cmd_idgames.py | file | annotate | diff | comparison | revisions | |
cobalt.py | file | annotate | diff | comparison | revisions |
--- a/cmd_idgames.py Wed Nov 05 00:19:15 2014 +0200 +++ b/cmd_idgames.py Wed Nov 05 01:36:38 2014 +0200 @@ -10,7 +10,7 @@ { 'name': 'idgames', 'description': 'Searches doomworld.com/idgames for wads', - 'args': '<wad>', + 'args': '<wad...>', 'level': 'normal', }, ]
--- a/cobalt.py Wed Nov 05 00:19:15 2014 +0200 +++ b/cobalt.py Wed Nov 05 01:36:38 2014 +0200 @@ -217,9 +217,17 @@ repo.hg_command ('pull', '../zandronum-sandbox') repo.hg_command ('pull', '../zandronum-sandbox-stable') - data = repo.hg_command ('log', '--template', '{node} {date(date, "%y%m%d-%H%M")}\n') + data = repo.hg_command ('log', '--template', '{node} {date|hgdate}\n') + f = open ('commits.txt', 'w') - f.write (data) + + for line in data.split ('\n'): + if line == '': + continue + + words = line.split (' ') + timestamp = int (words[1]) + f.write ('%s %s\n' % (words[0], datetime.utcfromtimestamp (timestamp).strftime ('%y%m%d-%H%M'))) f.close() g_needCommitsTxtRebuild = False #enddef @@ -324,8 +332,6 @@ ' Retrieves and processes commits for zandronum repositories ' ' Ensure both repositories are OK before using this! ' def process_zan_repo_updates (repo_name): - return - global repocheck_timeout global suds_client global g_config @@ -959,15 +965,14 @@ try: data = repo.hg_command ("log", "-r", node, "--template", - "{node|short}@@@@@@@{desc}@@@@@@@{author}@@@@@@@{diffstat}@@@@@@@{date(date, '%y%m%d-%H%M')}@@@@@@@{date(date, '%s')}") + "{node|short}@@@@@@@{desc}@@@@@@@{author}@@@@@@@{diffstat}@@@@@@@{date|hgdate}") data = data.split ('@@@@@@@') node = data[0] message = data[1] author = data[2] diffstat = data[3] - dateversion = data[4] - date = datetime.fromtimestamp (int (data[5])) + date = datetime.utcfromtimestamp (int (data[4].split (' ')[0])) delta = datetime.now() - date datestring = '' @@ -999,7 +1004,7 @@ #fi self.privmsg (replyto, 'changeset %s (%s): committed by %s %s (%s)' % \ - (node, dateversion, author, datestring, diffstat)) + (node, date.strftime ('%y%m%d-%H%M'), author, datestring, diffstat)) for line in message.split ('\n'): self.privmsg (replyto, ' ' + line)