Tue, 12 Jan 2016 21:14:26 +0200
Be compatible with Mercurial 2.2.2. Thanks, Debian...
hgpoll.py | file | annotate | diff | comparison | revisions | |
hgrepo.py | file | annotate | diff | comparison | revisions |
--- a/hgpoll.py Mon Jan 11 18:29:14 2016 +0200 +++ b/hgpoll.py Tue Jan 12 21:14:26 2016 +0200 @@ -40,6 +40,7 @@ import traceback import sys from munge import munge +import datetime Repositories = [] RepositoriesByName = {} @@ -115,10 +116,13 @@ # Acquire additional data commit = repo.get_commit_data (rev=cset, author='author|person', - date='date(date, "%A %d %B %Y %H:%M:%S")', + date='date|hgdate', email='author|email', message='desc') + commit['date'] = datetime.datetime.utcfromtimestamp(int(commit['date'][0]) - int(commit['date'][1])) + commit['date'] = commit['date'].strftime('%A %d %B %Y %H:%M:%S') + diffstat = repo.hg ('diff', '--change', cset, '--stat') try:
--- a/hgrepo.py Mon Jan 11 18:29:14 2016 +0200 +++ b/hgrepo.py Tue Jan 12 21:14:26 2016 +0200 @@ -80,7 +80,7 @@ data = data.split (separator) return self.merge_template (data, kvargs) except subprocess.CalledProcessError: - raise ValueError ('''couldn't find changeset %s in %s''' % (node, repo.name)) + raise ValueError ('''couldn't find changeset %s in %s''' % (rev, repo.name)) def incoming (self, maxcommits=0, **kvargs): if not kvargs: @@ -106,4 +106,4 @@ def clone (self): print ('Cloning %s from %s...' % (self.name, self.url)) - subprocess.call (['hg', 'clone', self.url, self.name]) \ No newline at end of file + subprocess.call (['hg', 'clone', self.url, self.name])