From matt at tplus1.com Sat Nov 1 13:47:18 2008 From: matt at tplus1.com (Matthew Wilson) Date: Sat, 1 Nov 2008 13:47:18 -0400 Subject: [ditz-talk] Does ditz need some kind of relational DB or searching / indexing engine? In-Reply-To: <490A3BB7.5000808@thewordnerd.info> References: <490A3BB7.5000808@thewordnerd.info> Message-ID: On Thu, Oct 30, 2008 at 6:56 PM, Nolan Darilek wrote: > This actually dovetails with a thought I've been having recently: RESTful > Ditz. Instead of a bunch of commands, make the structure more REST-like. So > you'd have "ditz issue add", "ditz release drop," etc. Then alias a few > shortcuts, so "ditz add" and drop would reference issues, thus making the > common case more quick. This would likely make it easy to spot gaps in > command coverage, like the missing command to drop a release for instance. I don't want to come off like an ass, but I find that people are using the term REST in so many different contexts that I have no idea what anyone means any more when they use it. If I understand you right, you want to define a set of verbs, like {list, search, add, drop, edit} and then for that set of verbs, be able to apply to them to elements in this set {project, component, release, issue}. I think of this as sort of like an imperative command in English, where the sentence has a subject, a verb, and a direct object. The subject is the ditz system, and it is implicit, just like in the English sentence "take out the trash!" where you is the subject. The system would figure out what to do by the combination of both the verb and direct object. So, the tuple (verb=wash, direct object=dog) would require different actions than (verb=wash, direct object=dishes). Then later we can support adverbs, like this: (verb=edit, direct object=issue-123123, adverb=vim) which would mean to use vim to edit that issue. (verb=show, direct object=issue-123123, adverb=browser) and that would mean to display the purty HTML rendering of that issue. Is that (vaguely) what you mean? Matt PS: I would write code instead of just chit-chatting so much if I was more fluent in ruby. I'm working on it! -- Matthew Wilson matt at tplus1.com http://tplus1.com From wmorgan-ditz at masanjin.net Sat Nov 1 16:30:40 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Sat, 01 Nov 2008 13:30:40 -0700 Subject: [ditz-talk] ditz -h should mention ditz help In-Reply-To: References: Message-ID: <1225571422-sup-7614@entry> Reformatted excerpts from Martin DeMello's message of 2008-10-29: > ditz should either have a ditz --commands that does the same thing as > ditz help, or ditz --help should mention ditz help; as it stands, man > ditz is empty, and there's no indication that ditz --help isn't all > the help there is. Fixed in #fe1efd11. -- William From wmorgan-ditz at masanjin.net Sun Nov 2 13:44:51 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Sun, 02 Nov 2008 10:44:51 -0800 Subject: [ditz-talk] Does ditz need some kind of relational DB or searching / indexing engine? In-Reply-To: References: Message-ID: <1225650712-sup-6745@entry> Reformatted excerpts from Matthew Wilson's message of 2008-10-30: > I've been using ditz for about a month now, and I have big pile of > ditz issues. Now I want to search through them and organize them, and > I feel like I'm writing SQL queries except with long chains of greps > and pipes. Aka, you can an expressive, succinct, procedural language to query your issues, instead of a stunted, 1970's, declarative one. :) > Another example is that I decided to rename a release from 3.5.1 to > "long-run". Since all the issues use the release-name in their own > issue file, all the issues that were assigned to 3.5.1 were now > orphaned. This is a real problem. I've created issue f7abe2e7. > Also, I think it might be nice to use something like UUID to make > unique identifiers for each issue, release, component, etc, and then > use those IDs for references between them. Precisely. We have that now for issues, just not for the other things. > Or if sqlite is no bueno, what about using one of those newfangled > document databases like couchdb for storing issues? The grander problem is that ditz is designed to work with projects with distributed development. That means that if you clone my project, go off for five months to the Himalayas, change a bunch of stuff, and then come back, I need a good way of merging in all your issue changes as well as your code changes. We get that "for free" by keeping issue state in text files; merging RDBMSs is going to be a lot of work. Now I wouldn't be unhappy if Ditz became the preferred alternative to Trac and JIRA, and people mostly used it in the standard centralized way. But at least at this point, what makes Ditz special and different is the distributed aspect. In other words, if someone gave me a patch to allow Ditz to optionally use an SQL database as the backend, I wouldn't throw it away. But it's not the main line of development that I personally will be pursuing. -- William From daniel at kalor.dk Mon Nov 3 06:18:58 2008 From: daniel at kalor.dk (=?ISO-8859-1?Q?Daniel_Kal=F8r?=) Date: Mon, 3 Nov 2008 12:18:58 +0100 Subject: [ditz-talk] [PATCH] fix incorrect unicode output on default prompt Message-ID: <4d314a630811030318o459bfb76x306f3d216f941319@mail.gmail.com> With .inspect it makes my name look like "Daniel Kal\303\270r" when prompting for issue creator. --- lib/ditz/lowline.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/ditz/lowline.rb b/lib/ditz/lowline.rb index 0e332b0..ff7b752 100644 --- a/lib/ditz/lowline.rb +++ b/lib/ditz/lowline.rb @@ -86,7 +86,7 @@ module Lowline default_s = case opts[:default] when nil; nil when ""; " (enter for none)" - else; " (enter for #{opts[:default].inspect})" + else; " (enter for #{opts[:default].to_s})" end tail = case q -- 1.6.0.3 From daniel at kalor.dk Tue Nov 4 05:58:33 2008 From: daniel at kalor.dk (=?ISO-8859-1?Q?Daniel_Kal=F8r?=) Date: Tue, 4 Nov 2008 11:58:33 +0100 Subject: [ditz-talk] [PATCH] Better issue_dir possibility order Message-ID: <4d314a630811040258o11c6a4afpe4fa4db64d63b069@mail.gmail.com> When something is used as default for the --issue-dir option, it overrides the configured issue_dir. --- bin/ditz | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/ditz b/bin/ditz index 886a8fd..cfb6dc5 100755 --- a/bin/ditz +++ b/bin/ditz @@ -39,7 +39,7 @@ See 'ditz help' for a list of commands. Global options are: EOS - opt :issue_dir, "Issue database dir", :default => ".ditz" + opt :issue_dir, "Issue database dir", :type => String opt :config_file, "Configuration file", :default => File.join(config_dir || ".", CONFIG_FN) opt :plugins_file, "Plugins file", :default => File.join(plugin_dir || ".", PLUGIN_FN) opt :verbose, "Verbose output", :default => false @@ -115,7 +115,7 @@ end ## configure any lowline settings Lowline.use_editor_if_possible = config.use_editor_if_possible -issue_dir = Pathname.new($opts[:issue_dir] || config.issue_dir) +issue_dir = Pathname.new($opts[:issue_dir] || config.issue_dir || ".ditz") cmd = ARGV.shift || "todo" unless op.has_operation? cmd die "no such command: #{cmd}" -- 1.6.0.3 From daniel at kalor.dk Tue Nov 4 06:41:16 2008 From: daniel at kalor.dk (=?utf-8?q?Daniel=20Kal=C3=B8r?=) Date: Tue, 4 Nov 2008 12:41:16 +0100 Subject: [ditz-talk] [PATCH] Better issue_dir possibility order In-Reply-To: <4d314a630811040258o11c6a4afpe4fa4db64d63b069@mail.gmail.com> References: <4d314a630811040258o11c6a4afpe4fa4db64d63b069@mail.gmail.com> Message-ID: <1225798876-21745-1-git-send-email-daniel@kalor.dk> When something is used as default for the --issue-dir option, it overrides the configured issue_dir. --- bin/ditz | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/ditz b/bin/ditz index 886a8fd..cfb6dc5 100755 --- a/bin/ditz +++ b/bin/ditz @@ -39,7 +39,7 @@ See 'ditz help' for a list of commands. Global options are: EOS - opt :issue_dir, "Issue database dir", :default => ".ditz" + opt :issue_dir, "Issue database dir", :type => String opt :config_file, "Configuration file", :default => File.join(config_dir || ".", CONFIG_FN) opt :plugins_file, "Plugins file", :default => File.join(plugin_dir || ".", PLUGIN_FN) opt :verbose, "Verbose output", :default => false @@ -115,7 +115,7 @@ end ## configure any lowline settings Lowline.use_editor_if_possible = config.use_editor_if_possible -issue_dir = Pathname.new($opts[:issue_dir] || config.issue_dir) +issue_dir = Pathname.new($opts[:issue_dir] || config.issue_dir || ".ditz") cmd = ARGV.shift || "todo" unless op.has_operation? cmd die "no such command: #{cmd}" -- 1.6.0.3 From daniel at kalor.dk Tue Nov 4 06:29:03 2008 From: daniel at kalor.dk (=?ISO-8859-1?Q?Daniel_Kal=F8r?=) Date: Tue, 04 Nov 2008 12:29:03 +0100 Subject: [ditz-talk] [PATCH] Better issue_dir possibility order Message-ID: <20081105112610.5D331FC001@mail.kampsax.dtu.dk> When something is used as default for the --issue-dir option, it overrides the configured issue_dir. --- bin/ditz | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/ditz b/bin/ditz index 886a8fd..cfb6dc5 100755 --- a/bin/ditz +++ b/bin/ditz @@ -39,7 +39,7 @@ See 'ditz help' for a list of commands. Global options are: EOS - opt :issue_dir, "Issue database dir", :default => ".ditz" + opt :issue_dir, "Issue database dir", :type => String opt :config_file, "Configuration file", :default => File.join(config_dir || ".", CONFIG_FN) opt :plugins_file, "Plugins file", :default => File.join(plugin_dir || ".", PLUGIN_FN) opt :verbose, "Verbose output", :default => false @@ -115,7 +115,7 @@ end ## configure any lowline settings Lowline.use_editor_if_possible = config.use_editor_if_possible -issue_dir = Pathname.new($opts[:issue_dir] || config.issue_dir) +issue_dir = Pathname.new($opts[:issue_dir] || config.issue_dir || ".ditz") cmd = ARGV.shift || "todo" unless op.has_operation? cmd die "no such command: #{cmd}" -- 1.6.0.3 From daniel at kalor.dk Wed Nov 5 03:28:08 2008 From: daniel at kalor.dk (=?utf-8?q?Daniel=20Kal=C3=B8r?=) Date: Wed, 5 Nov 2008 09:28:08 +0100 Subject: [ditz-talk] [PATCH] Don't ignore don't-page-when-short when LESS env var is set Message-ID: <1225873688-25488-1-git-send-email-daniel@kalor.dk> --- lib/ditz.rb | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/lib/ditz.rb b/lib/ditz.rb index 8c17ed3..7227447 100644 --- a/lib/ditz.rb +++ b/lib/ditz.rb @@ -86,8 +86,7 @@ def run_pager read.close write.close - ENV['LESS'] ||= 'FSRX' # Don't page if the input is short enough, unless - # the user already have a LESS variable. + ENV['LESS'] += ' FSRX' # Don't page if the input is short enough Kernel.select [STDIN] # Wait until we have input before we start the pager pager = ENV['PAGER'] || 'less' -- 1.6.0.3 From daniel at kalor.dk Wed Nov 5 03:30:29 2008 From: daniel at kalor.dk (=?utf-8?q?Daniel=20Kal=C3=B8r?=) Date: Wed, 5 Nov 2008 09:30:29 +0100 Subject: [ditz-talk] [PATCH] Exit cleanly when interrupting config creation, init or reconfigure Message-ID: <1225873829-25606-1-git-send-email-daniel@kalor.dk> --- bin/ditz | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git a/bin/ditz b/bin/ditz index 886a8fd..2a37dc5 100755 --- a/bin/ditz +++ b/bin/ditz @@ -108,7 +108,12 @@ rescue SystemCallError => e I wasn't able to find a configuration file #{$opts[:config_file]}. We'll set it up right now. EOS - Ditz::Config.create_interactively.save! $opts[:config_file] + begin + Ditz::Config.create_interactively.save! $opts[:config_file] + rescue Interrupt + puts + exit 1 + end end end @@ -126,12 +131,23 @@ when "init" die "#{issue_dir} directory already exists" if issue_dir.exist? issue_dir.mkdir fn = issue_dir + Ditz::FileStorage::PROJECT_FN - project = op.init + begin + project = op.init + rescue Interrupt + issue_dir.rmdir + puts + exit 1 + end project.save! fn puts "Ok, #{issue_dir} directory created successfully." exit when "reconfigure" # might not be able to load the project - op.do cmd, nil, config, ARGV + begin + op.do cmd, nil, config, ARGV + rescue Interrupt + puts + exit 1 + end exit when "help" op.do cmd, nil, nil, ARGV -- 1.6.0.3 From nicolas.pouillard at gmail.com Wed Nov 5 08:02:16 2008 From: nicolas.pouillard at gmail.com (Nicolas Pouillard) Date: Wed, 05 Nov 2008 14:02:16 +0100 Subject: [ditz-talk] [PATCH] Don't ignore don't-page-when-short when LESS env var is set In-Reply-To: <1225873688-25488-1-git-send-email-daniel@kalor.dk> References: <1225873688-25488-1-git-send-email-daniel@kalor.dk> Message-ID: <1225889996-sup-3083@ausone.inria.fr> I do not agree with that patch, if I know less options I like, I don't want them to be changed by programs I use. However I understand the needs, so maybe a better solution exists. Best regards, Excerpts from Daniel Kal?r's message of Wed Nov 05 09:28:08 +0100 2008: > --- > lib/ditz.rb | 3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/lib/ditz.rb b/lib/ditz.rb > index 8c17ed3..7227447 100644 > --- a/lib/ditz.rb > +++ b/lib/ditz.rb > @@ -86,8 +86,7 @@ def run_pager > read.close > write.close > > - ENV['LESS'] ||= 'FSRX' # Don't page if the input is short enough, unless > - # the user already have a LESS variable. > + ENV['LESS'] += ' FSRX' # Don't page if the input is short enough > > Kernel.select [STDIN] # Wait until we have input before we start the pager > pager = ENV['PAGER'] || 'less' -- Nicolas Pouillard aka Ertai From daniel at kalor.dk Wed Nov 5 08:15:11 2008 From: daniel at kalor.dk (=?ISO-8859-1?Q?Daniel_Kal=F8r?=) Date: Wed, 5 Nov 2008 14:15:11 +0100 Subject: [ditz-talk] [PATCH] Don't ignore don't-page-when-short when LESS env var is set In-Reply-To: <1225889996-sup-3083@ausone.inria.fr> References: <1225873688-25488-1-git-send-email-daniel@kalor.dk> <1225889996-sup-3083@ausone.inria.fr> Message-ID: <4d314a630811050515v2647e8a7w4fc2e1e11be4546d@mail.gmail.com> On Wed, Nov 5, 2008 at 14:02, Nicolas Pouillard wrote: > I do not agree with that patch, if I know less options I like, I don't want > them to be changed by programs I use. However I understand the needs, so > maybe a better solution exists. Perhaps. I was just trying out the dev version of ditz and found it strange that it was paging even with very short output, when I discovered that Gentoo was apparently setting LESS by default. Maybe http://ditz.rubyforge.org/ditz/issue-50c68d6ebd81149d12fc44e311792a3418f2e687.html is relevant. /Daniel Kal?r (Xnybre) From nicolas.pouillard at gmail.com Wed Nov 5 09:31:54 2008 From: nicolas.pouillard at gmail.com (Nicolas Pouillard) Date: Wed, 05 Nov 2008 15:31:54 +0100 Subject: [ditz-talk] [PATCH] Don't ignore don't-page-when-short when LESS env var is set In-Reply-To: <4d314a630811050515v2647e8a7w4fc2e1e11be4546d@mail.gmail.com> References: <1225873688-25488-1-git-send-email-daniel@kalor.dk> <1225889996-sup-3083@ausone.inria.fr> <4d314a630811050515v2647e8a7w4fc2e1e11be4546d@mail.gmail.com> Message-ID: <1225895432-sup-1952@ausone.inria.fr> Excerpts from Daniel Kal?r's message of Wed Nov 05 14:15:11 +0100 2008: > On Wed, Nov 5, 2008 at 14:02, Nicolas Pouillard > wrote: > > I do not agree with that patch, if I know less options I like, I don't want > > them to be changed by programs I use. However I understand the needs, so > > maybe a better solution exists. > > Perhaps. I was just trying out the dev version of ditz and found it > strange that it was paging even with very short output, when I > discovered that Gentoo was apparently setting LESS by default. > > Maybe http://ditz.rubyforge.org/ditz/issue-50c68d6ebd81149d12fc44e311792a3418f2e687.html > is relevant. Yes maybe adding an option turned to (never) by default and letting the "LESS" env var support as-is will be sufficient. -- Nicolas Pouillard aka Ertai From wmorgan-ditz at masanjin.net Wed Nov 5 23:04:50 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Wed, 05 Nov 2008 20:04:50 -0800 Subject: [ditz-talk] better sheila Message-ID: <1225944192-sup-3527@entry> Check out the better sheila. I'm not entirely happy with the colors, but it's getting there. http://masanjin.net:9000. I've also added it to the ditz project directly, so I won't be updating my sheila repo any more. -- William From wmorgan-ditz at masanjin.net Wed Nov 5 22:48:58 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Wed, 05 Nov 2008 19:48:58 -0800 Subject: [ditz-talk] [PATCH] fix incorrect unicode output on default prompt In-Reply-To: <4d314a630811030318o459bfb76x306f3d216f941319@mail.gmail.com> References: <4d314a630811030318o459bfb76x306f3d216f941319@mail.gmail.com> Message-ID: <1225943331-sup-4218@entry> Reformatted excerpts from Daniel Kal?r's message of 2008-11-03: > With .inspect it makes my name look like "Daniel Kal\303\270r" when > prompting for issue creator. Applied, thanks! -- William From daniel at kalor.dk Wed Nov 5 23:20:51 2008 From: daniel at kalor.dk (=?ISO-8859-1?Q?Daniel_Kal=F8r?=) Date: Thu, 6 Nov 2008 05:20:51 +0100 Subject: [ditz-talk] [PATCH] Don't ignore don't-page-when-short when LESS env var is set In-Reply-To: <4d314a630811050515v2647e8a7w4fc2e1e11be4546d@mail.gmail.com> References: <1225873688-25488-1-git-send-email-daniel@kalor.dk> <1225889996-sup-3083@ausone.inria.fr> <4d314a630811050515v2647e8a7w4fc2e1e11be4546d@mail.gmail.com> Message-ID: <4d314a630811052020s59125115td4f8b5431065915e@mail.gmail.com> Meh. The patch doesn't work properly anyway. /Daniel Kal?r (Xnybre) From daniel at kalor.dk Wed Nov 5 23:42:02 2008 From: daniel at kalor.dk (=?utf-8?q?Daniel=20Kal=C3=B8r?=) Date: Thu, 6 Nov 2008 05:42:02 +0100 Subject: [ditz-talk] [PATCH] Add configuration setting for controlling pager invocation Message-ID: <1225946522-21413-1-git-send-email-daniel@kalor.dk> Only mess with LESS env var when config is set to 'auto', and don't ignore previous LESS settings. Ditz-issue: 50c68d6ebd81149d12fc44e311792a3418f2e687 --- bin/ditz | 2 +- lib/ditz.rb | 9 ++++++--- lib/ditz/model-objects.rb | 6 ++++++ lib/ditz/operator.rb | 16 ++++++++-------- lib/ditz/views.rb | 2 +- 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/bin/ditz b/bin/ditz index 886a8fd..a0b9f80 100755 --- a/bin/ditz +++ b/bin/ditz @@ -134,7 +134,7 @@ when "reconfigure" # might not be able to load the project op.do cmd, nil, config, ARGV exit when "help" - op.do cmd, nil, nil, ARGV + op.do cmd, nil, config, ARGV exit end diff --git a/lib/ditz.rb b/lib/ditz.rb index 8c17ed3..6d686f2 100644 --- a/lib/ditz.rb +++ b/lib/ditz.rb @@ -67,9 +67,10 @@ end # Git-style automatic pagination of all output. # Call run_pa ger from any opperator needing pagination. # Yoinked from http://nex-3.com/posts/73-git-style-automatic-paging-in-ruby#comments -def run_pager +def run_pager config return if PLATFORM =~ /win32/ return unless STDOUT.tty? + return if config.paginate == 'never' read, write = IO.pipe @@ -86,8 +87,10 @@ def run_pager read.close write.close - ENV['LESS'] ||= 'FSRX' # Don't page if the input is short enough, unless - # the user already have a LESS variable. + if config.paginate == 'auto' + ENV['LESS'] = '' unless ENV['LESS'] # += doesn't work on undefined var + ENV['LESS'] += ' FSRX' # Don't page if the input is short enough + end Kernel.select [STDIN] # Wait until we have input before we start the pager pager = ENV['PAGER'] || 'less' diff --git a/lib/ditz/model-objects.rb b/lib/ditz/model-objects.rb index ffec6db..7b3298d 100644 --- a/lib/ditz/model-objects.rb +++ b/lib/ditz/model-objects.rb @@ -332,6 +332,7 @@ class Config < ModelObject field :email, :prompt => "Your email address", :default_generator => :get_default_email field :issue_dir, :prompt => "Directory to store issues state in", :default => ".ditz" field :use_editor_if_possible, :interactive_generator => :get_use_editor + field :paginate, :interactive_generator => :get_paginate def user; "#{name} <#{email}>" end @@ -339,6 +340,11 @@ class Config < ModelObject self.use_editor_if_possible = true if self.use_editor_if_possible.nil? end + def get_paginate + page = ask "Paginate output (always/never/auto)?", :restrict => /^(always|never|auto)$/i + page.downcase + end + def get_use_editor yon = ask "Use your text editor for multi-line input when possible (y/n)?", :restrict => /^(y|yes|n|no)$/i yon =~ /y/ ? true : false diff --git a/lib/ditz/operator.rb b/lib/ditz/operator.rb index 0a45867..ff7d466 100644 --- a/lib/ditz/operator.rb +++ b/lib/ditz/operator.rb @@ -136,7 +136,7 @@ class Operator puts "All is well with the world now. A bit more methane though." return end - run_pager + run_pager config return help_single(command) if command puts < Hi, Not sure whether these are better as email patches for discussion, or merge requests (from f3423e0 on thomasns-clone) on Gitorious? This patch supports a list of devs with nicknames in project.yaml and extends ditz claim to take an optional dev param. This allows one person (perhaps during a daily standup) to assign issues to anyone in the devs list: ditz claim abcd oprah The 'claimer' field in the issue-abcd*.yaml file is set to Oprah's full email from a project.yaml setting. You can see from the log who actually did the 'claim' operation. TODO: * extend `ditz mine` to take an optional dev param too * allow setting of project.devs hash with ditz init/reconfigure WDYT? Is this a change that's useful to others? BTW I'm a bit nervous of continuing with the current implementation of 'mine' since it depends AFAICT on a string comparison of the human-readable email address. Would it be better to store the nickname in the issue-*.yaml 'claimer:' field, instead of the expanded email address, so that emails can change without breaking the output of 'mine'? -- Thomas diff --git a/lib/ditz/plugins/issue-claiming.rb b/lib/ditz/plugins/issue-claiming.rb index d5240a1..e934e73 100644 --- a/lib/ditz/plugins/issue-claiming.rb +++ b/lib/ditz/plugins/issue-claiming.rb @@ -6,7 +6,7 @@ ## you're working on. ## ## Commands added: -## ditz claim: claim an issue for yourself +## ditz claim: claim an issue for yourself or a dev specified in project.yaml ## ditz unclaim: unclaim a claimed issue ## ditz mine: show all issues claimed by you ## ditz claimed: show all claimed issues, by developer @@ -15,9 +15,20 @@ ## Usage: ## 1. add a line "- issue-claiming" to the .ditz-plugins file in the project ## root -## 2. use the above commands to abandon +## 2. (optional:) add a 'devs' key to project.yaml, e.g: +## devs: +## :roy: Roy Baty +## :pris: Pris Stratton + +## 3. use the above commands to abandon module Ditz + +class Project + field :devs, :prompt => "Hash of developer nicknames (as symbols) to email addresses", + :default => {:roy => "Roy Baty "} +end + class Issue field :claimer, :ask => false @@ -33,7 +44,7 @@ class Issue if claimer == who log "issue unclaimed", who, comment else - log "unassigned from #{claimer}", who, comment + log "unclaimed from #{claimer}", who, comment end self.claimer = nil end @@ -88,14 +99,19 @@ class Operator end end - operation :claim, "Claim an issue for yourself", :issue do + operation :claim, "Claim an issue for yourself", :issue, :maybe_dev do opt :force, "Claim this issue even if someone else has claimed it", :default => false end - def claim project, config, opts, issue - puts "Claiming issue #{issue.name}: #{issue.title}." + def claim project, config, opts, issue, dev = nil + if dev + dev_full_email = project.devs ? project.devs[dev.to_sym] : nil + raise Error, "no nickname :#{dev} has been defined in project.yaml" unless dev_full_email + end + dev_full_email ||= config.user + puts "Claiming issue #{issue.name}: #{issue.title} for #{dev_full_email}." comment = ask_multiline_or_editor "Comments" unless $opts[:no_comment] - issue.claim config.user, comment, opts[:force] - puts "Issue #{issue.name} marked as claimed by #{config.user}" + issue.claim dev_full_email, comment, opts[:force] + puts "Issue #{issue.name} marked as claimed by #{dev_full_email}" end operation :unclaim, "Unclaim a claimed issue", :issue do From ohad at lutzky.net Fri Nov 7 10:34:30 2008 From: ohad at lutzky.net (Ohad Lutzky) Date: Fri, 7 Nov 2008 17:34:30 +0200 Subject: [ditz-talk] [PATCH] Allow ditz claim abcd oprah In-Reply-To: <8e50e92e0811070733g6712c81cv41f4f32b722432b4@mail.gmail.com> References: <49144C98.3020306@googlemail.com> <8e50e92e0811070733g6712c81cv41f4f32b722432b4@mail.gmail.com> Message-ID: <8e50e92e0811070734j1c029c2dq1f7206a25ca63406@mail.gmail.com> On Fri, Nov 7, 2008 at 4:11 PM, Thomas Nichols wrote: > Hi, > > Not sure whether these are better as email patches for discussion, or > merge requests (from f3423e0 on thomasns-clone) on Gitorious? In my opinion the best option is a merge-request on this mailing list, with a comment (which shouldn't be necessary, if your commit-messages are good enough :)) - I, for example, don't use gitorious (it's incredibly slow on my connection for some reason). -- Man is the only animal that laughs and weeps, for he is the only animal that is struck with the difference between what things are and what they ought to be. - William Hazlitt Ohad Lutzky From nichols7 at googlemail.com Fri Nov 7 11:40:06 2008 From: nichols7 at googlemail.com (Thomas Nichols) Date: Fri, 07 Nov 2008 16:40:06 +0000 Subject: [ditz-talk] [PATCH] new plugin - use sha_id.slice(0, 5) instead of ditz-123 Message-ID: <49146F66.7020002@googlemail.com> Hi, Miniscule plugin 'sha-names' replaces names of the form 'ditz-123' with 'a1b2c' and similar. These can be used (AFAIK) wherever an issue ID is required, and avoid problems with issues getting renumbered when an issue is moved from one component to another, or after merges. http://gitorious.org/projects/ditz/repos/thomasns-clone/logs/master I've submitted a merge request on Gitorious too, but as per Ohad's request here's the patch: diff --git a/lib/ditz/plugins/sha-names.rb b/lib/ditz/plugins/sha-names.rb new file mode 100644 index 0000000..1322045 --- /dev/null +++ b/lib/ditz/plugins/sha-names.rb @@ -0,0 +1,22 @@ +## sha-names ditz plugin +## +## This world's-smallest-ditz-plugin uses the initial characters of the SHA id instead of +## an identifier like "ditz-999". +## +## Usage: +## 1. add a line "- sha-names" to the .ditz-plugins file in the project root + +module Ditz + +class Project + + SHA_NAME_LENGTH = 5 + + def assign_issue_names! + issues.sort_by { |i| i.creation_time }.each do |i| + i.name = i.id.slice(0,SHA_NAME_LENGTH) + end + end + +end +end From wmorgan-ditz at masanjin.net Fri Nov 7 11:52:55 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Fri, 07 Nov 2008 08:52:55 -0800 Subject: [ditz-talk] [PATCH] Better issue_dir possibility order In-Reply-To: <20081105112610.5D331FC001@mail.kampsax.dtu.dk> References: <20081105112610.5D331FC001@mail.kampsax.dtu.dk> Message-ID: <1226076743-sup-5231@entry> Reformatted excerpts from Daniel Kal?r's message of 2008-11-04: > When something is used as default for the --issue-dir option, it > overrides the configured issue_dir. Gah. Good catch. But I think this is better solved by improving Trollop so that you can tell whether an option has been specified or not. -- William From wmorgan-ditz at masanjin.net Fri Nov 7 12:05:07 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Fri, 07 Nov 2008 09:05:07 -0800 Subject: [ditz-talk] [PATCH] Exit cleanly when interrupting config creation, init or reconfigure In-Reply-To: <1225873829-25606-1-git-send-email-daniel@kalor.dk> References: <1225873829-25606-1-git-send-email-daniel@kalor.dk> Message-ID: <1226077427-sup-1509@entry> Reformatted excerpts from Daniel Kal?r's message of 2008-11-05: > - Ditz::Config.create_interactively.save! $opts[:config_file] > + begin > + Ditz::Config.create_interactively.save! $opts[:config_file] > + rescue Interrupt > + puts > + exit 1 > + end Good idea. Can you refactor so that the begin/rescue stuff is a separate method that we can just call, instead of duplicating it three times? -- William From wmorgan-ditz at masanjin.net Fri Nov 7 12:35:59 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Fri, 07 Nov 2008 09:35:59 -0800 Subject: [ditz-talk] [PATCH] Add configuration setting for controlling pager invocation In-Reply-To: <1225946522-21413-1-git-send-email-daniel@kalor.dk> References: <1225946522-21413-1-git-send-email-daniel@kalor.dk> Message-ID: <1226079314-sup-6208@entry> Reformatted excerpts from Daniel Kal?r's message of 2008-11-05: > Only mess with LESS env var when config is set to 'auto', and don't > ignore previous LESS settings. Appied, thanks! -- William From daniel at kalor.dk Sat Nov 8 03:39:33 2008 From: daniel at kalor.dk (=?ISO-8859-1?Q?Daniel_Kal=F8r?=) Date: Sat, 8 Nov 2008 09:39:33 +0100 Subject: [ditz-talk] [PATCH] Exit cleanly when interrupting config creation, init or reconfigure In-Reply-To: <1226077427-sup-1509@entry> References: <1225873829-25606-1-git-send-email-daniel@kalor.dk> <1226077427-sup-1509@entry> Message-ID: <4d314a630811080039m410aaf61r3becb2c20128ec76@mail.gmail.com> > Good idea. Can you refactor so that the begin/rescue stuff is a separate > method that we can just call, instead of duplicating it three times? Having just started, I'm not particularly well versed in Ruby, and can at the moment only come up with solutions that are even uglier. Here is a related patch... /Daniel Kal?r (Xnybre) From daniel at kalor.dk Sat Nov 8 03:40:24 2008 From: daniel at kalor.dk (=?utf-8?q?Daniel=20Kal=C3=B8r?=) Date: Sat, 8 Nov 2008 09:40:24 +0100 Subject: [ditz-talk] [PATCH] Print more clean error message when running help on non-existing command In-Reply-To: <4d314a630811080039m410aaf61r3becb2c20128ec76@mail.gmail.com> References: <4d314a630811080039m410aaf61r3becb2c20128ec76@mail.gmail.com> Message-ID: <1226133624-7707-1-git-send-email-daniel@kalor.dk> From: Daniel Kal?r --- bin/ditz | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/bin/ditz b/bin/ditz index 886a8fd..ef39904 100755 --- a/bin/ditz +++ b/bin/ditz @@ -134,7 +134,11 @@ when "reconfigure" # might not be able to load the project op.do cmd, nil, config, ARGV exit when "help" - op.do cmd, nil, config, ARGV + begin + op.do cmd, nil, config, ARGV + rescue Ditz::Operator::Error => e + die "#{e.message}" + end exit end -- 1.6.0.3 From ohad at lutzky.net Sat Nov 8 04:21:35 2008 From: ohad at lutzky.net (Ohad Lutzky) Date: Sat, 8 Nov 2008 11:21:35 +0200 Subject: [ditz-talk] [PATCH] Better issue_dir possibility order In-Reply-To: <1226076743-sup-5231@entry> References: <20081105112610.5D331FC001@mail.kampsax.dtu.dk> <1226076743-sup-5231@entry> Message-ID: <8e50e92e0811080121j6e643ff3h229fe449e14e1896@mail.gmail.com> On Fri, Nov 7, 2008 at 6:52 PM, William Morgan wrote: > Reformatted excerpts from Daniel Kal?r's message of 2008-11-04: >> When something is used as default for the --issue-dir option, it >> overrides the configured issue_dir. > > Gah. Good catch. But I think this is better solved by improving Trollop > so that you can tell whether an option has been specified or not. Actually, I think the solution in the patch makes more sense, unless you want to integrate trollop with your settings file. (That, too, could make sense...) -- Man is the only animal that laughs and weeps, for he is the only animal that is struck with the difference between what things are and what they ought to be. - William Hazlitt Ohad Lutzky From ohad at lutzky.net Sat Nov 8 04:31:26 2008 From: ohad at lutzky.net (Ohad Lutzky) Date: Sat, 8 Nov 2008 11:31:26 +0200 Subject: [ditz-talk] [PATCH] new plugin - use sha_id.slice(0, 5) instead of ditz-123 In-Reply-To: <49146F66.7020002@googlemail.com> References: <49146F66.7020002@googlemail.com> Message-ID: <8e50e92e0811080131v1864b3d6t7b5896efe814bece@mail.gmail.com> Lovin' it! On Fri, Nov 7, 2008 at 6:40 PM, Thomas Nichols wrote: > I've submitted a merge request on Gitorious too, but as per Ohad's > request here's the patch: Actually, what I requested was mailed merge requests (or rather, in git's terminology, pull-requests). They can be easily made using git request-pull. -- Man is the only animal that laughs and weeps, for he is the only animal that is struck with the difference between what things are and what they ought to be. - William Hazlitt Ohad Lutzky From matt at tplus1.com Sat Nov 8 18:45:57 2008 From: matt at tplus1.com (Matthew Wilson) Date: Sat, 8 Nov 2008 18:45:57 -0500 Subject: [ditz-talk] How can I discover the projname-99 name for an issue, based on the ID? Message-ID: When I look at issues in the HTML interface (which is awesome, BTW) I see the issue IDs like Id: d0b002bf60b31dd23a74a6a2c6819a4b5ff900a1 But when I want to do command-line operations, like claiming an issue, or assigning it to a release, (I think) I have to use the name for the issue like projname-99. So then I do a ditz grep d0b002 to find the issue's name. Is there some way around this? How can I discover an issue's name? Matt -- Matthew Wilson matt at tplus1.com http://tplus1.com From wmorgan-ditz at masanjin.net Sun Nov 9 03:15:51 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Sun, 09 Nov 2008 00:15:51 -0800 Subject: [ditz-talk] How can I discover the projname-99 name for an issue, based on the ID? In-Reply-To: References: Message-ID: <1226218478-sup-1780@entry> Reformatted excerpts from Matthew Wilson's message of 2008-11-08: > But when I want to do command-line operations, like claiming an issue, > or assigning it to a release, (I think) I have to use the name for the > issue like projname-99. So then I do a ditz grep d0b002 to find the > issue's name. Since 0.5 you can use the issue id, or any prefix thereof, on the commandline as well as the local name. > Is there some way around this? How can I discover an issue's name? If you still want its local name, ditz show . -- William From daniel at kalor.dk Sun Nov 9 07:55:19 2008 From: daniel at kalor.dk (=?utf-8?q?Daniel=20Kal=C3=B8r?=) Date: Sun, 9 Nov 2008 13:55:19 +0100 Subject: [ditz-talk] [PATCH] Make issue-claiming use pager Message-ID: <1226235319-25092-1-git-send-email-daniel@kalor.dk> --- lib/ditz/plugins/issue-claiming.rb | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/lib/ditz/plugins/issue-claiming.rb b/lib/ditz/plugins/issue-claiming.rb index d5240a1..e06c256 100644 --- a/lib/ditz/plugins/issue-claiming.rb +++ b/lib/ditz/plugins/issue-claiming.rb @@ -122,6 +122,7 @@ class Operator if issues.empty? puts "No issues." else + run_pager config print_todo_list_by_release_for project, issues end end @@ -144,6 +145,7 @@ class Operator if issues.empty? puts "No issues." else + run_pager config issues.keys.sort.each do |c| puts "#{c}:" puts todo_list_for(issues[c], :show_release => true) @@ -166,6 +168,7 @@ class Operator if issues.empty? puts "No issues." else + run_pager config print_todo_list_by_release_for project, issues end end -- 1.6.0.3 From matt at tplus1.com Sun Nov 9 13:24:56 2008 From: matt at tplus1.com (Matthew Wilson) Date: Sun, 9 Nov 2008 13:24:56 -0500 Subject: [ditz-talk] PATCH: add an ri command that lists all issues for a particular release Message-ID: I couldn't figure out how to list the issues for a particular release, so I made this patch. Comments are welcome, because I would like to learn how to code in Ruby better. ri stands for "release issues". --- lib/ditz/operator.rb | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/lib/ditz/operator.rb b/lib/ditz/operator.rb index 0a45867..b9a433b 100644 --- a/lib/ditz/operator.rb +++ b/lib/ditz/operator.rb @@ -615,6 +615,14 @@ EOS end end end + + operation :ri, "Show issues for a particular release", :release do + end + + def ri project, config, opts, release + puts todo_list_for(release.issues_from(project)) + end + end end -- 1.5.4.3 -- Matthew Wilson matt at tplus1.com http://tplus1.com From matt at tplus1.com Sun Nov 9 16:03:34 2008 From: matt at tplus1.com (Matthew Wilson) Date: Sun, 9 Nov 2008 16:03:34 -0500 Subject: [ditz-talk] PATCH: add an ri command that lists all issues for a particular release In-Reply-To: References: Message-ID: Never mind this patch. I just discovered the optional parameter to pass to todo. On Sun, Nov 9, 2008 at 1:24 PM, Matthew Wilson wrote: > I couldn't figure out how to list the issues for a particular release, > so I made this patch. Comments are welcome, because I would like to > learn how to code in Ruby better. > > ri stands for "release issues". > > --- > lib/ditz/operator.rb | 8 ++++++++ > 1 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/lib/ditz/operator.rb b/lib/ditz/operator.rb > index 0a45867..b9a433b 100644 > --- a/lib/ditz/operator.rb > +++ b/lib/ditz/operator.rb > @@ -615,6 +615,14 @@ EOS > end > end > end > + > + operation :ri, "Show issues for a particular release", :release do > + end > + > + def ri project, config, opts, release > + puts todo_list_for(release.issues_from(project)) > + end > + > end > > end > -- > 1.5.4.3 > > > -- > Matthew Wilson > matt at tplus1.com > http://tplus1.com > -- Matthew Wilson matt at tplus1.com http://tplus1.com From wmorgan-ditz at masanjin.net Sun Nov 9 22:14:08 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Sun, 09 Nov 2008 19:14:08 -0800 Subject: [ditz-talk] PATCH: add an ri command that lists all issues for a particular release In-Reply-To: References: Message-ID: <1226286790-sup-8688@entry> Reformatted excerpts from Matthew Wilson's message of 2008-11-09: > Never mind this patch. I just discovered the optional parameter to > pass to todo. Once the help is improved (issue bb6bb05c) this will be a little easier to discover. -- William From wmorgan-ditz at masanjin.net Sun Nov 9 22:48:32 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Sun, 09 Nov 2008 19:48:32 -0800 Subject: [ditz-talk] [PATCH] Allow ditz claim abcd oprah In-Reply-To: <49144C98.3020306@googlemail.com> References: <49144C98.3020306@googlemail.com> Message-ID: <1226287071-sup-409@entry> Reformatted excerpts from Thomas Nichols's message of 2008-11-07: > Not sure whether these are better as email patches for discussion, or > merge requests (from f3423e0 on thomasns-clone) on Gitorious? I'm personally happy with either, although Gitorious merge requests don't notify the list, so you have to do that manually. A merge request might be nicer if it's a big feature that has several commits. But I'm not that picky. Unfortunately Thunderbird has helpfully text-wrapped your patch, so it's corrupted. I recommend using git format-patch, which will turn commits commits into emails, and allow me to easily apply them while preserving your commit messages and giving you credit in the development history. > WDYT? Is this a change that's useful to others? I think this is a good change, but it needs a little more work before it goes in. In particular I'd like to see: - commands for managing aliases (adding and removing) - the ability to use either an email address or an alias The ability to assign issues to people is definitely desireable. > BTW I'm a bit nervous of continuing with the current implementation of > 'mine' since it depends AFAICT on a string comparison of the > human-readable email address. Would it be better to store the nickname > in the issue-*.yaml 'claimer:' field, instead of the expanded email > address, so that emails can change without breaking the output of > 'mine'? Although it's not ideal in certain situations, I'd like to keep with the "git solution" of using one's email address one's canonical, unique identifier. It's a little silly in the centralized case, but in the decentralized case, you don't really have control over who's committing what, and when. So I'm happy with the fact that you can alias people, because that will be helpful, but I don't want to make that the canonical identifier. But you're right in that the current comparison is of the full whoami string, and it should probably be of the email address only. -- William From wmorgan-ditz at masanjin.net Sun Nov 9 23:21:58 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Sun, 09 Nov 2008 20:21:58 -0800 Subject: [ditz-talk] [PATCH] new plugin - use sha_id.slice(0, 5) instead of ditz-123 In-Reply-To: <49146F66.7020002@googlemail.com> References: <49146F66.7020002@googlemail.com> Message-ID: <1226290880-sup-6427@entry> Reformatted excerpts from Thomas Nichols's message of 2008-11-07: > Miniscule plugin 'sha-names' replaces names of the form 'ditz-123' > with 'a1b2c' and similar. As of 0.5 you can refer to any issue on the commandline with its ID. So is this plugin necessary? -- William From wmorgan-ditz at masanjin.net Sun Nov 9 23:22:37 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Sun, 09 Nov 2008 20:22:37 -0800 Subject: [ditz-talk] [PATCH] new plugin - use sha_id.slice(0, 5) instead of ditz-123 In-Reply-To: <8e50e92e0811080131v1864b3d6t7b5896efe814bece@mail.gmail.com> References: <49146F66.7020002@googlemail.com> <8e50e92e0811080131v1864b3d6t7b5896efe814bece@mail.gmail.com> Message-ID: <1226290921-sup-998@entry> Reformatted excerpts from Ohad Lutzky's message of 2008-11-08: > They can be easily made using git request-pull. Learn something new every day! -- William From wmorgan-ditz at masanjin.net Mon Nov 10 00:20:48 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Sun, 09 Nov 2008 21:20:48 -0800 Subject: [ditz-talk] [PATCH] Exit cleanly when interrupting config creation, init or reconfigure In-Reply-To: <4d314a630811080039m410aaf61r3becb2c20128ec76@mail.gmail.com> References: <1225873829-25606-1-git-send-email-daniel@kalor.dk> <1226077427-sup-1509@entry> <4d314a630811080039m410aaf61r3becb2c20128ec76@mail.gmail.com> Message-ID: <1226294278-sup-332@entry> Reformatted excerpts from Daniel Kal?r's message of 2008-11-08: > > Good idea. Can you refactor so that the begin/rescue stuff is a > > separate method that we can just call, instead of duplicating it > > three times? > > Having just started, I'm not particularly well versed in Ruby, and can > at the moment only come up with solutions that are even uglier. Try something like: def die_gently begin yield rescue Interrupt puts exit 1 end end Then you can call die_gently { ... } die_gently do ... end > Here is a related patch... Applied, thanks! (You might want to git config user.email to set your email address; it's recorded as @float in the patch.) -- William From wmorgan-ditz at masanjin.net Mon Nov 10 00:28:55 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Sun, 09 Nov 2008 21:28:55 -0800 Subject: [ditz-talk] [PATCH] Better issue_dir possibility order In-Reply-To: <8e50e92e0811080121j6e643ff3h229fe449e14e1896@mail.gmail.com> References: <20081105112610.5D331FC001@mail.kampsax.dtu.dk> <1226076743-sup-5231@entry> <8e50e92e0811080121j6e643ff3h229fe449e14e1896@mail.gmail.com> Message-ID: <1226294478-sup-4068@entry> Reformatted excerpts from Ohad Lutzky's message of 2008-11-08: > Actually, I think the solution in the patch makes more sense, unless > you want to integrate trollop with your settings file. (That, too, > could make sense...) Well the solution in the patch would mean that if you did a --help, there would be no default listed for --issue-dir, which isn't right. I'm proposing that Trollop provide a way of telling whether --issue-dir has been provided on the commandline, and if so, use it, and otherwise, use the config file value, and if that's not there, use the Trollop default. Now that I've written that sentence, I realize that the best solution might be to just untangle this whole mess: have the configuration filenames (.ditz-config and .ditz-plugins) be fixed, and not changeable by Trollop. Then those would be read first, and whatever settings were inside would form the basis for Trollop's defaults. In that world, doing --help would be really informative: it would tell you exactly what values were going to be used unless you overrode them on the commandline. -- William From wmorgan-ditz at masanjin.net Mon Nov 10 00:30:05 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Sun, 09 Nov 2008 21:30:05 -0800 Subject: [ditz-talk] [PATCH] Make issue-claiming use pager In-Reply-To: <1226235319-25092-1-git-send-email-daniel@kalor.dk> References: <1226235319-25092-1-git-send-email-daniel@kalor.dk> Message-ID: <1226294998-sup-5940@entry> Applied, thanks! -- William From ohad at lutzky.net Mon Nov 10 01:57:24 2008 From: ohad at lutzky.net (Ohad Lutzky) Date: Mon, 10 Nov 2008 08:57:24 +0200 Subject: [ditz-talk] [PATCH] Better issue_dir possibility order In-Reply-To: <1226294478-sup-4068@entry> References: <20081105112610.5D331FC001@mail.kampsax.dtu.dk> <1226076743-sup-5231@entry> <8e50e92e0811080121j6e643ff3h229fe449e14e1896@mail.gmail.com> <1226294478-sup-4068@entry> Message-ID: <8e50e92e0811092257r6218590ane7417b777b7d4519@mail.gmail.com> On Mon, Nov 10, 2008 at 7:28 AM, William Morgan wrote: > Reformatted excerpts from Ohad Lutzky's message of 2008-11-08: >> Actually, I think the solution in the patch makes more sense, unless >> you want to integrate trollop with your settings file. (That, too, >> could make sense...) > > Well the solution in the patch would mean that if you did a --help, > there would be no default listed for --issue-dir, which isn't right. > > I'm proposing that Trollop provide a way of telling whether --issue-dir > has been provided on the commandline, and if so, use it, and otherwise, > use the config file value, and if that's not there, use the Trollop > default. > > Now that I've written that sentence, I realize that the best solution > might be to just untangle this whole mess: have the configuration > filenames (.ditz-config and .ditz-plugins) be fixed, and not changeable > by Trollop. Then those would be read first, and whatever settings were > inside would form the basis for Trollop's defaults. > > In that world, doing --help would be really informative: it would tell > you exactly what values were going to be used unless you overrode them > on the commandline. I like the way you're going with this, but here's a though: Why not have a default "--config-file" option which gets parsed first (regardless of any other trollop configuration the developer has)? That way you could still load defaults from somewhere else. -- Man is the only animal that laughs and weeps, for he is the only animal that is struck with the difference between what things are and what they ought to be. - William Hazlitt Ohad Lutzky From daniel at kalor.dk Mon Nov 10 04:58:13 2008 From: daniel at kalor.dk (=?utf-8?q?Daniel=20Kal=C3=B8r?=) Date: Mon, 10 Nov 2008 10:58:13 +0100 Subject: [ditz-talk] [PATCH] Generalized clean exit on interrupt In-Reply-To: <1226294278-sup-332@entry> References: <1226294278-sup-332@entry> Message-ID: <1226311093-17723-1-git-send-email-daniel@kalor.dk> --- bin/ditz | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/bin/ditz b/bin/ditz index cf4bd15..943678f 100755 --- a/bin/ditz +++ b/bin/ditz @@ -94,6 +94,15 @@ rescue SystemCallError => e Ditz::debug "can't load plugins file: #{e.message}" end +def die_gently + begin + yield + rescue Interrupt + puts + exit 1 + end +end + config = begin Ditz::debug "loading config from #{$opts[:config_file]}" Ditz::Config.from $opts[:config_file] @@ -108,7 +117,7 @@ rescue SystemCallError => e I wasn't able to find a configuration file #{$opts[:config_file]}. We'll set it up right now. EOS - Ditz::Config.create_interactively.save! $opts[:config_file] + die_gently { Ditz::Config.create_interactively.save! $opts[:config_file] } end end @@ -124,14 +133,15 @@ end case cmd # some special commands not handled by Ditz::Operator when "init" die "#{issue_dir} directory already exists" if issue_dir.exist? + project = nil + die_gently { project = op.init } issue_dir.mkdir fn = issue_dir + Ditz::FileStorage::PROJECT_FN - project = op.init project.save! fn puts "Ok, #{issue_dir} directory created successfully." exit when "reconfigure" # might not be able to load the project - op.do cmd, nil, config, ARGV + die_gently { op.do cmd, nil, config, ARGV } exit when "help" begin -- 1.6.0.3 From nichols7 at googlemail.com Mon Nov 10 12:02:41 2008 From: nichols7 at googlemail.com (Thomas Nichols) Date: Mon, 10 Nov 2008 17:02:41 +0000 Subject: [ditz-talk] [PATCH] new plugin - use sha_id.slice(0, 5) instead of ditz-123 In-Reply-To: <1226290880-sup-6427@entry> References: <49146F66.7020002@googlemail.com> <1226290880-sup-6427@entry> Message-ID: <49186931.700@googlemail.com> William Morgan wrote on 2008/11/10 4:21: > Reformatted excerpts from Thomas Nichols's message of 2008-11-07: > >> Miniscule plugin 'sha-names' replaces names of the form 'ditz-123' >> with 'a1b2c' and similar. >> > > As of 0.5 you can refer to any issue on the commandline with its ID. So > is this plugin necessary? > It shows only 5-char SHA ids for output, for example from 'ditz todo' or 'ditz mine', so that these become the canonical, immutable references and the 'ditz-99' references disappear completely. Without this plugin, 'ditz todo' shows me a list of tickets, but to get to the immutable ID I then need to 'ditz-show engine-57'. That it belongs to component 'engine' is not relevant to us; but more seriously, this ID may change in future, for example if an issue is switched from one component to another, or if two ditz trees (each having an engine-57 issue) are merged. Using e5a67 and so on obviates this problem. But hey, it's a plugin, so if people don't want this behaviour then No Action Required ;-) -- Thomas From nichols7 at googlemail.com Mon Nov 10 12:27:11 2008 From: nichols7 at googlemail.com (Thomas Nichols) Date: Mon, 10 Nov 2008 17:27:11 +0000 Subject: [ditz-talk] [PATCH] new plugin - use sha_id.slice(0, 5) instead of ditz-123 In-Reply-To: <1226290921-sup-998@entry> References: <49146F66.7020002@googlemail.com> <8e50e92e0811080131v1864b3d6t7b5896efe814bece@mail.gmail.com> <1226290921-sup-998@entry> Message-ID: <49186EEF.1000009@googlemail.com> William Morgan wrote on 2008/11/10 4:22: > Reformatted excerpts from Ohad Lutzky's message of 2008-11-08: > >> They can be easily made using git request-pull. >> > > Learn something new every day! > Thanks Ohad, very nice call :-) Sending as separate mail. From nichols7 at googlemail.com Mon Nov 10 12:40:29 2008 From: nichols7 at googlemail.com (Thomas Nichols) Date: Mon, 10 Nov 2008 17:40:29 +0000 Subject: [ditz-talk] [PATCH] Use /usr/bin/env ruby instead of /usr/bin/ruby1.8 Message-ID: <4918720D.2080603@googlemail.com> The following changes since commit 6f2756fbce3662e41a1e4c57dcb99b56b8b076ec: Thomas Nichols (1): Merge branch 'master' of git://gitorious.org/ditz/mainline are available in the git repository at: git://gitorious.org/ditz/thomasns-clone.git master Thomas Nichols (1): Use /usr/bin/env/ruby instead of an OS-specific binary name. bin/ditz | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ========================================================================================= >From 06c4845d479d4296865d95ad8a103d102e628e9a Mon Sep 17 00:00:00 2001 From: Thomas Nichols Date: Mon, 10 Nov 2008 17:14:08 +0000 Subject: [PATCH] Use /usr/bin/env/ruby instead of an OS-specific binary name. Gentoo has /usr/bin/ruby18 but not /usr/bin/ruby1.8 . --- bin/ditz | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/bin/ditz b/bin/ditz index cf4bd15..0c1a8dc 100755 --- a/bin/ditz +++ b/bin/ditz @@ -1,4 +1,4 @@ -#!/usr/bin/ruby1.8 +#!/usr/bin/env ruby $LOAD_PATH.unshift(File.expand_path("#{File.dirname($0)}/../lib")) -- 1.6.0.2 From nichols7 at googlemail.com Mon Nov 10 15:45:12 2008 From: nichols7 at googlemail.com (Thomas Nichols) Date: Mon, 10 Nov 2008 20:45:12 +0000 Subject: [ditz-talk] [PATCH] new plugin - use sha_id.slice(0, 5) instead of ditz-123 In-Reply-To: <8e50e92e0811080131v1864b3d6t7b5896efe814bece@mail.gmail.com> References: <49146F66.7020002@googlemail.com> <8e50e92e0811080131v1864b3d6t7b5896efe814bece@mail.gmail.com> Message-ID: <49189D58.9090909@googlemail.com> Ohad Lutzky wrote on 2008/11/08 9:31: > Lovin' it! > Glad it didn't melt your system :-) > On Fri, Nov 7, 2008 at 6:40 PM, Thomas Nichols wrote: > >> I've submitted a merge request on Gitorious too, but as per Ohad's >> request here's the patch: >> > > Actually, what I requested was mailed merge requests (or rather, in > git's terminology, pull-requests). They can be easily made using git > request-pull. > > Well this worked beautifully for a later commit, but this earlier one gives me grief, says BRANCH.NOT.VERIFIED -- I'm considerably baffled. Time to stick to format-patch and use attachments, I think, until I can work out what I've messed up here. William -- have you caught this patch ok? Does it look viable? -- Thomas $ git request-pull f3423e0 git://gitorious.org/ditz/thomasns-clone.git d3031 warn: No branch of git://gitorious.org/ditz/thomasns-clone.git is at: warn: Are you sure you pushed d3031 there? -------- The following changes since commit f3423e0736cb46fa803ee0517edf550b92a32a12: Thomas Nichols (1): Merge branch 'master' of git://gitorious.org/ditz/mainline are available in the git repository at: git://gitorious.org/ditz/thomasns-clone.git ..BRANCH.NOT.VERIFIED.. Thomas Nichols (1): Add new teeny-tiny plugin - show issue names as first 5 chars of the SHA id lib/ditz/plugins/sha-names.rb | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) create mode 100644 lib/ditz/plugins/sha-names.rb From ohad at lutzky.net Mon Nov 10 15:26:47 2008 From: ohad at lutzky.net (Ohad Lutzky) Date: Mon, 10 Nov 2008 22:26:47 +0200 Subject: [ditz-talk] [PATCH] Use /usr/bin/env ruby instead of /usr/bin/ruby1.8 In-Reply-To: <4918720D.2080603@googlemail.com> References: <4918720D.2080603@googlemail.com> Message-ID: <8e50e92e0811101226v42973bdag3f8e082dd910aac2@mail.gmail.com> On Mon, Nov 10, 2008 at 7:40 PM, Thomas Nichols wrote: > The following changes since commit 6f2756fbce3662e41a1e4c57dcb99b56b8b076ec: > Thomas Nichols (1): > Merge branch 'master' of git://gitorious.org/ditz/mainline > > are available in the git repository at: > > git://gitorious.org/ditz/thomasns-clone.git master > > Thomas Nichols (1): > Use /usr/bin/env/ruby instead of an OS-specific binary name. > > bin/ditz | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > > ========================================================================================= > > >From 06c4845d479d4296865d95ad8a103d102e628e9a Mon Sep 17 00:00:00 2001 > From: Thomas Nichols > Date: Mon, 10 Nov 2008 17:14:08 +0000 > Subject: [PATCH] Use /usr/bin/env/ruby instead of an OS-specific binary > name. > Gentoo has /usr/bin/ruby18 but not /usr/bin/ruby1.8 . > > --- > bin/ditz | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/bin/ditz b/bin/ditz > index cf4bd15..0c1a8dc 100755 > --- a/bin/ditz > +++ b/bin/ditz > @@ -1,4 +1,4 @@ > -#!/usr/bin/ruby1.8 > +#!/usr/bin/env ruby > > $LOAD_PATH.unshift(File.expand_path("#{File.dirname($0)}/../lib")) > > -- > 1.6.0.2 Actually, this particular path is automatically modified by setup.rb. Special provisions need to be taken in order to make sure the hashbang line stays the same. Either you can just be careful when committing, or you can have your build-script retain the old version of the binary. For example, in ttime, I have the following rake task in place (it's called by the debuild task) # Debuild with proper backup and restoration operations def safely_debuild(debuild_opts = "") # Save bin/ttime, as setup.rb modifies the shebang and mode tempd = `mktemp -d`.chomp FileUtils.copy("bin/ttime",tempd) begin `debuild #{debuild_opts}` ensure FileUtils.move(File::join(tempd, "ttime"), "bin/") Dir::rmdir(tempd) end end -- Man is the only animal that laughs and weeps, for he is the only animal that is struck with the difference between what things are and what they ought to be. - William Hazlitt Ohad Lutzky From wmorgan-ditz at masanjin.net Mon Nov 10 16:03:56 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Mon, 10 Nov 2008 13:03:56 -0800 Subject: [ditz-talk] [PATCH] new plugin - use sha_id.slice(0, 5) instead of ditz-123 In-Reply-To: <49186931.700@googlemail.com> References: <49146F66.7020002@googlemail.com> <1226290880-sup-6427@entry> <49186931.700@googlemail.com> Message-ID: <1226350752-sup-4589@entry> Reformatted excerpts from Thomas Nichols's message of 2008-11-10: > It shows only 5-char SHA ids for output, for example from 'ditz todo' > or 'ditz mine', so that these become the canonical, immutable > references and the 'ditz-99' references disappear completely. Ah, got it. Ok, I like this. One minor request: can you increase the documentation in the comments to reflect the fact that it changes the output everywhere (since I generate PLUGINS.txt automagically from these.) -- William From nichols7 at googlemail.com Mon Nov 10 16:27:33 2008 From: nichols7 at googlemail.com (Thomas Nichols) Date: Mon, 10 Nov 2008 21:27:33 +0000 Subject: [ditz-talk] [PATCH] Allow ditz claim abcd oprah In-Reply-To: <1226287071-sup-409@entry> References: <49144C98.3020306@googlemail.com> <1226287071-sup-409@entry> Message-ID: <4918A745.6020604@googlemail.com> William Morgan wrote on 2008/11/10 3:48: > Reformatted excerpts from Thomas Nichols's message of 2008-1 > WDYT? Is this a change that's useful to others? > > > I think this is a good change, but it needs a little more work before it > goes in. In particular I'd like to see: > > - commands for managing aliases (adding and removing) > Yeah, I looked at that and chickened out :-) Something like a 'ditz nick' command with add/remove? And these would get added to the devs (better renamed as nicks or aliases) hash in project.yaml? > - the ability to use either an email address or an alias > Nice. So if the nick is defined, use its expansion, otherwise use the literal string? > The ability to assign issues to people is definitely desireable. > > >> BTW I'm a bit nervous of continuing with the current implementation of >> 'mine' since it depends AFAICT on a string comparison of the >> human-readable email address. Would it be better to store the nickname >> in the issue-*.yaml 'claimer:' field, instead of the expanded email >> address, so that emails can change without breaking the output of >> 'mine'? >> > > Although it's not ideal in certain situations, I'd like to keep with the > "git solution" of using one's email address one's canonical, unique > identifier. It's a little silly in the centralized case, but in the > decentralized case, you don't really have control over who's committing > what, and when. So I'm happy with the fact that you can alias people, > because that will be helpful, but I don't want to make that the > canonical identifier. > > But you're right in that the current comparison is of the full whoami > string, and it should probably be of the email address only. > Yup, you're right -- emails work better than aliases as ids. Comparison of the strings would probably be ideal. One problem I haven't resolved yet is how to code cleanly the ability to use this logic for commands like 'ditz claimed' which already take an optional release param. Since we already have optional positional params I'd like to understand the logic for future syntax extensions. At the moment: * ditz claimed # all of them * ditz claimed FIELD # claimed issues for the FIELD release so perhaps it could be * ditz claimed FIELD oprah # FIELD issues claimed by Oprah but then what is * ditz claimed oprah ? Do we: check for a valid release name, if not found check for a valid nick/alias? Do we say it *must* be a release, so you cannot search for all claimed tickets for a developer? Do we add a new switch so we can * ditz claimed --claimer oprah I also smell feature creep here -- what about 'ditz mine', should that take a --claimer switch, or perhaps an optional positional param? What about 'ditz add', to automatically claim a ticket as it's being entered? &c. &c. I'm not going to get much time on these this week, so perhaps people could chuck some ideas around, and let me know whether to prefer 'ditz nick' or 'ditz alias' and I'll have a look at it when I can? Best regards, Thomas. From nichols7 at googlemail.com Mon Nov 10 16:55:40 2008 From: nichols7 at googlemail.com (Thomas Nichols) Date: Mon, 10 Nov 2008 21:55:40 +0000 Subject: [ditz-talk] [PATCH] new plugin - use sha_id.slice(0, 5) instead of ditz-123 In-Reply-To: <1226350752-sup-4589@entry> References: <49146F66.7020002@googlemail.com> <1226290880-sup-6427@entry> <49186931.700@googlemail.com> <1226350752-sup-4589@entry> Message-ID: <4918ADDC.7050801@googlemail.com> William Morgan wrote on 2008/11/10 21:03: > Reformatted excerpts from Thomas Nichols's message of 2008-11-10: > >> It shows only 5-char SHA ids for output, for example from 'ditz todo' >> or 'ditz mine', so that these become the canonical, immutable >> references and the 'ditz-99' references disappear completely. >> > > Ah, got it. Ok, I like this. One minor request: can you increase the > documentation in the comments to reflect the fact that it changes the > output everywhere (since I generate PLUGINS.txt automagically from > these.) > Committed to http://gitorious.org/projects/ditz/repos/thomasns-clone/commits/131aa158c5ae264d59455ac508776a149f6e06ad git format-patch against the previous HEAD attached. Please shout if you want me to change it, or hack freely if you feel so inclined - Code Ownership Is Code Death :-) Best regards, Thomas. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: 0001-Updated-documentation-for-sha-names.patch URL: From daniel at kalor.dk Thu Nov 13 05:02:35 2008 From: daniel at kalor.dk (=?utf-8?q?Daniel=20Kal=C3=B8r?=) Date: Thu, 13 Nov 2008 11:02:35 +0100 Subject: [ditz-talk] [PATCH] Add non-commented empty line when asking via editor Message-ID: <1226570555-27356-1-git-send-email-daniel@kalor.dk> Some editors automatically comment new lines made after/before a commented block --- lib/ditz/lowline.rb | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/ditz/lowline.rb b/lib/ditz/lowline.rb index ff7b752..2f9fb2a 100644 --- a/lib/ditz/lowline.rb +++ b/lib/ditz/lowline.rb @@ -120,6 +120,7 @@ module Lowline f.puts default f.puts end + f.puts f.puts q.gsub(/^/, "## ") f.puts "##" f.puts "## Enter your text above. Lines starting with a '#' will be ignored." -- 1.6.0.3 From daniel at kalor.dk Fri Nov 14 02:20:47 2008 From: daniel at kalor.dk (=?utf-8?q?Daniel=20Kal=C3=B8r?=) Date: Fri, 14 Nov 2008 08:20:47 +0100 Subject: [ditz-talk] [PATCH] Catch issue-labeling errors In-Reply-To: <1226647248-27392-2-git-send-email-daniel@kalor.dk> References: <1226647248-27392-1-git-send-email-daniel@kalor.dk> <1226647248-27392-2-git-send-email-daniel@kalor.dk> Message-ID: <1226647248-27392-3-git-send-email-daniel@kalor.dk> --- lib/ditz/plugins/issue-labeling.rb | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/ditz/plugins/issue-labeling.rb b/lib/ditz/plugins/issue-labeling.rb index 00bfa17..15b79fd 100644 --- a/lib/ditz/plugins/issue-labeling.rb +++ b/lib/ditz/plugins/issue-labeling.rb @@ -60,8 +60,8 @@ class Issue end def apply_labels new_labels, who, comment - log "issue labeled", who, comment new_labels.each { |l| add_label l } + log "issue labeled", who, comment end def remove_labels labels_to_remove, who, comment @@ -101,8 +101,12 @@ class Operator def new_label project, config, maybe_label puts "Adding label #{maybe_label}." if maybe_label label = Label.create_interactively(:args => [project, config], :with => { :name => maybe_label }) or return - project.add_label label - puts "Added label #{label.name}." + begin + project.add_label label + puts "Added label #{label.name}." + rescue Ditz::ModelError => e + puts "Error: Project #{e}" + end end operation :label, "Apply labels to an issue", :issue, :labels @@ -110,7 +114,12 @@ class Operator labels = project.labels_for label_names puts "Adding labels #{label_names} to issue #{issue.name}: #{issue.title}." comment = ask_multiline_or_editor "Comments" unless $opts[:no_comment] - issue.apply_labels labels, config.user, comment + begin + issue.apply_labels labels, config.user, comment + rescue Ditz::ModelError => e + puts "Error: Issue #{e}" + return + end show_labels issue end -- 1.6.0.3 From daniel at kalor.dk Fri Nov 14 02:20:48 2008 From: daniel at kalor.dk (=?utf-8?q?Daniel=20Kal=C3=B8r?=) Date: Fri, 14 Nov 2008 08:20:48 +0100 Subject: [ditz-talk] [PATCH] Make issue-labeling write correct label info In-Reply-To: <1226647248-27392-3-git-send-email-daniel@kalor.dk> References: <1226647248-27392-1-git-send-email-daniel@kalor.dk> <1226647248-27392-2-git-send-email-daniel@kalor.dk> <1226647248-27392-3-git-send-email-daniel@kalor.dk> Message-ID: <1226647248-27392-4-git-send-email-daniel@kalor.dk> The info written when adding an issue was malformed --- lib/ditz/plugins/issue-labeling.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/ditz/plugins/issue-labeling.rb b/lib/ditz/plugins/issue-labeling.rb index 15b79fd..5a7d1d2 100644 --- a/lib/ditz/plugins/issue-labeling.rb +++ b/lib/ditz/plugins/issue-labeling.rb @@ -56,7 +56,7 @@ class Issue field :labels, :multi => true, :interactive_generator => :get_labels def get_labels config, project - ask_for_selection(project.labels, "label", :name, true).map {|x|x.name} + ask_for_selection(project.labels, "label", :name, true).map {|x|x} end def apply_labels new_labels, who, comment -- 1.6.0.3 From daniel at kalor.dk Fri Nov 14 02:20:46 2008 From: daniel at kalor.dk (=?utf-8?q?Daniel=20Kal=C3=B8r?=) Date: Fri, 14 Nov 2008 08:20:46 +0100 Subject: [ditz-talk] [PATCH] Make issue-labeling use ask_multiline_or_editor In-Reply-To: <1226647248-27392-1-git-send-email-daniel@kalor.dk> References: <1226647248-27392-1-git-send-email-daniel@kalor.dk> Message-ID: <1226647248-27392-2-git-send-email-daniel@kalor.dk> --- lib/ditz/plugins/issue-labeling.rb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ditz/plugins/issue-labeling.rb b/lib/ditz/plugins/issue-labeling.rb index f85bccc..00bfa17 100644 --- a/lib/ditz/plugins/issue-labeling.rb +++ b/lib/ditz/plugins/issue-labeling.rb @@ -109,7 +109,7 @@ class Operator def label project, config, issue, label_names labels = project.labels_for label_names puts "Adding labels #{label_names} to issue #{issue.name}: #{issue.title}." - comment = ask_multiline "Comments" unless $opts[:no_comment] + comment = ask_multiline_or_editor "Comments" unless $opts[:no_comment] issue.apply_labels labels, config.user, comment show_labels issue end @@ -123,7 +123,7 @@ class Operator puts "Removing labels from issue #{issue.name}: #{issue.title}." nil end - comment = ask_multiline "Comments" unless $opts[:no_comment] + comment = ask_multiline_or_editor "Comments" unless $opts[:no_comment] issue.remove_labels labels, config.user, comment show_labels issue end -- 1.6.0.3 From daniel at kalor.dk Fri Nov 14 02:20:45 2008 From: daniel at kalor.dk (=?utf-8?q?Daniel=20Kal=C3=B8r?=) Date: Fri, 14 Nov 2008 08:20:45 +0100 Subject: [ditz-talk] [PATCH] Properly align "Labels:" in ScreenView Message-ID: <1226647248-27392-1-git-send-email-daniel@kalor.dk> --- lib/ditz/plugins/issue-labeling.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/ditz/plugins/issue-labeling.rb b/lib/ditz/plugins/issue-labeling.rb index 3a25d79..f85bccc 100644 --- a/lib/ditz/plugins/issue-labeling.rb +++ b/lib/ditz/plugins/issue-labeling.rb @@ -79,7 +79,7 @@ end class ScreenView add_to_view :issue_summary do |issue, config| - " Labels: #{(issue.labeled?)? issue.labels.map{|l|l.name}.join(', ') : 'none'}\n" + " Labels: #{(issue.labeled?)? issue.labels.map{|l|l.name}.join(', ') : 'none'}\n" end end -- 1.6.0.3 From wmorgan-ditz at masanjin.net Sat Nov 15 19:22:09 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Sat, 15 Nov 2008 16:22:09 -0800 Subject: [ditz-talk] [PATCH] Better issue_dir possibility order In-Reply-To: <8e50e92e0811092257r6218590ane7417b777b7d4519@mail.gmail.com> References: <20081105112610.5D331FC001@mail.kampsax.dtu.dk> <1226076743-sup-5231@entry> <8e50e92e0811080121j6e643ff3h229fe449e14e1896@mail.gmail.com> <1226294478-sup-4068@entry> <8e50e92e0811092257r6218590ane7417b777b7d4519@mail.gmail.com> Message-ID: <1226794893-sup-5909@entry> Reformatted excerpts from Ohad Lutzky's message of 2008-11-09: > I like the way you're going with this, but here's a though: Why not > have a default "--config-file" option which gets parsed first > (regardless of any other trollop configuration the developer has)? > That way you could still load defaults from somewhere else. I dunno, seems more complicated than it really needs to be. And no other commandline tool like ditz, AFAIK, lets you change the location of the config file with a commandline argument, so it's not like I will be removing expected functionality. Does anyone ever specify --config-file? -- William From wmorgan-ditz at masanjin.net Sat Nov 15 19:33:06 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Sat, 15 Nov 2008 16:33:06 -0800 Subject: [ditz-talk] [PATCH] Generalized clean exit on interrupt In-Reply-To: <1226311093-17723-1-git-send-email-daniel@kalor.dk> References: <1226294278-sup-332@entry> <1226311093-17723-1-git-send-email-daniel@kalor.dk> Message-ID: <1226795574-sup-6672@entry> Applied, thanks! -- William From wmorgan-ditz at masanjin.net Sat Nov 15 19:53:09 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Sat, 15 Nov 2008 16:53:09 -0800 Subject: [ditz-talk] [PATCH] Use /usr/bin/env ruby instead of /usr/bin/ruby1.8 In-Reply-To: <8e50e92e0811101226v42973bdag3f8e082dd910aac2@mail.gmail.com> References: <4918720D.2080603@googlemail.com> <8e50e92e0811101226v42973bdag3f8e082dd910aac2@mail.gmail.com> Message-ID: <1226796608-sup-821@entry> Reformatted excerpts from Ohad Lutzky's message of 2008-11-10: > Actually, this particular path is automatically modified by setup.rb. > Special provisions need to be taken in order to make sure the hashbang > line stays the same. Can you expound on this a bit more? I don't quite understand. If setup.rb is magically changing the shebang at install time, doesn't it change it to something correct for the target system? I'm not even sure how it was changed from /usr/bin/env. I think it was an accident. -- William From ohad at lutzky.net Sun Nov 16 01:13:24 2008 From: ohad at lutzky.net (Ohad Lutzky) Date: Sun, 16 Nov 2008 08:13:24 +0200 Subject: [ditz-talk] [PATCH] Better issue_dir possibility order In-Reply-To: <1226794893-sup-5909@entry> References: <20081105112610.5D331FC001@mail.kampsax.dtu.dk> <1226076743-sup-5231@entry> <8e50e92e0811080121j6e643ff3h229fe449e14e1896@mail.gmail.com> <1226294478-sup-4068@entry> <8e50e92e0811092257r6218590ane7417b777b7d4519@mail.gmail.com> <1226794893-sup-5909@entry> Message-ID: <8e50e92e0811152213m3fea2f51h31ead6c87e6c2691@mail.gmail.com> I got it - make it overridable in an environment variable. I personally don't use this setting, but it sounds like a useful feature when running automated tests. On 11/16/08, William Morgan wrote: > Reformatted excerpts from Ohad Lutzky's message of 2008-11-09: >> I like the way you're going with this, but here's a though: Why not >> have a default "--config-file" option which gets parsed first >> (regardless of any other trollop configuration the developer has)? >> That way you could still load defaults from somewhere else. > > I dunno, seems more complicated than it really needs to be. And no other > commandline tool like ditz, AFAIK, lets you change the location of the > config file with a commandline argument, so it's not like I will be > removing expected functionality. > > Does anyone ever specify --config-file? > -- > William > _______________________________________________ > ditz-talk mailing list > ditz-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/ditz-talk > -- Sent from my mobile device Man is the only animal that laughs and weeps, for he is the only animal that is struck with the difference between what things are and what they ought to be. - William Hazlitt Ohad Lutzky From ohad at lutzky.net Sun Nov 16 01:15:49 2008 From: ohad at lutzky.net (Ohad Lutzky) Date: Sun, 16 Nov 2008 08:15:49 +0200 Subject: [ditz-talk] [PATCH] Use /usr/bin/env ruby instead of /usr/bin/ruby1.8 In-Reply-To: <1226796608-sup-821@entry> References: <4918720D.2080603@googlemail.com> <8e50e92e0811101226v42973bdag3f8e082dd910aac2@mail.gmail.com> <1226796608-sup-821@entry> Message-ID: <8e50e92e0811152215n77299162uf8e8f5fc51fe59b5@mail.gmail.com> It does, and that's the problem. It changes it to the specific, full-path, specific-version instance of ruby. The version in the repository should just run using env. On 11/16/08, William Morgan wrote: > Reformatted excerpts from Ohad Lutzky's message of 2008-11-10: >> Actually, this particular path is automatically modified by setup.rb. >> Special provisions need to be taken in order to make sure the hashbang >> line stays the same. > > Can you expound on this a bit more? I don't quite understand. If > setup.rb is magically changing the shebang at install time, doesn't it > change it to something correct for the target system? > > I'm not even sure how it was changed from /usr/bin/env. I think it was > an accident. > -- > William > _______________________________________________ > ditz-talk mailing list > ditz-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/ditz-talk > -- Sent from my mobile device Man is the only animal that laughs and weeps, for he is the only animal that is struck with the difference between what things are and what they ought to be. - William Hazlitt Ohad Lutzky From wmorgan-ditz at masanjin.net Sun Nov 16 12:45:51 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Sun, 16 Nov 2008 09:45:51 -0800 Subject: [ditz-talk] [PATCH] Use /usr/bin/env ruby instead of /usr/bin/ruby1.8 In-Reply-To: <8e50e92e0811152215n77299162uf8e8f5fc51fe59b5@mail.gmail.com> References: <4918720D.2080603@googlemail.com> <8e50e92e0811101226v42973bdag3f8e082dd910aac2@mail.gmail.com> <1226796608-sup-821@entry> <8e50e92e0811152215n77299162uf8e8f5fc51fe59b5@mail.gmail.com> Message-ID: <1226857532-sup-6957@entry> Reformatted excerpts from Ohad Lutzky's message of 2008-11-15: > It does, and that's the problem. It changes it to the specific, > full-path, specific-version instance of ruby. The version in the > repository should just run using env. Got it. Applied the patch. Thanks Thomas! -- William From mitch at cgarbs.de Sun Nov 16 05:58:58 2008 From: mitch at cgarbs.de (Christian Garbs) Date: Sun, 16 Nov 2008 11:58:58 +0100 Subject: [ditz-talk] [PATCH] Better issue_dir possibility order In-Reply-To: <8e50e92e0811152213m3fea2f51h31ead6c87e6c2691@mail.gmail.com> References: <20081105112610.5D331FC001@mail.kampsax.dtu.dk> <1226076743-sup-5231@entry> <8e50e92e0811080121j6e643ff3h229fe449e14e1896@mail.gmail.com> <1226294478-sup-4068@entry> <8e50e92e0811092257r6218590ane7417b777b7d4519@mail.gmail.com> <1226794893-sup-5909@entry> <8e50e92e0811152213m3fea2f51h31ead6c87e6c2691@mail.gmail.com> Message-ID: <20081116105858.GB15747@cgarbs.de> On Sun, Nov 16, 2008 at 08:13:24AM +0200, Ohad Lutzky wrote: > I got it - make it overridable in an environment variable. I > personally don't use this setting, but it sounds like a useful feature > when running automated tests. +1 When I read "does any other commandline program use a --config-file switch" I wanted to suggest exactly the same. Regards Christian -- ....Christian.Garbs.....................................http://www.cgarbs.de Unterhalten sich zwei Programmierer: "Wei?t du schon, wie das Wetter wird?" "Ja, Caps-Lock!" "H?????" "Shift ohne Ende..." From matt at tplus1.com Mon Nov 17 13:21:37 2008 From: matt at tplus1.com (Matthew Wilson) Date: Mon, 17 Nov 2008 13:21:37 -0500 Subject: [ditz-talk] Is it just me or is rendering HTML really slow? Message-ID: I've got about 100 issues and when I run ditz html, it takes a good 45 seconds or more to render the HTML. Is this typical? Matt -- Matthew Wilson matt at tplus1.com http://tplus1.com From wmorgan-ditz at masanjin.net Mon Nov 17 14:02:35 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Mon, 17 Nov 2008 11:02:35 -0800 Subject: [ditz-talk] Is it just me or is rendering HTML really slow? In-Reply-To: References: Message-ID: <1226948402-sup-9504@entry> Reformatted excerpts from Matthew Wilson's message of 2008-11-17: > I've got about 100 issues and when I run ditz html, it takes a good 45 > seconds or more to render the HTML. > > Is this typical? That seems about the same speed that I get. The HTML generation phase is super-generalized with a templating language and ties into plugin system, and no effort has been put into speeding this process up yet, so I'm not surprised that it's this slow. Probably the most obvious place to start is to just render the issues that have been changed. -- William From matt at tplus1.com Tue Nov 18 10:12:15 2008 From: matt at tplus1.com (Matthew Wilson) Date: Tue, 18 Nov 2008 10:12:15 -0500 Subject: [ditz-talk] Is it just me or is rendering HTML really slow? In-Reply-To: <1226948402-sup-9504@entry> References: <1226948402-sup-9504@entry> Message-ID: If you outline how to fix this, I'll try to work on it. I know I could compare timestamps of the original issue files versus their HTML representations, but that seems boring and possibly wrong. On Mon, Nov 17, 2008 at 2:02 PM, William Morgan wrote: > Reformatted excerpts from Matthew Wilson's message of 2008-11-17: >> I've got about 100 issues and when I run ditz html, it takes a good 45 >> seconds or more to render the HTML. >> >> Is this typical? > > That seems about the same speed that I get. The HTML generation phase is > super-generalized with a templating language and ties into plugin > system, and no effort has been put into speeding this process up yet, so > I'm not surprised that it's this slow. > > Probably the most obvious place to start is to just render the issues > that have been changed. > -- > William > _______________________________________________ > ditz-talk mailing list > ditz-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/ditz-talk > -- Matthew Wilson matt at tplus1.com http://tplus1.com From mitch at cgarbs.de Tue Nov 18 16:06:17 2008 From: mitch at cgarbs.de (Christian Garbs) Date: Tue, 18 Nov 2008 22:06:17 +0100 Subject: [ditz-talk] Is it just me or is rendering HTML really slow? In-Reply-To: References: <1226948402-sup-9504@entry> Message-ID: <20081118210617.GC7002@cgarbs.de> On Tue, Nov 18, 2008 at 10:12:15AM -0500, Matthew Wilson wrote: > I know I could compare timestamps of the original issue files versus > their HTML representations, but that seems boring and possibly > wrong. You could write a comment into the generated HTML file that contains the bug file timestamp, so you don't have to compare the bug file timestamp to the HTML file timestamp. If the bug file timestamp is not static enough, perhaps a quickly calculateable hash of the bug content could be used. Regards Christian -- ....Christian.Garbs.....................................http://www.cgarbs.de Beware of bugs in the above code; I have only proved it correct, but not tried it. -- Donald Knuth -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From shramov at mexmat.net Wed Nov 19 03:59:55 2008 From: shramov at mexmat.net (Pavel Shramov) Date: Wed, 19 Nov 2008 11:59:55 +0300 Subject: [ditz-talk] Is it just me or is rendering HTML really slow? In-Reply-To: References: <1226948402-sup-9504@entry> Message-ID: <20081119085955.GA13839@lebu.psha.org.ru> On Tue, Nov 18, 2008 at 10:12:15AM -0500, Matthew Wilson wrote: > If you outline how to fix this, I'll try to work on it. > > I know I could compare timestamps of the original issue files versus > their HTML representations, but that seems boring and possibly wrong. Why wrong? It's not wrong for Makefile, caches and lots of other software and here it's wrong? Modification time (mtime) is stable enough on *nix like platforms since most of utilities preserve it. For example cp -a $ cp -a /etc/fstab . $ ls -l /etc/fstab fstab -rw-r--r-- 1 root root 553 Apr 25 2008 /etc/fstab -rw-r--r-- 1 psha psha 553 Apr 25 2008 fstab $ python -c 'import sys, os; print [(x, os.path.getmtime(x)) for x in sys.argv[1:]];' /etc/fstab fstab [('/etc/fstab', 1209101686.0), ('fstab', 1209101686.0)] At a first glance expression mtime(issue-html) >= max(mtime(issue-yaml), mtime(project.yaml)) is enough for skipping regeneration. You may replace mtime with monotonic function of your choice but why not to use mtime? Of course there have to be ability to force regeneration e.g. when changes list of plugins or ditz templates. So adding option like --force is useful. Other way is (as mentioned by Christian) is to place some unique tag in generated html but it's harder to implement and not better. Pavel From xbenlau at gmail.com Wed Nov 19 04:12:16 2008 From: xbenlau at gmail.com (Ben Lau) Date: Wed, 19 Nov 2008 17:12:16 +0800 Subject: [ditz-talk] Is it just me or is rendering HTML really slow? In-Reply-To: <1226948402-sup-9504@entry> References: <1226948402-sup-9504@entry> Message-ID: On Tue, Nov 18, 2008 at 3:02 AM, William Morgan wrote: > Reformatted excerpts from Matthew Wilson's message of 2008-11-17: >> I've got about 100 issues and when I run ditz html, it takes a good 45 >> seconds or more to render the HTML. >> >> Is this typical? > > That seems about the same speed that I get. The HTML generation phase is > super-generalized with a templating language and ties into plugin > system, and no effort has been put into speeding this process up yet, so > I'm not surprised that it's this slow. > > Probably the most obvious place to start is to just render the issues > that have been changed. > -- > William > _______________________________________________ > ditz-talk mailing list > ditz-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/ditz-talk > In my repository with 69 issues: $ time ditz html Local generated URL: file:///home/benlau/tmp/issue/html/index.html real 0m3.104s user 0m1.180s sys 0m0.120s $ ditz --version ditz 0.4 Configuration: Intel(R) Core Duo Processor T2300 1.6GHZ 512MB Ram From wmorgan-ditz at masanjin.net Thu Nov 20 09:59:53 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Thu, 20 Nov 2008 06:59:53 -0800 Subject: [ditz-talk] Is it just me or is rendering HTML really slow? In-Reply-To: References: <1226948402-sup-9504@entry> Message-ID: <1227191326-sup-8812@entry> Reformatted excerpts from Matthew Wilson's message of 2008-11-18: > I know I could compare timestamps of the original issue files versus > their HTML representations, but that seems boring and possibly wrong. File timestamps are dubious because you have to rely on the revision control to do the right thing when merges happen. So whatever behavior you're relying on, it has to be the same under git, darcs, hg, bzr, svn, and whatever the next big thing is. You can get a timestamp from ditz by looking at (issue.last_event_time || issue.creation_time). Sheila does this for ordering issues. But I'm not sure the timestamp is sufficient. After you've generated the HTML once, you might merge in someone else's changes and have new comments that occurred *before* the last comment that was there when you generated the HTML. The ditz timestamp definitely won't reflect that. So I think Christian's suggestion of a hash of the issue content is the best strategy. I would add a method to issue that calculates this (there's #make_id now, but that isn't quite what you want, because it doesn't include the log_events), maybe store it in a html/.hashes file or something, and use that to determine what to regenerate. -- William From wmorgan-ditz at masanjin.net Thu Nov 20 10:09:50 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Thu, 20 Nov 2008 07:09:50 -0800 Subject: [ditz-talk] [PATCH] Add non-commented empty line when asking via editor In-Reply-To: <1226570555-27356-1-git-send-email-daniel@kalor.dk> References: <1226570555-27356-1-git-send-email-daniel@kalor.dk> Message-ID: <1227193738-sup-6341@entry> Reformatted excerpts from Daniel Kal?r's message of 2008-11-13: > Some editors automatically comment new lines made after/before a > commented block Applied, thanks! I'm in the process of moving across the country, so I'm sorry the patches are taking a long time to review/apply currently. I only have little bits of time here and there. -- William From wmorgan-ditz at masanjin.net Thu Nov 20 10:12:51 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Thu, 20 Nov 2008 07:12:51 -0800 Subject: [ditz-talk] [PATCH] Make issue-labeling write correct label info In-Reply-To: <1226647248-27392-4-git-send-email-daniel@kalor.dk> References: <1226647248-27392-1-git-send-email-daniel@kalor.dk> <1226647248-27392-2-git-send-email-daniel@kalor.dk> <1226647248-27392-3-git-send-email-daniel@kalor.dk> <1226647248-27392-4-git-send-email-daniel@kalor.dk> Message-ID: <1227193955-sup-3449@entry> Nicolas, any comments on the four patches in this thread? -- William From matt at tplus1.com Thu Nov 20 10:42:22 2008 From: matt at tplus1.com (Matthew Wilson) Date: Thu, 20 Nov 2008 10:42:22 -0500 Subject: [ditz-talk] ditz ALWAYS uses less, even when outputting only like 4 lines. Message-ID: When I run "ditz mine" it puts the results in something like a less or a more buffer. This is great when there are lots and lots of rows in the output, but when there are just like 10 lines or less, it means I have to press "q". Sure, I'm a princess complaining about a pea under my mattress, but is there some way to configure ditz so it only puts the results in a pager when the results are bigger than some size? Mattt -- Matthew Wilson matt at tplus1.com http://tplus1.com From ohad at lutzky.net Thu Nov 20 10:47:21 2008 From: ohad at lutzky.net (Ohad Lutzky) Date: Thu, 20 Nov 2008 17:47:21 +0200 Subject: [ditz-talk] ditz ALWAYS uses less, even when outputting only like 4 lines. In-Reply-To: <8e50e92e0811200747g4056e588u916f9d122f5a6287@mail.gmail.com> References: <8e50e92e0811200747g4056e588u916f9d122f5a6287@mail.gmail.com> Message-ID: <8e50e92e0811200747r4bc11cbdp6e2832503564ec91@mail.gmail.com> On Thu, Nov 20, 2008 at 5:47 PM, Ohad Lutzky wrote: > ditz, like git, runs less with certain options by default, which > include -F which causes less to exit if the entire output can be > displayed on the screen. However, if you've set your LESS environment > variable, it won't be overridden. Consider adding F to your LESS > environment variable (echo LESS=\"F\$LESS\" >> ~/.bashrc), or > unsetting it altogether. > > On Thu, Nov 20, 2008 at 5:42 PM, Matthew Wilson wrote: >> When I run "ditz mine" it puts the results in something like a less or >> a more buffer. This is great when there are lots and lots of rows in >> the output, but when there are just like 10 lines or less, it means I >> have to press "q". >> >> Sure, I'm a princess complaining about a pea under my mattress, but is >> there some way to configure ditz so it only puts the results in a >> pager when the results are bigger than some size? >> >> Mattt >> >> -- >> Matthew Wilson >> matt at tplus1.com >> http://tplus1.com >> _______________________________________________ >> ditz-talk mailing list >> ditz-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ditz-talk >> > > > > -- > Man is the only animal that laughs and weeps, for he is the only > animal that is struck with the difference between what things are and > what they ought to be. > - William Hazlitt > > Ohad Lutzky > -- Man is the only animal that laughs and weeps, for he is the only animal that is struck with the difference between what things are and what they ought to be. - William Hazlitt Ohad Lutzky From nate at natemurray.com Thu Nov 20 12:40:42 2008 From: nate at natemurray.com (Nate Murray) Date: Thu, 20 Nov 2008 09:40:42 -0800 Subject: [ditz-talk] ditz ALWAYS uses less, even when outputting only like 4 lines. In-Reply-To: References: Message-ID: <9c1993f20811200940j51105774x7aec2ee130b8ec26@mail.gmail.com> checkout the -e and -E options of less. I have in my ~/.profile export LESS="-erXF" I believe the -E will do what you want in that it will quit automatically at end of file. Nate On Thu, Nov 20, 2008 at 7:42 AM, Matthew Wilson wrote: > When I run "ditz mine" it puts the results in something like a less or > a more buffer. This is great when there are lots and lots of rows in > the output, but when there are just like 10 lines or less, it means I > have to press "q". > > Sure, I'm a princess complaining about a pea under my mattress, but is > there some way to configure ditz so it only puts the results in a > pager when the results are bigger than some size? > > Mattt > > -- > Matthew Wilson > matt at tplus1.com > http://tplus1.com > _______________________________________________ > ditz-talk mailing list > ditz-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/ditz-talk > From wmorgan-ditz at masanjin.net Wed Nov 26 17:53:01 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Wed, 26 Nov 2008 14:53:01 -0800 Subject: [ditz-talk] [PATCH] Allow ditz claim abcd oprah In-Reply-To: <4918A745.6020604@googlemail.com> References: <49144C98.3020306@googlemail.com> <1226287071-sup-409@entry> <4918A745.6020604@googlemail.com> Message-ID: <1227739577-sup-7754@entry> Reformatted excerpts from Thomas Nichols's message of 2008-11-10: > Something like a 'ditz nick' command with add/remove? And these would > get added to the devs (better renamed as nicks or aliases) hash in > project.yaml? That sounds good. In general doing anything to project.yaml, or anything except adding a new file to .ditz/, is asking for irritating conflicts at merge time, but the usage case for this plugin is for more centralized development, so it's not as big of a deal. > Nice. So if the nick is defined, use its expansion, otherwise use the > literal string? Yep. > ? Do we: check for a valid release name, if not found check for a > valid nick/alias? Do we say it *must* be a release, so you cannot > search for all claimed tickets for a developer? Do we add a new > switch so we can > > * ditz claimed --claimer oprah > > I also smell feature creep here -- what about 'ditz mine', should that > take a --claimer switch, or perhaps an optional positional param? What > about 'ditz add', to automatically claim a ticket as it's being > entered? &c. &c. Yeah, we have to strike a balance. Currently there's no way for a plugin to add options to an existing command (only to replace it entirely), so the 'ditz add' case is solved for us. :) I'm fine with either approach for 'ditz claimed'. Probably the most friendly to the user would be for it to accept both nicknames and releases, and to error out if it's ambiguous. That's kind of how the issue hash name works: if you specify a hash prefix that's ambiguous, it just yells at you at dies. -- William From wmorgan-ditz at masanjin.net Wed Nov 26 19:07:24 2008 From: wmorgan-ditz at masanjin.net (William Morgan) Date: Wed, 26 Nov 2008 16:07:24 -0800 Subject: [ditz-talk] [PATCH] Make issue-labeling write correct label info In-Reply-To: <1227195034-sup-5106@ausone.inria.fr> References: <1226647248-27392-1-git-send-email-daniel@kalor.dk> <1226647248-27392-2-git-send-email-daniel@kalor.dk> <1226647248-27392-3-git-send-email-daniel@kalor.dk> <1226647248-27392-4-git-send-email-daniel@kalor.dk> <1227193955-sup-3449@entry> <1227195034-sup-5106@ausone.inria.fr> Message-ID: <1227744407-sup-2322@entry> Applied them all. Thanks, Daniel! -- William From daniel at kalor.dk Thu Nov 27 18:57:41 2008 From: daniel at kalor.dk (=?utf-8?q?Daniel=20Kal=C3=B8r?=) Date: Fri, 28 Nov 2008 00:57:41 +0100 Subject: [ditz-talk] [PATCH 1/2] Correct command description in icalendar plugin header Message-ID: <1227830262-5255-1-git-send-email-daniel@kalor.dk> --- lib/ditz/plugins/icalendar.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/ditz/plugins/icalendar.rb b/lib/ditz/plugins/icalendar.rb index 408b014..fde3a27 100644 --- a/lib/ditz/plugins/icalendar.rb +++ b/lib/ditz/plugins/icalendar.rb @@ -10,7 +10,7 @@ ## released. ## ## Commands added: -## ditz todo-ics: set the git branch of an issue +## ditz todo-ics: generate full todo list in iCalendar format ## ## Usage: ## 1. add a line "- icalendar" to the .ditz-plugins file in the project root -- 1.6.0.3 From daniel at kalor.dk Thu Nov 27 18:57:42 2008 From: daniel at kalor.dk (=?utf-8?q?Daniel=20Kal=C3=B8r?=) Date: Fri, 28 Nov 2008 00:57:42 +0100 Subject: [ditz-talk] [PATCH 2/2] Name plugin load error so it gets rescue'd In-Reply-To: <1227830262-5255-1-git-send-email-daniel@kalor.dk> References: <1227830262-5255-1-git-send-email-daniel@kalor.dk> Message-ID: <1227830262-5255-2-git-send-email-daniel@kalor.dk> --- bin/ditz | 2 +- lib/ditz.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/ditz b/bin/ditz index 84ee25f..04bc7a6 100755 --- a/bin/ditz +++ b/bin/ditz @@ -90,7 +90,7 @@ end begin Ditz::load_plugins $opts[:plugins_file] -rescue SystemCallError => e +rescue LoadError => e Ditz::debug "can't load plugins file: #{e.message}" end diff --git a/lib/ditz.rb b/lib/ditz.rb index 0ec7f77..5a5b88a 100644 --- a/lib/ditz.rb +++ b/lib/ditz.rb @@ -46,7 +46,7 @@ end ## my brilliant solution to the 'gem datadir' problem def find_ditz_file fn dir = $:.find { |p| File.exist? File.expand_path(File.join(p, fn)) } - raise "can't find #{fn} in any load path" unless dir + raise LoadError, "can't find #{fn} in any load path" unless dir File.expand_path File.join(dir, fn) end -- 1.6.0.3