Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
topydo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
topydo
Commits
241aa3e9
Commit
241aa3e9
authored
Nov 22, 2014
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let ListCommand print UIDs.
parent
d7ff4f48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
test/ListCommandTest.py
test/ListCommandTest.py
+10
-0
topydo/lib/TodoListBase.py
topydo/lib/TodoListBase.py
+4
-1
No files found.
test/ListCommandTest.py
View file @
241aa3e9
...
...
@@ -145,6 +145,16 @@ class ListCommandTest(CommandTest.CommandTest):
self
.
assertEquals
(
self
.
output
,
" 2 (D) Bar @Context1 +Project2 p:1
\
n
"
)
self
.
assertEquals
(
self
.
errors
,
""
)
def
test_list16
(
self
):
config
(
"data/todolist-uid.conf"
)
command
=
ListCommand
.
ListCommand
([],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
self
.
assertFalse
(
self
.
todolist
.
is_dirty
())
self
.
assertEquals
(
self
.
output
,
"6iu (C) Foo @Context2 Not@Context +Project1 Not+Project
\
n
til (C) Drink beer @ home
\
n
c5 (C) 13 + 29 = 42
\
n
xvb (D) Bar @Context1 +Project2 p:1
\
n
"
)
self
.
assertEquals
(
self
.
errors
,
""
)
def
test_help
(
self
):
command
=
ListCommand
.
ListCommand
([
"help"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
topydo/lib/TodoListBase.py
View file @
241aa3e9
...
...
@@ -200,7 +200,10 @@ class TodoListBase(object):
A filter for the pretty printer to append the todo number to the
printed todo.
"""
return lambda p_todo_str, p_todo: "%3d %s" % (self.number(p_todo), p_todo_str)
if config().identifiers() == '
text
':
return lambda p_todo_str, p_todo: "%3s %s" % (self._todo_id_map[p_todo], p_todo_str)
else:
return lambda p_todo_str, p_todo: "%3d %s" % (self.number(p_todo), p_todo_str)
def _update_todo_ids(self):
# the idea is to have a hash that is independent of the position of the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment