Merged + added documentation for "iadd --message" and "ishow --mutt" + marked c76 as fixed
authorDmitriy Morozov <dmitriy@mrzv.org>
Sat, 16 Jan 2010 11:42:57 -0800
changeset 49 248ec36cef5f
parent 35 2e7575352ef3 (diff)
parent 48 7897c850150f (current diff)
child 50 10fa939a4a3e
Merged + added documentation for "iadd --message" and "ishow --mutt" + marked c76 as fixed
.issues/c768d39702f1ab1b/new/1259362423.M718179P23923Q1.vlan-laptop
.issues/c768d39702f1ab1b/new/1263670850.M923950P21837Q1.vine
README
artemis.py
--- a/.issues/c768d39702f1ab1b/new/1259362423.M718179P23923Q1.vlan-laptop	Wed Dec 02 03:12:37 2009 +0300
+++ b/.issues/c768d39702f1ab1b/new/1259362423.M718179P23923Q1.vlan-laptop	Sat Jan 16 11:42:57 2010 -0800
@@ -1,9 +1,10 @@
 From: Andrey Vlasovskikh <andrey.vlasovskikh@gmail.com>
 Date: Sat, 28 Nov 2009 01:45:30
-State: accepted
+State: resolved
 Subject: Add --mutt to ilist
 Message-Id: <c768d39702f1ab1b-0-artemis@vlan-laptop>
 To: Andrey Vlasovskikh <andrey.vlasovskikh@gmail.com>
+resolution: fixed
 
 It would be nice to see a list of selected issues (e. g. via `ilist -f`) as a
 list of regular email threads in `mutt`.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.issues/c768d39702f1ab1b/new/1263670850.M923950P21837Q1.vine	Sat Jan 16 11:42:57 2010 -0800
@@ -0,0 +1,7 @@
+From: Dmitriy Morozov <dmitriy@mrzv.org>
+Date: Sat, 16 Jan 2010 11:40:50
+Subject: changed properties (state=resolved, resolution=fixed)
+Message-Id: <c768d39702f1ab1b-ae3bc4e3d26a5f36-artemis@vine>
+References: <c768d39702f1ab1b-0-artemis@vlan-laptop>
+In-Reply-To: <c768d39702f1ab1b-0-artemis@vlan-laptop>
+
--- a/.issues/d9133b0e69e403c0/new/1239134046.M751897P28808Q1.cole	Wed Dec 02 03:12:37 2009 +0300
+++ b/.issues/d9133b0e69e403c0/new/1239134046.M751897P28808Q1.cole	Sat Jan 16 11:42:57 2010 -0800
@@ -1,7 +1,8 @@
 From: Dmitriy Morozov <dmitriy@mrzv.org>
 Date: Tue, 07 Apr 2009 12:53:56
-State: new
+State: resolved
 Subject: Documentation
 Message-Id: <d9133b0e69e403c0-0-artemis@cole>
+resolution: fixed
 
 Write documentation.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.issues/d9133b0e69e403c0/new/1242855469.M834125P3274Q1.cole	Sat Jan 16 11:42:57 2010 -0800
@@ -0,0 +1,7 @@
+From: Dmitriy Morozov <dmitriy@mrzv.org>
+Date: Wed, 20 May 2009 14:37:49
+Subject: changed properties (state=resolved, resolution=fixed)
+Message-Id: <d9133b0e69e403c0-dcab00a2ae466066-artemis@cole>
+References: <d9133b0e69e403c0-0-artemis@cole>
+In-Reply-To: <d9133b0e69e403c0-0-artemis@cole>
+
--- a/README	Wed Dec 02 03:12:37 2009 +0300
+++ b/README	Sat Jan 16 11:42:57 2010 -0800
@@ -3,9 +3,10 @@
 
 Artemis is a lightweight distributed issue tracking extension for Mercurial_.
 
-Individual issues are stored in directories in an ``.issues`` subdirectory. Each
-one is a Maildir_ and each one is assumed to have a single root message.
-Various properties of an issue are stored in the headers of that message.
+Individual issues are stored in directories in an ``.issues`` subdirectory
+(overridable in a config file).  Each one is a Maildir_ and each one is assumed
+to have a single root message.  Various properties of an issue are stored in the
+headers of that message.
 
 .. _Mercurial:      http://www.selenic.com/mercurial/
 .. _Maildir:        http://en.wikipedia.org/wiki/Maildir
@@ -28,6 +29,12 @@
     
     artemis = /path/to/artemis.py
 
+Optionally, provide a section ``[artemis]``, and specify an alternative path for
+the issues subdirectory (instead of the default ``.issues``)::
+
+    [artemis]
+    issues = _issues
+
 
 Example
 -------
@@ -127,6 +134,9 @@
         do not launch an editor to record a comment (useful if only changing
         properties)
 
+    `-m`, --message`
+        use ``text`` as an issue subject
+
 
 `ilist`
     List issues.
@@ -162,6 +172,9 @@
     `-x`, `--extract`
         extract attachments (given their numbers)
 
+    `--mutt`
+        use ``mutt`` to show issue
+
 
 Filters
 -------
--- a/artemis.py	Wed Dec 02 03:12:37 2009 +0300
+++ b/artemis.py	Sat Jan 16 11:42:57 2010 -0800
@@ -17,7 +17,7 @@
 
 state = {'new': 'new', 'fixed': ['fixed', 'resolved']}
 state['default'] = state['new']
-issues_dir = ".issues"
+default_issues_dir = ".issues"
 filter_prefix = ".filter"
 date_format = '%a, %d %b %Y %H:%M:%S'
 maildir_dirs = ['new','cur','tmp']
@@ -34,6 +34,7 @@
         match_date, date_match = True, util.matchdate(opts['date'])
 
     # Find issues
+    issues_dir = ui.config('artemis', 'issues', default = default_issues_dir)
     issues_path = os.path.join(repo.root, issues_dir)
     if not os.path.exists(issues_path): return
 
@@ -91,6 +92,7 @@
     comment = int(comment)
 
     # First, make sure issues have a directory
+    issues_dir = ui.config('artemis', 'issues', default = default_issues_dir)
     issues_path = os.path.join(repo.root, issues_dir)
     if not os.path.exists(issues_path): os.mkdir(issues_path)
 
@@ -195,7 +197,8 @@
     issue, id = _find_issue(ui, repo, id)
     if not issue:
         return ui.warn('No such issue\n')
-
+    
+    issues_dir = ui.config('artemis', 'issues', default = default_issues_dir)
     _create_missing_dirs(os.path.join(repo.root, issues_dir), issue)
 
     if opts.get('mutt'):
@@ -236,6 +239,7 @@
 
 
 def _find_issue(ui, repo, id):
+    issues_dir = ui.config('artemis', 'issues', default = default_issues_dir)
     issues_path = os.path.join(repo.root, issues_dir)
     if not os.path.exists(issues_path): return False
 
@@ -401,7 +405,7 @@
                   ('p', 'property', [],
                    'list issues with specific field values (e.g., -p state=fixed); lists all possible values of a property if no = sign'),
                   ('d', 'date', '', 'restrict to issues matching the date (e.g., -d ">12/28/2007)"'),
-                  ('f', 'filter', '', 'restrict to pre-defined filter (in %s/%s*)' % (issues_dir, filter_prefix))],
+                  ('f', 'filter', '', 'restrict to pre-defined filter (in %s/%s*)' % (default_issues_dir, filter_prefix))],
                  _('hg ilist [OPTIONS]')),
     'iadd':       (iadd,
                  [('a', 'attach', [],