[Bps-public-commit] SD branch, master, updated. 2b57ba33170e8356a51d68f042c6f26872636516

spang at bestpractical.com spang at bestpractical.com
Thu Aug 20 16:10:05 EDT 2009


The branch, master has been updated
       via  2b57ba33170e8356a51d68f042c6f26872636516 (commit)
       via  831f58dca13dff2e2aa54f4ac1c597a7e2534948 (commit)
       via  9b5d23dea497dd81e7744a18c774fe3c15cd4e00 (commit)
      from  715dea1d10d35be32b612bf4ca0f28ce60cfe812 (commit)

Summary of changes:
 lib/App/SD/CLI/Command/Help/Attachments.pm |    4 +---
 lib/App/SD/CLI/Command/Help/Comments.pm    |    8 ++------
 lib/App/SD/CLI/Command/Help/History.pm     |    4 +---
 lib/App/SD/CLI/Command/Help/Search.pm      |   20 +++++---------------
 lib/App/SD/CLI/Command/Help/Sync.pm        |    5 +----
 lib/App/SD/CLI/Command/Help/Tickets.pm     |   17 +++++------------
 lib/App/SD/CLI/Dispatcher.pm               |    6 +++++-
 7 files changed, 20 insertions(+), 44 deletions(-)

- Log -----------------------------------------------------------------
commit 9b5d23dea497dd81e7744a18c774fe3c15cd4e00
Author: Christine Spang <spang at bestpractical.com>
Date:   Thu Aug 20 20:30:10 2009 +0100

    Kill double-entries for shortcuts in help docs

diff --git a/lib/App/SD/CLI/Command/Help/Attachments.pm b/lib/App/SD/CLI/Command/Help/Attachments.pm
index ca0cee4..1bb921c 100644
--- a/lib/App/SD/CLI/Command/Help/Attachments.pm
+++ b/lib/App/SD/CLI/Command/Help/Attachments.pm
@@ -10,10 +10,8 @@ sub run {
 print <<EOF
 
     ${cmd}ticket attachment create 456 --file bugfix.patch
-      Create a new attachment on this ticket from the file 'bugfix.patch'.
-
     ${cmd}ticket attachment create 456 -f bugfix.patch
-      -f is a shortcut for --file for this command.
+      Create a new attachment on this ticket from the file 'bugfix.patch'.
 
     ${cmd}ticket attachment list 456
       Show all attachemnts on ticket 456.
diff --git a/lib/App/SD/CLI/Command/Help/Comments.pm b/lib/App/SD/CLI/Command/Help/Comments.pm
index 58a33df..d3a009c 100644
--- a/lib/App/SD/CLI/Command/Help/Comments.pm
+++ b/lib/App/SD/CLI/Command/Help/Comments.pm
@@ -13,18 +13,14 @@ print <<EOF
       Add a comment to the ticket with id 456, popping up a text editor.
 
     ${cmd}ticket comment 456 --file=myfile
-      Add a comment to the ticket with id 456, using the content of 'myfile'.
-
     ${cmd}ticket comment 456 -f myfile
-      -f is a shortcut for --file for this command.
+      Add a comment to the ticket with id 456, using the content of 'myfile'.
 
     ${cmd}ticket comment 456 --content="The text of the comment."
+    ${cmd}ticket comment 456 -m "The text of the comment."
       Add a comment to the ticket with id 456, specifying its content on
       the commandline.
 
-    ${cmd}ticket comment 456 -m "The text of the comment."
-      -m is a shortcut for --content for this command.
-
     ${cmd}ticket comment list
       List all ticket comments.
 
diff --git a/lib/App/SD/CLI/Command/Help/History.pm b/lib/App/SD/CLI/Command/Help/History.pm
index c17ea49..1d44352 100644
--- a/lib/App/SD/CLI/Command/Help/History.pm
+++ b/lib/App/SD/CLI/Command/Help/History.pm
@@ -15,10 +15,8 @@ command. It can be run in the following ways:
       Shows the last 20 changes.
 
     ${cmd}log --all
-      Shows the entire history from start to end.
-
     ${cmd}log -a
-      -a is a shortcut for --all.
+      Shows the entire history from start to end.
 
     ${cmd}log <since>..<until>
       Shows the range of history starting at <since> and ending at
diff --git a/lib/App/SD/CLI/Command/Help/Search.pm b/lib/App/SD/CLI/Command/Help/Search.pm
index fcff979..6ecdd4b 100644
--- a/lib/App/SD/CLI/Command/Help/Search.pm
+++ b/lib/App/SD/CLI/Command/Help/Search.pm
@@ -22,19 +22,15 @@ print <<EOF
       and a summary matching 'http'.
 
     ${cmd}ticket search --group owner
+    ${cmd}ticket search -g owner
        List all tickets with a status that does not match 'closed', 
        grouped by owner.
 
-    ${cmd}ticket search -g owner
-      -g is a shortcut for --group for this command.
-
     ${cmd}ticket search --sort due
+    ${cmd}ticket search -s due
        List all tickets with a status that does not match 'closed',
        sorted by due date.
 
-    ${cmd}ticket search -s due
-      -s is a shortcut for --sort for this command.
-
     ${cmd}ticket basics 1234
       Show basic information (metadata only) for the ticket with local id 1234.
 
@@ -43,28 +39,22 @@ print <<EOF
       id 1234.  ('details' is an alias for 'show')
 
     ${cmd}ticket show 1234 --all-props
+    ${cmd}ticket show 1234 -a
       Show all properties of the given ticket, even if they aren't in
       the database setting common_ticket_props (or local configuration
       variable 'common_ticket_props' if it exists).
 
-    ${cmd}ticket show 1234 -a
-      -a is a shortcut for --all-props for this command.
-
     ${cmd}ticket show 1234 --skip-history
+    ${cmd}ticket show 1234 -s
       Show only metadata and comments for the ticket 1234 (but not
       history).
 
-    ${cmd}ticket show 1234 -s
-      -s is a shortcut for --skip-history for this command.
-
     ${cmd}ticket show 1234 --with-history
+    ${cmd}ticket show 1234 -h
       Override the disable_ticket_show_history_by_default config option
       if it is set for this database. (See '${cmd}help config' for
       more info.)
 
-    ${cmd}ticket show 1234 -h
-      -h is a shortcut for --with-history for this command.
-
     ${cmd}ticket history 1234
       Show history for the ticket with local id 1234.
 
diff --git a/lib/App/SD/CLI/Command/Help/Sync.pm b/lib/App/SD/CLI/Command/Help/Sync.pm
index 0ecbf93..1327528 100644
--- a/lib/App/SD/CLI/Command/Help/Sync.pm
+++ b/lib/App/SD/CLI/Command/Help/Sync.pm
@@ -38,15 +38,12 @@ print <<EOF
       computer.
 
     ${cmd}server --writable --port 9876
+    ${cmd}server -w -p 9876
       Start an sd replica server on port 9876, with UNAUTHENTICATED,
       PUBLIC WRITE ACCESS via HTTP POST.  This command will make your
       replica modifiable, browsable and pullable by ANYONE with remote
       access to your computer.
 
-    ${cmd}server -w -p 9876
-      -w is a shortcut for --writable and -p is a shortcut for --port
-      for this command.
-
 SD can sync to external systems as well as itself. Currently, there 
 are foreign replica types for:
 
diff --git a/lib/App/SD/CLI/Command/Help/Tickets.pm b/lib/App/SD/CLI/Command/Help/Tickets.pm
index a9e7119..0f17667 100644
--- a/lib/App/SD/CLI/Command/Help/Tickets.pm
+++ b/lib/App/SD/CLI/Command/Help/Tickets.pm
@@ -13,13 +13,11 @@ print <<EOF
       Note that 'new' is an alias for 'create'.
 
     ${cmd}ticket create --verbose
+    ${cmd}ticket create -v
       Invokes a text editor with a ticket creation template
       and also shows descriptions and valid values for
       properties.
 
-    ${cmd}ticket create -v
-      -v is a shortcut for --verbose for this command.
-
     ${cmd}ticket create -- summary="This is a summary" status=open
       Create a new ticket non-interactively.
 
@@ -32,21 +30,17 @@ print <<EOF
       editor.
 
     ${cmd}ticket update 123 --verbose
+    ${cmd}ticket update 123 -v
       Interactively update the ticket with local id 123 in a text
       editor and show descriptions and valid values for props.
 
-    ${cmd}ticket update 123 -v
-      -v is a shortcut for --verbose for this command.
-
     ${cmd}ticket update 123 --all-props
+    ${cmd}ticket update 123 -a
       Interactively update the ticket with local id 123 in a text
       editor, presenting all the props of the record for editing instead of
       just those specified by the database setting 'common_ticket_props'
       (or local configuration variable 'common_ticket_props' if it exists).
 
-    ${cmd}ticket update 123 -a
-      -a is a shortcut for --all-props for this command.
-
     ${cmd}ticket update fad5849a-67f1-11dd-bde1-5b33d3ff2799 -- status=closed
       Sets the status of the ticket with uuid
       fad5849a-67f1-11dd-bde1-5b33d3ff2799 to closed.
@@ -61,15 +55,14 @@ print <<EOF
       An alias of 'give' is 'assign'.
 
     ${cmd}ticket resolve 123
+    ${cmd}ticket close 123
       Sets the status of the ticket with local id 123 to closed.
 
     ${cmd}ticket resolve 123 --edit
+    ${cmd}ticket resolve 123 -e
       Sets the status of the ticket with local id 123 to closed,
       allowing you to edit any properties in an editor and
       optionally add a comment in the process.
-
-    ${cmd}ticket resolve 123 -e
-      -e is a shortcut for --edit for this command.
 EOF
 
 }

commit 831f58dca13dff2e2aa54f4ac1c597a7e2534948
Author: Christine Spang <spang at bestpractical.com>
Date:   Thu Aug 20 20:32:22 2009 +0100

    Add dispatcher rule to redirect 'help ticket <whatever>' to 'help tickets'
    
    (As long as it's not covered by another rule.)
    Closes: B7EEC4B8-718F-11DE-919C-DF0E2BC923CF

diff --git a/lib/App/SD/CLI/Dispatcher.pm b/lib/App/SD/CLI/Dispatcher.pm
index c25a53f..44c060e 100644
--- a/lib/App/SD/CLI/Dispatcher.pm
+++ b/lib/App/SD/CLI/Dispatcher.pm
@@ -47,6 +47,10 @@ under help => sub {
         ['list', 'search', 'find'],
     ] => run_command('Help::Search');
 
+    # anything else under ticket, e.g. 'ticket close' etc. should be covered
+    # in the tickets help
+    on qr/^ticket/ => run_command('Help::Tickets');
+
     on [ ['search', 'list', 'find'] ] => run_command('Help::Search');
 
     on [ ['sync', 'push', 'pull', 'publish', 'server','clone'] ]

commit 2b57ba33170e8356a51d68f042c6f26872636516
Author: Christine Spang <spang at bestpractical.com>
Date:   Thu Aug 20 20:32:32 2009 +0100

    Kill sneaky tabs

diff --git a/lib/App/SD/CLI/Dispatcher.pm b/lib/App/SD/CLI/Dispatcher.pm
index 44c060e..ba04bdc 100644
--- a/lib/App/SD/CLI/Dispatcher.pm
+++ b/lib/App/SD/CLI/Dispatcher.pm
@@ -92,7 +92,7 @@ on qr'.*' => sub {
 
     print join("\n","No SD database was found at " . $self->cli->app_handle->handle->url(),
                qq{Type "} . $self->cli->get_script_name(). qq{help init" or "}. 
-			   $self->cli->get_script_name().qq{help environment" for tips on how to sort that out.});
+               $self->cli->get_script_name().qq{help environment" for tips on how to sort that out.});
     exit 1;
 };
 

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list