summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Jones <richard@mechanicalcat.net>2013-01-14 16:01:56 +1100
committerRichard Jones <richard@mechanicalcat.net>2013-01-14 16:01:56 +1100
commitd5c6d77992f0157ac7eb45ba40ae236cc4a3f350 (patch)
treecc5341bd59496a5266485aad7d8ed6c0baffb3b3
parentb76e48b5c95957755dfdf11ae8369b589038df5a (diff)
downloaddecorator-d5c6d77992f0157ac7eb45ba40ae236cc4a3f350.tar.gz
add option to include ids in the changelog
-rw-r--r--rpc.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/rpc.py b/rpc.py
index ed4f0b4..41d5462 100644
--- a/rpc.py
+++ b/rpc.py
@@ -151,9 +151,15 @@ def updated_releases(store, since):
result = store.updated_releases(since)
return [(row['name'], row['version']) for row in result]
-def changelog(store, since):
+def changelog(store, since, with_ids=False):
result = store.changelog(since)
- return [(row['name'],row['version'],
+ if ids:
+ return [(row['name'],row['version'],
+ int(time.mktime(row['submitted_date'].timetuple())),
+ row['action'], row['id'])
+ for row in result]
+ else:
+ return [(row['name'],row['version'],
int(time.mktime(row['submitted_date'].timetuple())),
row['action'])
for row in result]