Compare commits

...

6 commits

6 changed files with 91 additions and 2 deletions

View file

@ -1 +1 @@
inprogress
done

View file

@ -0,0 +1,13 @@
add `ent tag ISSUE_ID TAG`
Tags are short text strings without white space.
The Issue directory will gain a file named `tags`, containing the sorted
list of tags.
The `ent list` output will add a bit to the end of each issue displayed,
something like "[tag1, tag2]", or nothing if the issue has no tags
(like how we don't show assignee if there is none).
As part of this issue, the `ent list FILTER` will gain a new filter
chunk type like "tags=v2.31,ux-papercut".

View file

@ -0,0 +1,2 @@
I think this will be easy. We'll teach `ent edit ID` to search not only
issue IDs but also comment IDs, then reuse the existing edit code.

View file

@ -1 +1 @@
inprogress
done

View file

@ -0,0 +1,38 @@
# `ent list FILTER` filter format
I'm not sure about the filter format, but here are some notes...
There are (as of df7b5c6aa4a00dfca66dc802f1e813f23f27a5b9) two independent
filters: "state" and "assignee". The "state" filter defaults to
including issues whose state is InProgress, Blocked, Backlog, or New.
The "assignee" filter defaults to including all issues, assigned or not.
The two filters can be independently overridden by the `ent list
FILTER` command. FILTER is a string containing "chunks" separated by
":", like the PATH environment variable. Each chunk is of the form
"name=value[,value...]". "name" can currently be either "state" or
"assignee", and we can add more in the future (e.g "tag" or "ctime").
The "value" arguments to the "state" filter must be one of the valid
states, or it's a parse error.
The "value" arguments to the "assignee" filter are used to
string-compare against the issues "assignee" field, exact matches are
accepted and everything else is rejected. A special assignee filter of
the empty string matches issues that don't have an assignee.
Some examples:
* `ent list` shows issues in the states listed above, and don't filter
based on assignee at all.
* `ent list assignee=seb` shows issues in the states listed above,
but only if the assignee is "seb".
* `ent list assignee=seb,` shows issues in the states listed above,
but only if the assignee is "seb" or if there is no assignee.
* `ent list state=done` shows all issues in the Done state.
* `ent list state=inprogress:assignee=seb` shows issues in the InProgress
state that are assigned to "seb".

View file

@ -0,0 +1,36 @@
One possible way to determine how much of the UUID we need to keep
for uniqueness:
* Read the issue database into memory
* Build a tree of all the issue ids:
* Define a Node type for a tree datastructure as:
enum Node {
Empty,
IssueId(String),
SubNodes([&Node; 256]),
}
* Create an empty root node = Node::Empty
* For each issue:
issue_id_bytes = issue_id.iter()
issue_id_byte = issue_id_bytes.next()
current_node = root
while current_node == SubNodes:
current_node = current_node[issue_id_byte]
issue_id_byte = issue_id_bytes.next()
if current_node == Empty:
current_node = Node::IssueId(issue_id)
else: # we know current_node == IssueId(original_issue_id)
replace current_node with a SubNodes initialized to [Node::Empty; 256]
current_node[original_issue_id[depth]] = Node::IssueId(original_issue_id)
recurse trying again to insert issue_id
* Walk the entire tree, keeping track of the depth of each IssueId node (ie the number of SubNodes nodes above it)
* The largest depth is the number of bytes of the issue ids neede to ensure uniqueness