# HG changeset patch # User Dmitriy Morozov # Date 1263670977 28800 # Node ID 248ec36cef5f220dfc07dfcfbdf817eff6620f36 # Parent 2e7575352ef34a585a22bfae781ac8bc69d5d936# Parent 7897c850150f35fc4699d84429e4a332421c6402 Merged + added documentation for "iadd --message" and "ishow --mutt" + marked c76 as fixed diff -r 7897c850150f -r 248ec36cef5f .issues/c768d39702f1ab1b/new/1259362423.M718179P23923Q1.vlan-laptop --- 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 Date: Sat, 28 Nov 2009 01:45:30 -State: accepted +State: resolved Subject: Add --mutt to ilist Message-Id: To: Andrey Vlasovskikh +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`. diff -r 7897c850150f -r 248ec36cef5f .issues/c768d39702f1ab1b/new/1263670850.M923950P21837Q1.vine --- /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 +Date: Sat, 16 Jan 2010 11:40:50 +Subject: changed properties (state=resolved, resolution=fixed) +Message-Id: +References: +In-Reply-To: + diff -r 7897c850150f -r 248ec36cef5f .issues/d9133b0e69e403c0/new/1239134046.M751897P28808Q1.cole --- 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 Date: Tue, 07 Apr 2009 12:53:56 -State: new +State: resolved Subject: Documentation Message-Id: +resolution: fixed Write documentation. diff -r 7897c850150f -r 248ec36cef5f .issues/d9133b0e69e403c0/new/1242855469.M834125P3274Q1.cole --- /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 +Date: Wed, 20 May 2009 14:37:49 +Subject: changed properties (state=resolved, resolution=fixed) +Message-Id: +References: +In-Reply-To: + diff -r 7897c850150f -r 248ec36cef5f README --- 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 ------- diff -r 7897c850150f -r 248ec36cef5f artemis.py --- 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', [],