Download:
child 3:e30c88afe8aa
parent 1:ca3e20296065
2:02c80a0ce839 draft
Anton Shestakov <av6@dwimlabs.net>, Sun, 12 Nov 2017 14:23:59 +0800
level0lify: if new version is 1, then there's no old version

1 файлов изменено, 4 вставок(+), 1 удалений(-) [+]
diff.py file | annotate | diff | comparison | revisions
--- a/diff.py Sun Nov 12 14:22:27 2017 +0800
+++ b/diff.py Sun Nov 12 14:23:59 2017 +0800
@@ -100,7 +100,10 @@
versions = items[kind][id]
old = min(versions)
new = max(versions)
- for lines, version in ((a, old), (b, new)):
+ todo = [(b, new)]
+ if new > 1:
+ todo.insert(0, (a, old))
+ for lines, version in todo:
lines.append('')
lines.append('{} {}'.format(kind, id))
lines += [