# HG changeset patch # User Dmitriy Morozov # Date 1263405148 28800 # Node ID 2e7575352ef34a585a22bfae781ac8bc69d5d936 # Parent 714f9414b0093d3acb73a38e9a282e4256bbed3e Added configuration option to provide an alternative path for the issues directory diff -r 714f9414b009 -r 2e7575352ef3 .issues/d9133b0e69e403c0/new/1239134046.M751897P28808Q1.cole --- a/.issues/d9133b0e69e403c0/new/1239134046.M751897P28808Q1.cole Sat Apr 11 15:44:02 2009 -0700 +++ b/.issues/d9133b0e69e403c0/new/1239134046.M751897P28808Q1.cole Wed Jan 13 09:52:28 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 714f9414b009 -r 2e7575352ef3 .issues/d9133b0e69e403c0/new/1242855469.M834125P3274Q1.cole --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.issues/d9133b0e69e403c0/new/1242855469.M834125P3274Q1.cole Wed Jan 13 09:52:28 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 714f9414b009 -r 2e7575352ef3 README --- a/README Sat Apr 11 15:44:02 2009 -0700 +++ b/README Wed Jan 13 09:52:28 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 ------- diff -r 714f9414b009 -r 2e7575352ef3 artemis.py --- a/artemis.py Sat Apr 11 15:44:02 2009 -0700 +++ b/artemis.py Wed Jan 13 09:52:28 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) @@ -187,6 +189,7 @@ issue, id = _find_issue(ui, repo, id) if not issue: return + issues_dir = ui.config('artemis', 'issues', default = default_issues_dir) _create_missing_dirs(os.path.join(repo.root, issues_dir), issue) mbox = mailbox.Maildir(issue, factory=mailbox.MaildirMessage) @@ -224,6 +227,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 @@ -389,7 +393,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', [],