README
changeset 70 5796e44b0e17
parent 66 4129876c8b86
--- a/README	Mon Oct 04 14:14:49 2010 +0200
+++ b/README	Fri Sep 02 16:32:31 2011 +0200
@@ -26,8 +26,8 @@
 -----
 
 In the ``[extensions]`` section of your ``~/.hgrc`` add::
-    
-    artemis = /path/to/artemis.py
+
+    artemis = /path/to/Artemis/artemis
 
 Optionally, provide a section ``[artemis]``, and specify an alternative path for
 the issues subdirectory (instead of the default ``.issues``)::
@@ -35,6 +35,9 @@
     [artemis]
     issues = _issues
 
+Additionally, one can specify filters_ and output formats_.
+
+.. _formats:     Format_
 
 Example
 -------
@@ -43,7 +46,7 @@
 
     # hg iadd
     ... enter some text in an editor ...
-    Added new issue 907ab57e04502afd 
+    Added new issue 907ab57e04502afd
 
     # hg ilist
     907ab57e04502afd (  0) [new]: New issue
@@ -56,18 +59,18 @@
     State: new
 
     Detailed description.
-    
+
     ----------------------------------------------------------------------
 
 Add a comment to the issue::
-    
+
     # hg iadd 907
     ... enter the comment text
     ======================================================================
     From: ...
     [snip]
     Detailed description.
-    
+
     ----------------------------------------------------------------------
     Comments:
       1: [dmitriy] Some comment
@@ -81,7 +84,7 @@
     From: ...
     [snip]
     Detailed description.
-    
+
     ----------------------------------------------------------------------
     Comments:
       1: [dmitriy] Some comment
@@ -95,7 +98,7 @@
     From: ...
     [snip]
     Detailed description.
-    
+
     ----------------------------------------------------------------------
     Comments:
       1: [dmitriy] Some comment
@@ -122,7 +125,7 @@
     recorded as a reply to the particular message. `iadd` is the only command
     that changes the state of the repository (by adding the new issue files to
     the list of tracked files or updating some of them), however, it does not
-    perform an actual commit.
+    perform an actual commit unless explicitly asked to do so.
 
     `-p`, `--property`
         update a property of the issue ``ID``, e.g. ``-p state=resolved -p resolution=fixed``
@@ -137,6 +140,10 @@
     `-m`, `--message`
         use ``text`` as an issue subject
 
+    `-c`, `--commit`
+        commit the issue after the addition (all changes to the issue will be
+        committed)
+
 
 `ilist`
     List issues.
@@ -145,18 +152,22 @@
         list all issues (not just the `new` ones)
 
     `-p`, `--property`
-        list issues with specific property values, e.g. 
+        list issues with specific property values, e.g.
         ``-p state=resolved -p category=documentation``;
         if no property value is provided (e.g. ``-p category``), lists all
         possible values for that property (among the issues that satisfy the
         rest of the criteria)
 
+    `-o`, `--order`
+        order of the issues; choices: "new" (date submitted), "latest" (date of
+        the most recent message)
+
     `-d`, `--date`
         restrict to issues matching the given date, e.g. ``-d ">1/1/2008"``
 
     `-f`, `--filter`
         restrict to a predefined filter, see Filters_ below
-   
+
 
 `ishow` ``[ID] [COMMENT]``
     Show an issue or a comment.
@@ -191,3 +202,34 @@
 invoked with the `ilist` command::
 
     hg ilist -f olddoc
+
+
+Format
+------
+
+One can specify the output format for the `ilist` command. The default looks
+like::
+
+    [artemis]
+    format = %(id)s (%(len)3d) [%(state)s]: %(subject)s
+
+Artemis passes a dictionary with the issue properties to the format string.
+(Plus ``id`` contains the issue id, and ``len`` contains the number of replies.)
+
+It's possible to specify different output formats depending on the properties of
+the issue. The conditions are encoded in the config variable names as follows::
+
+    format:state*resolved&resolution*fixed  = %(id)s (%(len)3d) [fixed]: %(Subject)s
+    format:state*resolved                   = %(id)s (%(len)3d) [%(state)s=%(resolution)s]: %(Subject)s
+
+The first rule matches issues with the ``state`` property set to ``resolved``
+and ``resolution`` set to ``fixed``; it abridges the output. The secod rule
+matches all the ``resolved`` issues (not matched by the first rule); it annotates
+the issue's state with its ``resolution``.
+
+Finally, the dictionary passed to the format string contains a subset of
+`ANSI codes`_, so one could color the summary lines::
+
+    format:state*new = %(red)s%(bold)s%(id)s (%(len)3d) [%(state)s]: %(Subject)s%(reset)s
+
+.. _`ANSI codes`:       http://en.wikipedia.org/wiki/ANSI_escape_code