Fossil SCM

completed work on ticket command, optimized the help text

wolfgang 2010-10-06 09:24 wolfgangTicketCmd
Commit d6be2068d3193524aeb78528394dd9375edb7ed7
1 file changed +10 -8
+10 -8
--- src/tkt.c
+++ src/tkt.c
@@ -843,18 +843,20 @@
843843
**
844844
** options can be:
845845
** ?-l|--limit LIMITCHAR?
846846
** ?-q|--quote?
847847
**
848
-** Run the the ticket report, identified by the report title
848
+** Run the the ticket report, identified by the report format title
849849
** used in the gui. The data is written as flat file on stdout,
850850
** using "," as separator. The seperator "," can be changed using
851851
** the -l or --limit option.
852852
** If TICKETFILTER is given on the commandline, the query is
853853
** limited with a new WHERE-condition.
854854
** example: Report lists a column # with the uuid
855855
** TICKETFILTER may be [#]='uuuuuuuuu'
856
+** example: Report only lists rows with status not open
857
+** TICKETFILTER: status != 'open'
856858
** If the option -q|--quote is used, the tickets are encoded by
857859
** quoting special chars(space -> \\s, tab -> \\t, newline -> \\n,
858860
** cr -> \\r, formfeed -> \\f, vtab -> \\v, nul -> \\0, \\ -> \\\\).
859861
** Otherwise, the simplified encoding as on the show report raw
860862
** page in the gui is used.
@@ -861,13 +863,13 @@
861863
**
862864
** Instead of the report title its possible to use the report
863865
** number. Using the special report number 0 list all columns,
864866
** defined in the ticket table.
865867
**
866
-** %fossil ticket list
868
+** %fossil ticket fieldlist
867869
**
868
-** list all columns, defined in the ticket table
870
+** list all fields, defined for ticket in the fossil repository
869871
**
870872
** %fossil ticket set TICKETUUID FIELD VALUE ?FIELD VALUE .. ? ?-q|--quote?
871873
** %fossil ticket change TICKETUUID FIELD VALUE ?FIELD VALUE .. ? ?-q|--quote?
872874
**
873875
** change ticket identified by TICKETUUID and set the value of
@@ -877,11 +879,11 @@
877879
** Field names given above are the ones, defined in a standard
878880
** fossil environment. If you have added, deleted columns, you
879881
** change the all your configured columns.
880882
** You can use more than one field/value pair on the commandline.
881883
** Using -q|--quote enables the special character decoding as
882
-** in "ticket list". So it's possible, to set multiline text or
884
+** in "ticket show". So it's possible, to set multiline text or
883885
** text with special characters.
884886
**
885887
** %fossil ticket add FIELD VALUE ?FIELD VALUE .. ? ?-q|--quote?
886888
**
887889
** like set, but create a new ticket with the given values.
@@ -902,17 +904,17 @@
902904
if( !db_exists("SELECT 1 FROM user WHERE login=%Q", g.zLogin) ){
903905
fossil_fatal("no such user: %s", g.zLogin);
904906
}
905907
906908
if( g.argc<3 ){
907
- usage("add|list|set|show");
909
+ usage("add|fieldlist|set|show");
908910
}else{
909911
n = strlen(g.argv[2]);
910912
if( n==1 && g.argv[2][0]=='s' ){
911913
/* set/show cannot be distinguished, so show the usage */
912
- usage("add|list|set|show");
913
- }else if( strncmp(g.argv[2],"list",n)==0 ){
914
+ usage("add|fieldlist|set|show");
915
+ }else if( strncmp(g.argv[2],"fieldlist",n)==0 ){
914916
/* simply show all field names */
915917
int i;
916918
917919
/* read all available ticket fields */
918920
getAllTicketFields();
@@ -971,11 +973,11 @@
971973
i = 3;
972974
zTktUuid = db_text(0, "SELECT lower(hex(randomblob(20)))");
973975
}
974976
/* none of set/add, so show the usage! */
975977
if( eCmd==err ){
976
- usage("add|list|set|show");
978
+ usage("add|fieldlist|set|show");
977979
}
978980
979981
/* read all given ticket field/value pairs from command line */
980982
if( i==g.argc ){
981983
fossil_fatal("empty %s command aborted!",g.argv[2]);
982984
--- src/tkt.c
+++ src/tkt.c
@@ -843,18 +843,20 @@
843 **
844 ** options can be:
845 ** ?-l|--limit LIMITCHAR?
846 ** ?-q|--quote?
847 **
848 ** Run the the ticket report, identified by the report title
849 ** used in the gui. The data is written as flat file on stdout,
850 ** using "," as separator. The seperator "," can be changed using
851 ** the -l or --limit option.
852 ** If TICKETFILTER is given on the commandline, the query is
853 ** limited with a new WHERE-condition.
854 ** example: Report lists a column # with the uuid
855 ** TICKETFILTER may be [#]='uuuuuuuuu'
 
 
856 ** If the option -q|--quote is used, the tickets are encoded by
857 ** quoting special chars(space -> \\s, tab -> \\t, newline -> \\n,
858 ** cr -> \\r, formfeed -> \\f, vtab -> \\v, nul -> \\0, \\ -> \\\\).
859 ** Otherwise, the simplified encoding as on the show report raw
860 ** page in the gui is used.
@@ -861,13 +863,13 @@
861 **
862 ** Instead of the report title its possible to use the report
863 ** number. Using the special report number 0 list all columns,
864 ** defined in the ticket table.
865 **
866 ** %fossil ticket list
867 **
868 ** list all columns, defined in the ticket table
869 **
870 ** %fossil ticket set TICKETUUID FIELD VALUE ?FIELD VALUE .. ? ?-q|--quote?
871 ** %fossil ticket change TICKETUUID FIELD VALUE ?FIELD VALUE .. ? ?-q|--quote?
872 **
873 ** change ticket identified by TICKETUUID and set the value of
@@ -877,11 +879,11 @@
877 ** Field names given above are the ones, defined in a standard
878 ** fossil environment. If you have added, deleted columns, you
879 ** change the all your configured columns.
880 ** You can use more than one field/value pair on the commandline.
881 ** Using -q|--quote enables the special character decoding as
882 ** in "ticket list". So it's possible, to set multiline text or
883 ** text with special characters.
884 **
885 ** %fossil ticket add FIELD VALUE ?FIELD VALUE .. ? ?-q|--quote?
886 **
887 ** like set, but create a new ticket with the given values.
@@ -902,17 +904,17 @@
902 if( !db_exists("SELECT 1 FROM user WHERE login=%Q", g.zLogin) ){
903 fossil_fatal("no such user: %s", g.zLogin);
904 }
905
906 if( g.argc<3 ){
907 usage("add|list|set|show");
908 }else{
909 n = strlen(g.argv[2]);
910 if( n==1 && g.argv[2][0]=='s' ){
911 /* set/show cannot be distinguished, so show the usage */
912 usage("add|list|set|show");
913 }else if( strncmp(g.argv[2],"list",n)==0 ){
914 /* simply show all field names */
915 int i;
916
917 /* read all available ticket fields */
918 getAllTicketFields();
@@ -971,11 +973,11 @@
971 i = 3;
972 zTktUuid = db_text(0, "SELECT lower(hex(randomblob(20)))");
973 }
974 /* none of set/add, so show the usage! */
975 if( eCmd==err ){
976 usage("add|list|set|show");
977 }
978
979 /* read all given ticket field/value pairs from command line */
980 if( i==g.argc ){
981 fossil_fatal("empty %s command aborted!",g.argv[2]);
982
--- src/tkt.c
+++ src/tkt.c
@@ -843,18 +843,20 @@
843 **
844 ** options can be:
845 ** ?-l|--limit LIMITCHAR?
846 ** ?-q|--quote?
847 **
848 ** Run the the ticket report, identified by the report format title
849 ** used in the gui. The data is written as flat file on stdout,
850 ** using "," as separator. The seperator "," can be changed using
851 ** the -l or --limit option.
852 ** If TICKETFILTER is given on the commandline, the query is
853 ** limited with a new WHERE-condition.
854 ** example: Report lists a column # with the uuid
855 ** TICKETFILTER may be [#]='uuuuuuuuu'
856 ** example: Report only lists rows with status not open
857 ** TICKETFILTER: status != 'open'
858 ** If the option -q|--quote is used, the tickets are encoded by
859 ** quoting special chars(space -> \\s, tab -> \\t, newline -> \\n,
860 ** cr -> \\r, formfeed -> \\f, vtab -> \\v, nul -> \\0, \\ -> \\\\).
861 ** Otherwise, the simplified encoding as on the show report raw
862 ** page in the gui is used.
@@ -861,13 +863,13 @@
863 **
864 ** Instead of the report title its possible to use the report
865 ** number. Using the special report number 0 list all columns,
866 ** defined in the ticket table.
867 **
868 ** %fossil ticket fieldlist
869 **
870 ** list all fields, defined for ticket in the fossil repository
871 **
872 ** %fossil ticket set TICKETUUID FIELD VALUE ?FIELD VALUE .. ? ?-q|--quote?
873 ** %fossil ticket change TICKETUUID FIELD VALUE ?FIELD VALUE .. ? ?-q|--quote?
874 **
875 ** change ticket identified by TICKETUUID and set the value of
@@ -877,11 +879,11 @@
879 ** Field names given above are the ones, defined in a standard
880 ** fossil environment. If you have added, deleted columns, you
881 ** change the all your configured columns.
882 ** You can use more than one field/value pair on the commandline.
883 ** Using -q|--quote enables the special character decoding as
884 ** in "ticket show". So it's possible, to set multiline text or
885 ** text with special characters.
886 **
887 ** %fossil ticket add FIELD VALUE ?FIELD VALUE .. ? ?-q|--quote?
888 **
889 ** like set, but create a new ticket with the given values.
@@ -902,17 +904,17 @@
904 if( !db_exists("SELECT 1 FROM user WHERE login=%Q", g.zLogin) ){
905 fossil_fatal("no such user: %s", g.zLogin);
906 }
907
908 if( g.argc<3 ){
909 usage("add|fieldlist|set|show");
910 }else{
911 n = strlen(g.argv[2]);
912 if( n==1 && g.argv[2][0]=='s' ){
913 /* set/show cannot be distinguished, so show the usage */
914 usage("add|fieldlist|set|show");
915 }else if( strncmp(g.argv[2],"fieldlist",n)==0 ){
916 /* simply show all field names */
917 int i;
918
919 /* read all available ticket fields */
920 getAllTicketFields();
@@ -971,11 +973,11 @@
973 i = 3;
974 zTktUuid = db_text(0, "SELECT lower(hex(randomblob(20)))");
975 }
976 /* none of set/add, so show the usage! */
977 if( eCmd==err ){
978 usage("add|fieldlist|set|show");
979 }
980
981 /* read all given ticket field/value pairs from command line */
982 if( i==g.argc ){
983 fossil_fatal("empty %s command aborted!",g.argv[2]);
984

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button