64 pass |
64 pass |
65 |
65 |
66 # The sandboxes contain all revisions in zandronum and zandronum-stable. |
66 # The sandboxes contain all revisions in zandronum and zandronum-stable. |
67 # Thus we only need to try find the revision in the sandbox repos. |
67 # Thus we only need to try find the revision in the sandbox repos. |
68 try: |
68 try: |
69 data = repo.hg_command ("log", "-r", node, "--template", |
69 data = repo.hg_command ("log", "-l1", "-r", node, "--template", |
70 "{node|short}@@@@@@@" + |
70 "{node|short}@@@@@@@" + |
71 "{desc}@@@@@@@" + |
71 "{desc}@@@@@@@" + |
72 "{author}@@@@@@@" + |
72 "{author}@@@@@@@" + |
73 "{diffstat}@@@@@@@" + |
73 "{diffstat}@@@@@@@" + |
74 "{date|hgdate}@@@@@@@" + |
74 "{date|hgdate}@@@@@@@" + |
75 "{bookmarks}") |
75 "{bookmarks}@@@@@@@" + |
|
76 "{latesttagdistance}@@@@@@@" + |
|
77 "{latesttag}") |
76 except hgapi.HgException: |
78 except hgapi.HgException: |
77 bot.privmsg (replyto, 'couldn\'t find changeset %s' % (node)) |
79 bot.privmsg (replyto, 'couldn\'t find changeset %s' % (node)) |
78 return |
80 return |
79 |
81 |
80 try: |
82 try: |
145 else: |
149 else: |
146 datestring = '%d day%s ago' % (delta.days, plural (delta.days)) |
150 datestring = '%d day%s ago' % (delta.days, plural (delta.days)) |
147 else: |
151 else: |
148 datestring = 'on %s' % (str (date)) |
152 datestring = 'on %s' % (str (date)) |
149 |
153 |
150 bot.privmsg (replyto, 'changeset\0035 %s%s\003 (%s %s)\003: committed by\0032 %s\003 %s,\0032 %s' % \ |
154 versionstring = "" |
151 (node, bookmarks, zanversion, date.strftime ('%y%m%d-%H%M'), author, datestring, diffstat)) |
155 if latesttagdistance != 0: |
|
156 versionstring = '%s %s, %d hops from %s' % (zanversion, date.strftime ('%y%m%d-%H%M'), latesttagdistance, latesttag) |
|
157 else: |
|
158 versionstring = latesttag |
|
159 |
|
160 bot.privmsg (replyto, 'changeset\0035 %s%s\003 (%s)\003: committed by\0032 %s\003 %s,\0032 %s' % \ |
|
161 (node, bookmarks, versionstring, author, datestring, diffstat)) |
152 |
162 |
153 for line in message.split ('\n'): |
163 for line in message.split ('\n'): |
154 bot.privmsg (replyto, ' ' + line) |
164 bot.privmsg (replyto, ' ' + line) |
155 except hgapi.HgException as e: |
165 except hgapi.HgException as e: |
156 result = HgPoll.decipher_hgapi_error (e) |
166 result = HgPoll.decipher_hgapi_error (e) |