Remove extra padding in task files to aid in merging.
author |
Steve Losh <steve@dwaiter.com> |
date |
Sun, 03 Oct 2010 18:47:03 -0400 |
parents |
e48c6cafa0de
|
children |
70a8dbc508e2
|
branches/tags |
v1.1.0 |
files |
t.py tests/finished.t tests/padding.t |
Changes
--- a/t.py Sun Oct 03 18:45:43 2010 -0400
+++ b/t.py Sun Oct 03 18:47:03 2010 -0400
@@ -66,12 +66,11 @@
"""Parse a list of tasks into tasklines suitable for writing."""
tasklines = []
- tlen = max(map(lambda t: len(t['text']), tasks)) if tasks else 0
for task in tasks:
meta = [m for m in task.items() if m[0] != 'text']
meta_str = ', '.join('%s:%s' % m for m in meta)
- tasklines.append('%s | %s\n' % (task['text'].ljust(tlen), meta_str))
+ tasklines.append('%s | %s\n' % (task['text'], meta_str))
return tasklines
--- a/tests/finished.t Sun Oct 03 18:45:43 2010 -0400
+++ b/tests/finished.t Sun Oct 03 18:47:03 2010 -0400
@@ -17,16 +17,16 @@
$ xt -f 7
$ cat .test.done
Sample four. | id:1dd56b09a9ca0fdf4f2a8c0959a298098eb8f7de
- Sample two. | id:7a4dc18c23f3b890602da09da1690ccfb4c87bd1
+ Sample two. | id:7a4dc18c23f3b890602da09da1690ccfb4c87bd1
$ xt -f 3
$ cat .test.done
Sample four. | id:1dd56b09a9ca0fdf4f2a8c0959a298098eb8f7de
- Sample one. | id:329950673481cb1c19102c982bfc63e745ab4a6f
- Sample two. | id:7a4dc18c23f3b890602da09da1690ccfb4c87bd1
+ Sample one. | id:329950673481cb1c19102c982bfc63e745ab4a6f
+ Sample two. | id:7a4dc18c23f3b890602da09da1690ccfb4c87bd1
$ xt -f 9
$ cat .test.done
- Sample four. | id:1dd56b09a9ca0fdf4f2a8c0959a298098eb8f7de
- Sample one. | id:329950673481cb1c19102c982bfc63e745ab4a6f
- Sample two. | id:7a4dc18c23f3b890602da09da1690ccfb4c87bd1
+ Sample four. | id:1dd56b09a9ca0fdf4f2a8c0959a298098eb8f7de
+ Sample one. | id:329950673481cb1c19102c982bfc63e745ab4a6f
+ Sample two. | id:7a4dc18c23f3b890602da09da1690ccfb4c87bd1
Sample three. | id:90cf0626ca134e0aa6453b3562dc1c8bb34f1568
--- a/tests/padding.t Sun Oct 03 18:45:43 2010 -0400
+++ b/tests/padding.t Sun Oct 03 18:47:03 2010 -0400
@@ -14,7 +14,7 @@
5 - Short.
$ cat test
Longcat is long. | id:4c623ab4df5cc1a10d32558768c2c21bddf2c053
- Short. | id:5a7a65db2caa6313a70ceb75b1bd806f7879f6b7
+ Short. | id:5a7a65db2caa6313a70ceb75b1bd806f7879f6b7
$ cat >> test << EOF
> Long one. | id: long1
> Very long two. | id: long2
@@ -26,5 +26,5 @@
long2 - Very long two.
$ cat test
Longcat is long. | id:4c623ab4df5cc1a10d32558768c2c21bddf2c053
- Long one. | id:long1
- Very long two. | id:long2
+ Long one. | id:long1
+ Very long two. | id:long2