Fossil SCM

Rename --detail, --showfiles, --files to -v|--verbose (but keep original as deprecated)

jan.nijtmans 2013-04-26 08:28 UTC trunk
Commit 34ed0afc8ac538d802db2a60413d5618ba73460a
+9 -9
--- src/event.c
+++ src/event.c
@@ -43,11 +43,11 @@
4343
** WEBPAGE: event
4444
** URL: /event
4545
** PARAMETERS:
4646
**
4747
** name=EVENTID // Identify the event to display EVENTID must be complete
48
-** detail=BOOLEAN // Show details if TRUE. Default is FALSE. Optional.
48
+** v=BOOLEAN // Show details if TRUE. Default is FALSE. Optional.
4949
** aid=ARTIFACTID // Which specific version of the event. Optional.
5050
**
5151
** Display an existing event identified by EVENTID
5252
*/
5353
void event_page(void){
@@ -61,11 +61,11 @@
6161
Manifest *pEvent; /* Parsed event artifact */
6262
Blob fullbody; /* Complete content of the event body */
6363
Blob title; /* Title extracted from the event body */
6464
Blob tail; /* Event body that comes after the title */
6565
Stmt q1; /* Query to search for the event */
66
- int showDetail; /* True to show details */
66
+ int verboseFlag; /* True to show details */
6767
6868
6969
/* wiki-read privilege is needed in order to read events.
7070
*/
7171
login_check_credentials();
@@ -101,11 +101,11 @@
101101
@ Cannot locate specified event
102102
style_footer();
103103
return;
104104
}
105105
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
106
- showDetail = atoi(PD("detail","0"));
106
+ verboseFlag = atoi(PD("verbose","0"));
107107
108108
/* Extract the event content.
109109
*/
110110
pEvent = manifest_get(rid, CFTYPE_EVENT);
111111
if( pEvent==0 ){
@@ -124,37 +124,37 @@
124124
}
125125
zETime = db_text(0, "SELECT datetime(%.17g)", pEvent->rEventDate);
126126
style_submenu_element("Context", "Context", "%s/timeline?c=%T",
127127
g.zTop, zETime);
128128
if( g.perm.Hyperlink ){
129
- if( showDetail ){
129
+ if( verboseFlag ){
130130
style_submenu_element("Plain", "Plain", "%s/event?name=%s&aid=%s",
131131
g.zTop, zEventId, zUuid);
132132
if( nextRid ){
133133
char *zNext;
134134
zNext = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nextRid);
135135
style_submenu_element("Next", "Next",
136
- "%s/event?name=%s&aid=%s&detail=1",
136
+ "%s/event?name=%s&aid=%s&v=1",
137137
g.zTop, zEventId, zNext);
138138
free(zNext);
139139
}
140140
if( prevRid ){
141141
char *zPrev;
142142
zPrev = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", prevRid);
143143
style_submenu_element("Prev", "Prev",
144
- "%s/event?name=%s&aid=%s&detail=1",
144
+ "%s/event?name=%s&aid=%s&v=1",
145145
g.zTop, zEventId, zPrev);
146146
free(zPrev);
147147
}
148148
}else{
149
- style_submenu_element("Detail", "Detail",
150
- "%s/event?name=%s&aid=%s&detail=1",
149
+ style_submenu_element("Details", "Details",
150
+ "%s/event?name=%s&aid=%s&v=1",
151151
g.zTop, zEventId, zUuid);
152152
}
153153
}
154154
155
- if( showDetail && g.perm.Hyperlink ){
155
+ if( verboseFlag && g.perm.Hyperlink ){
156156
int i;
157157
const char *zClr = 0;
158158
Blob comment;
159159
160160
zATime = db_text(0, "SELECT datetime(%.17g)", pEvent->rDate);
161161
--- src/event.c
+++ src/event.c
@@ -43,11 +43,11 @@
43 ** WEBPAGE: event
44 ** URL: /event
45 ** PARAMETERS:
46 **
47 ** name=EVENTID // Identify the event to display EVENTID must be complete
48 ** detail=BOOLEAN // Show details if TRUE. Default is FALSE. Optional.
49 ** aid=ARTIFACTID // Which specific version of the event. Optional.
50 **
51 ** Display an existing event identified by EVENTID
52 */
53 void event_page(void){
@@ -61,11 +61,11 @@
61 Manifest *pEvent; /* Parsed event artifact */
62 Blob fullbody; /* Complete content of the event body */
63 Blob title; /* Title extracted from the event body */
64 Blob tail; /* Event body that comes after the title */
65 Stmt q1; /* Query to search for the event */
66 int showDetail; /* True to show details */
67
68
69 /* wiki-read privilege is needed in order to read events.
70 */
71 login_check_credentials();
@@ -101,11 +101,11 @@
101 @ Cannot locate specified event
102 style_footer();
103 return;
104 }
105 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
106 showDetail = atoi(PD("detail","0"));
107
108 /* Extract the event content.
109 */
110 pEvent = manifest_get(rid, CFTYPE_EVENT);
111 if( pEvent==0 ){
@@ -124,37 +124,37 @@
124 }
125 zETime = db_text(0, "SELECT datetime(%.17g)", pEvent->rEventDate);
126 style_submenu_element("Context", "Context", "%s/timeline?c=%T",
127 g.zTop, zETime);
128 if( g.perm.Hyperlink ){
129 if( showDetail ){
130 style_submenu_element("Plain", "Plain", "%s/event?name=%s&aid=%s",
131 g.zTop, zEventId, zUuid);
132 if( nextRid ){
133 char *zNext;
134 zNext = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nextRid);
135 style_submenu_element("Next", "Next",
136 "%s/event?name=%s&aid=%s&detail=1",
137 g.zTop, zEventId, zNext);
138 free(zNext);
139 }
140 if( prevRid ){
141 char *zPrev;
142 zPrev = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", prevRid);
143 style_submenu_element("Prev", "Prev",
144 "%s/event?name=%s&aid=%s&detail=1",
145 g.zTop, zEventId, zPrev);
146 free(zPrev);
147 }
148 }else{
149 style_submenu_element("Detail", "Detail",
150 "%s/event?name=%s&aid=%s&detail=1",
151 g.zTop, zEventId, zUuid);
152 }
153 }
154
155 if( showDetail && g.perm.Hyperlink ){
156 int i;
157 const char *zClr = 0;
158 Blob comment;
159
160 zATime = db_text(0, "SELECT datetime(%.17g)", pEvent->rDate);
161
--- src/event.c
+++ src/event.c
@@ -43,11 +43,11 @@
43 ** WEBPAGE: event
44 ** URL: /event
45 ** PARAMETERS:
46 **
47 ** name=EVENTID // Identify the event to display EVENTID must be complete
48 ** v=BOOLEAN // Show details if TRUE. Default is FALSE. Optional.
49 ** aid=ARTIFACTID // Which specific version of the event. Optional.
50 **
51 ** Display an existing event identified by EVENTID
52 */
53 void event_page(void){
@@ -61,11 +61,11 @@
61 Manifest *pEvent; /* Parsed event artifact */
62 Blob fullbody; /* Complete content of the event body */
63 Blob title; /* Title extracted from the event body */
64 Blob tail; /* Event body that comes after the title */
65 Stmt q1; /* Query to search for the event */
66 int verboseFlag; /* True to show details */
67
68
69 /* wiki-read privilege is needed in order to read events.
70 */
71 login_check_credentials();
@@ -101,11 +101,11 @@
101 @ Cannot locate specified event
102 style_footer();
103 return;
104 }
105 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
106 verboseFlag = atoi(PD("verbose","0"));
107
108 /* Extract the event content.
109 */
110 pEvent = manifest_get(rid, CFTYPE_EVENT);
111 if( pEvent==0 ){
@@ -124,37 +124,37 @@
124 }
125 zETime = db_text(0, "SELECT datetime(%.17g)", pEvent->rEventDate);
126 style_submenu_element("Context", "Context", "%s/timeline?c=%T",
127 g.zTop, zETime);
128 if( g.perm.Hyperlink ){
129 if( verboseFlag ){
130 style_submenu_element("Plain", "Plain", "%s/event?name=%s&aid=%s",
131 g.zTop, zEventId, zUuid);
132 if( nextRid ){
133 char *zNext;
134 zNext = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nextRid);
135 style_submenu_element("Next", "Next",
136 "%s/event?name=%s&aid=%s&v=1",
137 g.zTop, zEventId, zNext);
138 free(zNext);
139 }
140 if( prevRid ){
141 char *zPrev;
142 zPrev = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", prevRid);
143 style_submenu_element("Prev", "Prev",
144 "%s/event?name=%s&aid=%s&v=1",
145 g.zTop, zEventId, zPrev);
146 free(zPrev);
147 }
148 }else{
149 style_submenu_element("Details", "Details",
150 "%s/event?name=%s&aid=%s&v=1",
151 g.zTop, zEventId, zUuid);
152 }
153 }
154
155 if( verboseFlag && g.perm.Hyperlink ){
156 int i;
157 const char *zClr = 0;
158 Blob comment;
159
160 zATime = db_text(0, "SELECT datetime(%.17g)", pEvent->rDate);
161
+25 -22
--- src/info.c
+++ src/info.c
@@ -171,17 +171,20 @@
171171
** file in a checkout.
172172
**
173173
** Options:
174174
**
175175
** -R|--repository FILE Extract info from repository FILE
176
-** -l|--detail Show extra information
176
+** -v|--verbose Show extra information
177177
**
178178
** See also: annotate, artifact, finfo, timeline
179179
*/
180180
void info_cmd(void){
181181
i64 fsize;
182
- int bDetail = find_option("detail","l",0)!=0;
182
+ int verboseFlag = find_option("verbose","v",0)!=0;
183
+ if ( !verboseFlag ){
184
+ verboseFlag = find_option("detail","l",0)!=0; /* deprecated */
185
+ }
183186
if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){
184187
db_open_config(0);
185188
db_record_repository_filename(g.argv[2]);
186189
db_open_repository(g.argv[2]);
187190
fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>"));
@@ -197,11 +200,11 @@
197200
fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>"));
198201
if( g.localOpen ){
199202
fossil_print("repository: %s\n", db_repository_filename());
200203
fossil_print("local-root: %s\n", g.zLocalRoot);
201204
}
202
- if( bDetail ) extraRepoInfo();
205
+ if( verboseFlag ) extraRepoInfo();
203206
if( g.zConfigDbName ){
204207
fossil_print("config-db: %s\n", g.zConfigDbName);
205208
}
206209
fossil_print("project-code: %s\n", db_get("project-code", ""));
207210
vid = g.localOpen ? db_lget_int("checkout", 0) : 0;
@@ -397,13 +400,13 @@
397400
398401
/*
399402
** Construct an appropriate diffFlag for text_diff() based on query
400403
** parameters and the to boolean arguments.
401404
*/
402
-u64 construct_diff_flags(int showDiff, int sideBySide){
405
+u64 construct_diff_flags(int verboseFlag, int sideBySide){
403406
u64 diffFlags;
404
- if( showDiff==0 ){
407
+ if( verboseFlag==0 ){
405408
diffFlags = 0; /* Zero means do not show any diff */
406409
}else{
407410
int x;
408411
if( sideBySide ){
409412
diffFlags = DIFF_SIDEBYSIDE | DIFF_IGNORE_EOLWS;
@@ -445,11 +448,11 @@
445448
*/
446449
void ci_page(void){
447450
Stmt q;
448451
int rid;
449452
int isLeaf;
450
- int showDiff; /* True to show diffs */
453
+ int verboseFlag; /* True to show diffs */
451454
int sideBySide; /* True for side-by-side diffs */
452455
u64 diffFlags; /* Flag parameter for text_diff() */
453456
const char *zName; /* Name of the checkin to be displayed */
454457
const char *zUuid; /* UUID of zName */
455458
const char *zParent; /* UUID of the parent checkin (if any) */
@@ -606,14 +609,14 @@
606609
db_finalize(&q);
607610
showTags(rid, "");
608611
if( zParent ){
609612
@ <div class="section">Changes</div>
610613
@ <div class="sectionmenu">
611
- showDiff = g.zPath[0]!='c';
614
+ verboseFlag = g.zPath[0]!='c';
612615
if( db_get_boolean("show-version-diffs", 0)==0 ){
613
- showDiff = !showDiff;
614
- if( showDiff ){
616
+ verboseFlag = !verboseFlag;
617
+ if( verboseFlag ){
615618
@ %z(xhref("class='button'","%R/vinfo/%T",zName))
616619
@ hide&nbsp;diffs</a>
617620
if( sideBySide ){
618621
@ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName))
619622
@ unified&nbsp;diffs</a>
@@ -626,11 +629,11 @@
626629
@ show&nbsp;unified&nbsp;diffs</a>
627630
@ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName))
628631
@ show&nbsp;side-by-side&nbsp;diffs</a>
629632
}
630633
}else{
631
- if( showDiff ){
634
+ if( verboseFlag ){
632635
@ %z(xhref("class='button'","%R/ci/%T",zName))hide&nbsp;diffs</a>
633636
if( sideBySide ){
634637
@ %z(xhref("class='button'","%R/info/%T?sbs=0",zName))
635638
@ unified&nbsp;diffs</a>
636639
}else{
@@ -661,11 +664,11 @@
661664
" AND (mlink.fid>0"
662665
" OR mlink.fnid NOT IN (SELECT pfnid FROM mlink WHERE mid=%d))"
663666
" ORDER BY name /*sort*/",
664667
rid, rid
665668
);
666
- diffFlags = construct_diff_flags(showDiff, sideBySide);
669
+ diffFlags = construct_diff_flags(verboseFlag, sideBySide);
667670
while( db_step(&q)==SQLITE_ROW ){
668671
const char *zName = db_column_text(&q,0);
669672
int mperm = db_column_int(&q, 1);
670673
const char *zOld = db_column_text(&q,2);
671674
const char *zNew = db_column_text(&q,3);
@@ -875,19 +878,19 @@
875878
** Query parameters:
876879
**
877880
** from=TAG
878881
** to=TAG
879882
** branch=TAG
880
-** detail=BOOLEAN
883
+** v=BOOLEAN
881884
** sbs=BOOLEAN
882885
**
883886
**
884887
** Show all differences between two checkins.
885888
*/
886889
void vdiff_page(void){
887890
int ridFrom, ridTo;
888
- int showDetail = 0;
891
+ int verboseFlag = 0;
889892
int sideBySide = 0;
890893
u64 diffFlags = 0;
891894
Manifest *pFrom, *pTo;
892895
ManifestFile *pFileFrom, *pFileTo;
893896
const char *zBranch;
@@ -910,26 +913,26 @@
910913
pTo = vdiff_parse_manifest("to", &ridTo);
911914
if( pTo==0 ) return;
912915
pFrom = vdiff_parse_manifest("from", &ridFrom);
913916
if( pFrom==0 ) return;
914917
sideBySide = atoi(PD("sbs","1"));
915
- showDetail = atoi(PD("detail","0"));
916
- if( !showDetail && sideBySide ) showDetail = 1;
918
+ verboseFlag = atoi(PD("v","0"));
919
+ if( !verboseFlag && sideBySide ) verboseFlag = 1;
917920
zFrom = P("from");
918921
zTo = P("to");
919922
if( !sideBySide ){
920923
style_submenu_element("Side-by-side Diff", "sbsdiff",
921
- "%R/vdiff?from=%T&to=%T&detail=%d&sbs=1",
922
- zFrom, zTo, showDetail);
924
+ "%R/vdiff?from=%T&to=%T&v=%d&sbs=1",
925
+ zFrom, zTo, verboseFlag);
923926
}else{
924927
style_submenu_element("Unified Diff", "udiff",
925
- "%R/vdiff?from=%T&to=%T&detail=%d&sbs=0",
926
- zFrom, zTo, showDetail);
928
+ "%R/vdiff?from=%T&to=%T&v=%d&sbs=0",
929
+ zFrom, zTo, verboseFlag);
927930
}
928931
style_submenu_element("Invert", "invert",
929
- "%R/vdiff?from=%T&to=%T&detail=%d&sbs=%d",
930
- zTo, zFrom, showDetail, sideBySide);
932
+ "%R/vdiff?from=%T&to=%T&v=%d&sbs=%d",
933
+ zTo, zFrom, verboseFlag, sideBySide);
931934
style_header("Check-in Differences");
932935
@ <h2>Difference From:</h2><blockquote>
933936
checkin_description(ridFrom);
934937
@ </blockquote><h2>To:</h2><blockquote>
935938
checkin_description(ridTo);
@@ -942,11 +945,11 @@
942945
943946
manifest_file_rewind(pFrom);
944947
pFileFrom = manifest_file_next(pFrom, 0);
945948
manifest_file_rewind(pTo);
946949
pFileTo = manifest_file_next(pTo, 0);
947
- diffFlags = construct_diff_flags(showDetail, sideBySide);
950
+ diffFlags = construct_diff_flags(verboseFlag, sideBySide);
948951
while( pFileFrom || pFileTo ){
949952
int cmp;
950953
if( pFileFrom==0 ){
951954
cmp = +1;
952955
}else if( pFileTo==0 ){
953956
--- src/info.c
+++ src/info.c
@@ -171,17 +171,20 @@
171 ** file in a checkout.
172 **
173 ** Options:
174 **
175 ** -R|--repository FILE Extract info from repository FILE
176 ** -l|--detail Show extra information
177 **
178 ** See also: annotate, artifact, finfo, timeline
179 */
180 void info_cmd(void){
181 i64 fsize;
182 int bDetail = find_option("detail","l",0)!=0;
 
 
 
183 if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){
184 db_open_config(0);
185 db_record_repository_filename(g.argv[2]);
186 db_open_repository(g.argv[2]);
187 fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>"));
@@ -197,11 +200,11 @@
197 fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>"));
198 if( g.localOpen ){
199 fossil_print("repository: %s\n", db_repository_filename());
200 fossil_print("local-root: %s\n", g.zLocalRoot);
201 }
202 if( bDetail ) extraRepoInfo();
203 if( g.zConfigDbName ){
204 fossil_print("config-db: %s\n", g.zConfigDbName);
205 }
206 fossil_print("project-code: %s\n", db_get("project-code", ""));
207 vid = g.localOpen ? db_lget_int("checkout", 0) : 0;
@@ -397,13 +400,13 @@
397
398 /*
399 ** Construct an appropriate diffFlag for text_diff() based on query
400 ** parameters and the to boolean arguments.
401 */
402 u64 construct_diff_flags(int showDiff, int sideBySide){
403 u64 diffFlags;
404 if( showDiff==0 ){
405 diffFlags = 0; /* Zero means do not show any diff */
406 }else{
407 int x;
408 if( sideBySide ){
409 diffFlags = DIFF_SIDEBYSIDE | DIFF_IGNORE_EOLWS;
@@ -445,11 +448,11 @@
445 */
446 void ci_page(void){
447 Stmt q;
448 int rid;
449 int isLeaf;
450 int showDiff; /* True to show diffs */
451 int sideBySide; /* True for side-by-side diffs */
452 u64 diffFlags; /* Flag parameter for text_diff() */
453 const char *zName; /* Name of the checkin to be displayed */
454 const char *zUuid; /* UUID of zName */
455 const char *zParent; /* UUID of the parent checkin (if any) */
@@ -606,14 +609,14 @@
606 db_finalize(&q);
607 showTags(rid, "");
608 if( zParent ){
609 @ <div class="section">Changes</div>
610 @ <div class="sectionmenu">
611 showDiff = g.zPath[0]!='c';
612 if( db_get_boolean("show-version-diffs", 0)==0 ){
613 showDiff = !showDiff;
614 if( showDiff ){
615 @ %z(xhref("class='button'","%R/vinfo/%T",zName))
616 @ hide&nbsp;diffs</a>
617 if( sideBySide ){
618 @ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName))
619 @ unified&nbsp;diffs</a>
@@ -626,11 +629,11 @@
626 @ show&nbsp;unified&nbsp;diffs</a>
627 @ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName))
628 @ show&nbsp;side-by-side&nbsp;diffs</a>
629 }
630 }else{
631 if( showDiff ){
632 @ %z(xhref("class='button'","%R/ci/%T",zName))hide&nbsp;diffs</a>
633 if( sideBySide ){
634 @ %z(xhref("class='button'","%R/info/%T?sbs=0",zName))
635 @ unified&nbsp;diffs</a>
636 }else{
@@ -661,11 +664,11 @@
661 " AND (mlink.fid>0"
662 " OR mlink.fnid NOT IN (SELECT pfnid FROM mlink WHERE mid=%d))"
663 " ORDER BY name /*sort*/",
664 rid, rid
665 );
666 diffFlags = construct_diff_flags(showDiff, sideBySide);
667 while( db_step(&q)==SQLITE_ROW ){
668 const char *zName = db_column_text(&q,0);
669 int mperm = db_column_int(&q, 1);
670 const char *zOld = db_column_text(&q,2);
671 const char *zNew = db_column_text(&q,3);
@@ -875,19 +878,19 @@
875 ** Query parameters:
876 **
877 ** from=TAG
878 ** to=TAG
879 ** branch=TAG
880 ** detail=BOOLEAN
881 ** sbs=BOOLEAN
882 **
883 **
884 ** Show all differences between two checkins.
885 */
886 void vdiff_page(void){
887 int ridFrom, ridTo;
888 int showDetail = 0;
889 int sideBySide = 0;
890 u64 diffFlags = 0;
891 Manifest *pFrom, *pTo;
892 ManifestFile *pFileFrom, *pFileTo;
893 const char *zBranch;
@@ -910,26 +913,26 @@
910 pTo = vdiff_parse_manifest("to", &ridTo);
911 if( pTo==0 ) return;
912 pFrom = vdiff_parse_manifest("from", &ridFrom);
913 if( pFrom==0 ) return;
914 sideBySide = atoi(PD("sbs","1"));
915 showDetail = atoi(PD("detail","0"));
916 if( !showDetail && sideBySide ) showDetail = 1;
917 zFrom = P("from");
918 zTo = P("to");
919 if( !sideBySide ){
920 style_submenu_element("Side-by-side Diff", "sbsdiff",
921 "%R/vdiff?from=%T&to=%T&detail=%d&sbs=1",
922 zFrom, zTo, showDetail);
923 }else{
924 style_submenu_element("Unified Diff", "udiff",
925 "%R/vdiff?from=%T&to=%T&detail=%d&sbs=0",
926 zFrom, zTo, showDetail);
927 }
928 style_submenu_element("Invert", "invert",
929 "%R/vdiff?from=%T&to=%T&detail=%d&sbs=%d",
930 zTo, zFrom, showDetail, sideBySide);
931 style_header("Check-in Differences");
932 @ <h2>Difference From:</h2><blockquote>
933 checkin_description(ridFrom);
934 @ </blockquote><h2>To:</h2><blockquote>
935 checkin_description(ridTo);
@@ -942,11 +945,11 @@
942
943 manifest_file_rewind(pFrom);
944 pFileFrom = manifest_file_next(pFrom, 0);
945 manifest_file_rewind(pTo);
946 pFileTo = manifest_file_next(pTo, 0);
947 diffFlags = construct_diff_flags(showDetail, sideBySide);
948 while( pFileFrom || pFileTo ){
949 int cmp;
950 if( pFileFrom==0 ){
951 cmp = +1;
952 }else if( pFileTo==0 ){
953
--- src/info.c
+++ src/info.c
@@ -171,17 +171,20 @@
171 ** file in a checkout.
172 **
173 ** Options:
174 **
175 ** -R|--repository FILE Extract info from repository FILE
176 ** -v|--verbose Show extra information
177 **
178 ** See also: annotate, artifact, finfo, timeline
179 */
180 void info_cmd(void){
181 i64 fsize;
182 int verboseFlag = find_option("verbose","v",0)!=0;
183 if ( !verboseFlag ){
184 verboseFlag = find_option("detail","l",0)!=0; /* deprecated */
185 }
186 if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){
187 db_open_config(0);
188 db_record_repository_filename(g.argv[2]);
189 db_open_repository(g.argv[2]);
190 fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>"));
@@ -197,11 +200,11 @@
200 fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>"));
201 if( g.localOpen ){
202 fossil_print("repository: %s\n", db_repository_filename());
203 fossil_print("local-root: %s\n", g.zLocalRoot);
204 }
205 if( verboseFlag ) extraRepoInfo();
206 if( g.zConfigDbName ){
207 fossil_print("config-db: %s\n", g.zConfigDbName);
208 }
209 fossil_print("project-code: %s\n", db_get("project-code", ""));
210 vid = g.localOpen ? db_lget_int("checkout", 0) : 0;
@@ -397,13 +400,13 @@
400
401 /*
402 ** Construct an appropriate diffFlag for text_diff() based on query
403 ** parameters and the to boolean arguments.
404 */
405 u64 construct_diff_flags(int verboseFlag, int sideBySide){
406 u64 diffFlags;
407 if( verboseFlag==0 ){
408 diffFlags = 0; /* Zero means do not show any diff */
409 }else{
410 int x;
411 if( sideBySide ){
412 diffFlags = DIFF_SIDEBYSIDE | DIFF_IGNORE_EOLWS;
@@ -445,11 +448,11 @@
448 */
449 void ci_page(void){
450 Stmt q;
451 int rid;
452 int isLeaf;
453 int verboseFlag; /* True to show diffs */
454 int sideBySide; /* True for side-by-side diffs */
455 u64 diffFlags; /* Flag parameter for text_diff() */
456 const char *zName; /* Name of the checkin to be displayed */
457 const char *zUuid; /* UUID of zName */
458 const char *zParent; /* UUID of the parent checkin (if any) */
@@ -606,14 +609,14 @@
609 db_finalize(&q);
610 showTags(rid, "");
611 if( zParent ){
612 @ <div class="section">Changes</div>
613 @ <div class="sectionmenu">
614 verboseFlag = g.zPath[0]!='c';
615 if( db_get_boolean("show-version-diffs", 0)==0 ){
616 verboseFlag = !verboseFlag;
617 if( verboseFlag ){
618 @ %z(xhref("class='button'","%R/vinfo/%T",zName))
619 @ hide&nbsp;diffs</a>
620 if( sideBySide ){
621 @ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName))
622 @ unified&nbsp;diffs</a>
@@ -626,11 +629,11 @@
629 @ show&nbsp;unified&nbsp;diffs</a>
630 @ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName))
631 @ show&nbsp;side-by-side&nbsp;diffs</a>
632 }
633 }else{
634 if( verboseFlag ){
635 @ %z(xhref("class='button'","%R/ci/%T",zName))hide&nbsp;diffs</a>
636 if( sideBySide ){
637 @ %z(xhref("class='button'","%R/info/%T?sbs=0",zName))
638 @ unified&nbsp;diffs</a>
639 }else{
@@ -661,11 +664,11 @@
664 " AND (mlink.fid>0"
665 " OR mlink.fnid NOT IN (SELECT pfnid FROM mlink WHERE mid=%d))"
666 " ORDER BY name /*sort*/",
667 rid, rid
668 );
669 diffFlags = construct_diff_flags(verboseFlag, sideBySide);
670 while( db_step(&q)==SQLITE_ROW ){
671 const char *zName = db_column_text(&q,0);
672 int mperm = db_column_int(&q, 1);
673 const char *zOld = db_column_text(&q,2);
674 const char *zNew = db_column_text(&q,3);
@@ -875,19 +878,19 @@
878 ** Query parameters:
879 **
880 ** from=TAG
881 ** to=TAG
882 ** branch=TAG
883 ** v=BOOLEAN
884 ** sbs=BOOLEAN
885 **
886 **
887 ** Show all differences between two checkins.
888 */
889 void vdiff_page(void){
890 int ridFrom, ridTo;
891 int verboseFlag = 0;
892 int sideBySide = 0;
893 u64 diffFlags = 0;
894 Manifest *pFrom, *pTo;
895 ManifestFile *pFileFrom, *pFileTo;
896 const char *zBranch;
@@ -910,26 +913,26 @@
913 pTo = vdiff_parse_manifest("to", &ridTo);
914 if( pTo==0 ) return;
915 pFrom = vdiff_parse_manifest("from", &ridFrom);
916 if( pFrom==0 ) return;
917 sideBySide = atoi(PD("sbs","1"));
918 verboseFlag = atoi(PD("v","0"));
919 if( !verboseFlag && sideBySide ) verboseFlag = 1;
920 zFrom = P("from");
921 zTo = P("to");
922 if( !sideBySide ){
923 style_submenu_element("Side-by-side Diff", "sbsdiff",
924 "%R/vdiff?from=%T&to=%T&v=%d&sbs=1",
925 zFrom, zTo, verboseFlag);
926 }else{
927 style_submenu_element("Unified Diff", "udiff",
928 "%R/vdiff?from=%T&to=%T&v=%d&sbs=0",
929 zFrom, zTo, verboseFlag);
930 }
931 style_submenu_element("Invert", "invert",
932 "%R/vdiff?from=%T&to=%T&v=%d&sbs=%d",
933 zTo, zFrom, verboseFlag, sideBySide);
934 style_header("Check-in Differences");
935 @ <h2>Difference From:</h2><blockquote>
936 checkin_description(ridFrom);
937 @ </blockquote><h2>To:</h2><blockquote>
938 checkin_description(ridTo);
@@ -942,11 +945,11 @@
945
946 manifest_file_rewind(pFrom);
947 pFileFrom = manifest_file_next(pFrom, 0);
948 manifest_file_rewind(pTo);
949 pFileTo = manifest_file_next(pTo, 0);
950 diffFlags = construct_diff_flags(verboseFlag, sideBySide);
951 while( pFileFrom || pFileTo ){
952 int cmp;
953 if( pFileFrom==0 ){
954 cmp = +1;
955 }else if( pFileTo==0 ){
956
+7 -4
--- src/json.c
+++ src/json.c
@@ -2011,11 +2011,11 @@
20112011
**
20122012
*/
20132013
cson_value * json_page_stat(){
20142014
i64 t, fsize;
20152015
int n, m;
2016
- int full;
2016
+ int verboseFlag;
20172017
const char *zDb;
20182018
enum { BufLen = 1000 };
20192019
char zBuf[BufLen];
20202020
cson_value * jv = NULL;
20212021
cson_object * jo = NULL;
@@ -2025,11 +2025,14 @@
20252025
if( !g.perm.Read ){
20262026
json_set_err(FSL_JSON_E_DENIED,
20272027
"Requires 'o' permissions.");
20282028
return NULL;
20292029
}
2030
- full = json_find_option_bool("full",NULL,"f",0);
2030
+ verboseFlag = json_find_option_bool("verbose",NULL,"v",0);
2031
+ if( !verboseFlag){
2032
+ verboseFlag = json_find_option_bool("full",NULL,"f",0); /* deprecated */
2033
+ }
20312034
#define SETBUF(O,K) cson_object_set(O, K, cson_value_new_string(zBuf, strlen(zBuf)));
20322035
20332036
jv = cson_value_new_object();
20342037
jo = cson_value_get_object(jv);
20352038
@@ -2041,11 +2044,11 @@
20412044
free(zTmp);
20422045
zTmp = NULL;
20432046
fsize = file_size(g.zRepositoryName);
20442047
cson_object_set(jo, "repositorySize", cson_value_new_integer((cson_int_t)fsize));
20452048
2046
- if(full){
2049
+ if(verboseFlag){
20472050
n = db_int(0, "SELECT count(*) FROM blob");
20482051
m = db_int(0, "SELECT count(*) FROM delta");
20492052
cson_object_set(jo, "blobCount", cson_value_new_integer((cson_int_t)n));
20502053
cson_object_set(jo, "deltaCount", cson_value_new_integer((cson_int_t)m));
20512054
if( n>0 ){
@@ -2080,11 +2083,11 @@
20802083
" WHERE +tagname GLOB 'wiki-*'");
20812084
cson_object_set(jo, "wikiPageCount", cson_value_new_integer((cson_int_t)n));
20822085
n = db_int(0, "SELECT count(*) FROM tag /*scan*/"
20832086
" WHERE +tagname GLOB 'tkt-*'");
20842087
cson_object_set(jo, "ticketCount", cson_value_new_integer((cson_int_t)n));
2085
- }/*full*/
2088
+ }/*verboseFlag*/
20862089
n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
20872090
" + 0.99");
20882091
cson_object_set(jo, "ageDays", cson_value_new_integer((cson_int_t)n));
20892092
cson_object_set(jo, "ageYears", cson_value_new_double(n/365.2425));
20902093
sqlite3_snprintf(BufLen, zBuf, db_get("project-code",""));
20912094
--- src/json.c
+++ src/json.c
@@ -2011,11 +2011,11 @@
2011 **
2012 */
2013 cson_value * json_page_stat(){
2014 i64 t, fsize;
2015 int n, m;
2016 int full;
2017 const char *zDb;
2018 enum { BufLen = 1000 };
2019 char zBuf[BufLen];
2020 cson_value * jv = NULL;
2021 cson_object * jo = NULL;
@@ -2025,11 +2025,14 @@
2025 if( !g.perm.Read ){
2026 json_set_err(FSL_JSON_E_DENIED,
2027 "Requires 'o' permissions.");
2028 return NULL;
2029 }
2030 full = json_find_option_bool("full",NULL,"f",0);
 
 
 
2031 #define SETBUF(O,K) cson_object_set(O, K, cson_value_new_string(zBuf, strlen(zBuf)));
2032
2033 jv = cson_value_new_object();
2034 jo = cson_value_get_object(jv);
2035
@@ -2041,11 +2044,11 @@
2041 free(zTmp);
2042 zTmp = NULL;
2043 fsize = file_size(g.zRepositoryName);
2044 cson_object_set(jo, "repositorySize", cson_value_new_integer((cson_int_t)fsize));
2045
2046 if(full){
2047 n = db_int(0, "SELECT count(*) FROM blob");
2048 m = db_int(0, "SELECT count(*) FROM delta");
2049 cson_object_set(jo, "blobCount", cson_value_new_integer((cson_int_t)n));
2050 cson_object_set(jo, "deltaCount", cson_value_new_integer((cson_int_t)m));
2051 if( n>0 ){
@@ -2080,11 +2083,11 @@
2080 " WHERE +tagname GLOB 'wiki-*'");
2081 cson_object_set(jo, "wikiPageCount", cson_value_new_integer((cson_int_t)n));
2082 n = db_int(0, "SELECT count(*) FROM tag /*scan*/"
2083 " WHERE +tagname GLOB 'tkt-*'");
2084 cson_object_set(jo, "ticketCount", cson_value_new_integer((cson_int_t)n));
2085 }/*full*/
2086 n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
2087 " + 0.99");
2088 cson_object_set(jo, "ageDays", cson_value_new_integer((cson_int_t)n));
2089 cson_object_set(jo, "ageYears", cson_value_new_double(n/365.2425));
2090 sqlite3_snprintf(BufLen, zBuf, db_get("project-code",""));
2091
--- src/json.c
+++ src/json.c
@@ -2011,11 +2011,11 @@
2011 **
2012 */
2013 cson_value * json_page_stat(){
2014 i64 t, fsize;
2015 int n, m;
2016 int verboseFlag;
2017 const char *zDb;
2018 enum { BufLen = 1000 };
2019 char zBuf[BufLen];
2020 cson_value * jv = NULL;
2021 cson_object * jo = NULL;
@@ -2025,11 +2025,14 @@
2025 if( !g.perm.Read ){
2026 json_set_err(FSL_JSON_E_DENIED,
2027 "Requires 'o' permissions.");
2028 return NULL;
2029 }
2030 verboseFlag = json_find_option_bool("verbose",NULL,"v",0);
2031 if( !verboseFlag){
2032 verboseFlag = json_find_option_bool("full",NULL,"f",0); /* deprecated */
2033 }
2034 #define SETBUF(O,K) cson_object_set(O, K, cson_value_new_string(zBuf, strlen(zBuf)));
2035
2036 jv = cson_value_new_object();
2037 jo = cson_value_get_object(jv);
2038
@@ -2041,11 +2044,11 @@
2044 free(zTmp);
2045 zTmp = NULL;
2046 fsize = file_size(g.zRepositoryName);
2047 cson_object_set(jo, "repositorySize", cson_value_new_integer((cson_int_t)fsize));
2048
2049 if(verboseFlag){
2050 n = db_int(0, "SELECT count(*) FROM blob");
2051 m = db_int(0, "SELECT count(*) FROM delta");
2052 cson_object_set(jo, "blobCount", cson_value_new_integer((cson_int_t)n));
2053 cson_object_set(jo, "deltaCount", cson_value_new_integer((cson_int_t)m));
2054 if( n>0 ){
@@ -2080,11 +2083,11 @@
2083 " WHERE +tagname GLOB 'wiki-*'");
2084 cson_object_set(jo, "wikiPageCount", cson_value_new_integer((cson_int_t)n));
2085 n = db_int(0, "SELECT count(*) FROM tag /*scan*/"
2086 " WHERE +tagname GLOB 'tkt-*'");
2087 cson_object_set(jo, "ticketCount", cson_value_new_integer((cson_int_t)n));
2088 }/*verboseFlag*/
2089 n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
2090 " + 0.99");
2091 cson_object_set(jo, "ageDays", cson_value_new_integer((cson_int_t)n));
2092 cson_object_set(jo, "ageYears", cson_value_new_double(n/365.2425));
2093 sqlite3_snprintf(BufLen, zBuf, db_get("project-code",""));
2094
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -426,11 +426,11 @@
426426
cson_object * pay = NULL;
427427
cson_value * tmp = NULL;
428428
cson_value * listV = NULL;
429429
cson_array * list = NULL;
430430
int check = 0;
431
- char showFiles = -1/*magic number*/;
431
+ char verboseFlag;
432432
Stmt q = empty_Stmt;
433433
char warnRowToJsonFailed = 0;
434434
Blob sql = empty_blob;
435435
if( !g.perm.Hyperlink ){
436436
/* Reminder to self: HTML impl requires 'o' (Read)
@@ -437,11 +437,14 @@
437437
rights.
438438
*/
439439
json_set_err( FSL_JSON_E_DENIED, "Checkin timeline requires 'h' access." );
440440
return NULL;
441441
}
442
- showFiles = json_find_option_bool("files",NULL,"f",0);
442
+ verboseFlag = json_find_option_bool("verbose",NULL,"v",0);
443
+ if( !verboseFlag ){
444
+ verboseFlag = json_find_option_bool("files",NULL,"f",0);
445
+ }
443446
payV = cson_value_new_object();
444447
pay = cson_value_get_object(payV);
445448
check = json_timeline_setup_sql( "ci", &sql, pay );
446449
if(check){
447450
json_set_err(check, "Query initialization failed.");
@@ -470,11 +473,11 @@
470473
tmp = listV;
471474
SET("timeline");
472475
while( (SQLITE_ROW == db_step(&q) )){
473476
/* convert each row into a JSON object...*/
474477
int const rid = db_column_int(&q,0);
475
- cson_value * rowV = json_artifact_for_ci(rid, showFiles);
478
+ cson_value * rowV = json_artifact_for_ci(rid, verboseFlag);
476479
cson_object * row = cson_value_get_object(rowV);
477480
if(!row){
478481
if( !warnRowToJsonFailed ){
479482
warnRowToJsonFailed = 1;
480483
json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED,
481484
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -426,11 +426,11 @@
426 cson_object * pay = NULL;
427 cson_value * tmp = NULL;
428 cson_value * listV = NULL;
429 cson_array * list = NULL;
430 int check = 0;
431 char showFiles = -1/*magic number*/;
432 Stmt q = empty_Stmt;
433 char warnRowToJsonFailed = 0;
434 Blob sql = empty_blob;
435 if( !g.perm.Hyperlink ){
436 /* Reminder to self: HTML impl requires 'o' (Read)
@@ -437,11 +437,14 @@
437 rights.
438 */
439 json_set_err( FSL_JSON_E_DENIED, "Checkin timeline requires 'h' access." );
440 return NULL;
441 }
442 showFiles = json_find_option_bool("files",NULL,"f",0);
 
 
 
443 payV = cson_value_new_object();
444 pay = cson_value_get_object(payV);
445 check = json_timeline_setup_sql( "ci", &sql, pay );
446 if(check){
447 json_set_err(check, "Query initialization failed.");
@@ -470,11 +473,11 @@
470 tmp = listV;
471 SET("timeline");
472 while( (SQLITE_ROW == db_step(&q) )){
473 /* convert each row into a JSON object...*/
474 int const rid = db_column_int(&q,0);
475 cson_value * rowV = json_artifact_for_ci(rid, showFiles);
476 cson_object * row = cson_value_get_object(rowV);
477 if(!row){
478 if( !warnRowToJsonFailed ){
479 warnRowToJsonFailed = 1;
480 json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED,
481
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -426,11 +426,11 @@
426 cson_object * pay = NULL;
427 cson_value * tmp = NULL;
428 cson_value * listV = NULL;
429 cson_array * list = NULL;
430 int check = 0;
431 char verboseFlag;
432 Stmt q = empty_Stmt;
433 char warnRowToJsonFailed = 0;
434 Blob sql = empty_blob;
435 if( !g.perm.Hyperlink ){
436 /* Reminder to self: HTML impl requires 'o' (Read)
@@ -437,11 +437,14 @@
437 rights.
438 */
439 json_set_err( FSL_JSON_E_DENIED, "Checkin timeline requires 'h' access." );
440 return NULL;
441 }
442 verboseFlag = json_find_option_bool("verbose",NULL,"v",0);
443 if( !verboseFlag ){
444 verboseFlag = json_find_option_bool("files",NULL,"f",0);
445 }
446 payV = cson_value_new_object();
447 pay = cson_value_get_object(payV);
448 check = json_timeline_setup_sql( "ci", &sql, pay );
449 if(check){
450 json_set_err(check, "Query initialization failed.");
@@ -470,11 +473,11 @@
473 tmp = listV;
474 SET("timeline");
475 while( (SQLITE_ROW == db_step(&q) )){
476 /* convert each row into a JSON object...*/
477 int const rid = db_column_int(&q,0);
478 cson_value * rowV = json_artifact_for_ci(rid, verboseFlag);
479 cson_object * row = cson_value_get_object(rowV);
480 if(!row){
481 if( !warnRowToJsonFailed ){
482 warnRowToJsonFailed = 1;
483 json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED,
484
+8 -5
--- src/merge.c
+++ src/merge.c
@@ -89,21 +89,21 @@
8989
**
9090
** --case-sensitive BOOL Override the case-sensitive setting. If false,
9191
** files whose names differ only in case are taken
9292
** to be the same file.
9393
**
94
-** --detail Show additional details of the merge
94
+** -v|--verbose Show additional details of the merge
9595
**
9696
** -f|--force Force the merge even if it would be a no-op.
9797
**
9898
** -n|--dry-run If given, display instead of run actions
9999
*/
100100
void merge_cmd(void){
101101
int vid; /* Current version "V" */
102102
int mid; /* Version we are merging from "M" */
103103
int pid; /* The pivot version - most recent common ancestor P */
104
- int detailFlag; /* True if the --detail option is present */
104
+ int verboseFlag; /* True if the --verbose option is present */
105105
int pickFlag; /* True if the --cherrypick option is present */
106106
int backoutFlag; /* True if the --backout option is present */
107107
int dryRunFlag; /* True if the --dry-run or -n option is present */
108108
int forceFlag; /* True if the --force or -f option is present */
109109
const char *zBinGlob; /* The value of --binary */
@@ -123,11 +123,14 @@
123123
** M The version being merged in
124124
** P The "pivot" - the most recent common ancestor of V and M.
125125
*/
126126
127127
undo_capture_command_line();
128
- detailFlag = find_option("detail",0,0)!=0;
128
+ verboseFlag = find_option("verbose","v",0)!=0;
129
+ if ( !verboseFlag ){
130
+ verboseFlag = find_option("detail",0,0)!=0;
131
+ }
129132
pickFlag = find_option("cherrypick",0,0)!=0;
130133
backoutFlag = find_option("backout",0,0)!=0;
131134
debugFlag = find_option("debug",0,0)!=0;
132135
zBinGlob = find_option("binary",0,1);
133136
dryRunFlag = find_option("dry-run","n",0)!=0;
@@ -248,11 +251,11 @@
248251
if( !forceFlag && mid==pid ){
249252
fossil_print("Merge skipped because it is a no-op. "
250253
" Use --force to override.\n");
251254
return;
252255
}
253
- if( detailFlag ){
256
+ if( verboseFlag ){
254257
print_checkin_description(mid, 12, "merge-from:");
255258
print_checkin_description(pid, 12, "baseline:");
256259
}
257260
vfile_check_signature(vid, CKSIG_ENOTFILE);
258261
db_begin_transaction();
@@ -502,11 +505,11 @@
502505
int islinkm = db_column_int(&q, 8);
503506
int rc;
504507
char *zFullPath;
505508
Blob m, p, r;
506509
/* Do a 3-way merge of idp->idm into idp->idv. The results go into idv. */
507
- if( detailFlag ){
510
+ if( verboseFlag ){
508511
fossil_print("MERGE %s (pivot=%d v1=%d v2=%d)\n",
509512
zName, ridp, ridm, ridv);
510513
}else{
511514
fossil_print("MERGE %s\n", zName);
512515
}
513516
--- src/merge.c
+++ src/merge.c
@@ -89,21 +89,21 @@
89 **
90 ** --case-sensitive BOOL Override the case-sensitive setting. If false,
91 ** files whose names differ only in case are taken
92 ** to be the same file.
93 **
94 ** --detail Show additional details of the merge
95 **
96 ** -f|--force Force the merge even if it would be a no-op.
97 **
98 ** -n|--dry-run If given, display instead of run actions
99 */
100 void merge_cmd(void){
101 int vid; /* Current version "V" */
102 int mid; /* Version we are merging from "M" */
103 int pid; /* The pivot version - most recent common ancestor P */
104 int detailFlag; /* True if the --detail option is present */
105 int pickFlag; /* True if the --cherrypick option is present */
106 int backoutFlag; /* True if the --backout option is present */
107 int dryRunFlag; /* True if the --dry-run or -n option is present */
108 int forceFlag; /* True if the --force or -f option is present */
109 const char *zBinGlob; /* The value of --binary */
@@ -123,11 +123,14 @@
123 ** M The version being merged in
124 ** P The "pivot" - the most recent common ancestor of V and M.
125 */
126
127 undo_capture_command_line();
128 detailFlag = find_option("detail",0,0)!=0;
 
 
 
129 pickFlag = find_option("cherrypick",0,0)!=0;
130 backoutFlag = find_option("backout",0,0)!=0;
131 debugFlag = find_option("debug",0,0)!=0;
132 zBinGlob = find_option("binary",0,1);
133 dryRunFlag = find_option("dry-run","n",0)!=0;
@@ -248,11 +251,11 @@
248 if( !forceFlag && mid==pid ){
249 fossil_print("Merge skipped because it is a no-op. "
250 " Use --force to override.\n");
251 return;
252 }
253 if( detailFlag ){
254 print_checkin_description(mid, 12, "merge-from:");
255 print_checkin_description(pid, 12, "baseline:");
256 }
257 vfile_check_signature(vid, CKSIG_ENOTFILE);
258 db_begin_transaction();
@@ -502,11 +505,11 @@
502 int islinkm = db_column_int(&q, 8);
503 int rc;
504 char *zFullPath;
505 Blob m, p, r;
506 /* Do a 3-way merge of idp->idm into idp->idv. The results go into idv. */
507 if( detailFlag ){
508 fossil_print("MERGE %s (pivot=%d v1=%d v2=%d)\n",
509 zName, ridp, ridm, ridv);
510 }else{
511 fossil_print("MERGE %s\n", zName);
512 }
513
--- src/merge.c
+++ src/merge.c
@@ -89,21 +89,21 @@
89 **
90 ** --case-sensitive BOOL Override the case-sensitive setting. If false,
91 ** files whose names differ only in case are taken
92 ** to be the same file.
93 **
94 ** -v|--verbose Show additional details of the merge
95 **
96 ** -f|--force Force the merge even if it would be a no-op.
97 **
98 ** -n|--dry-run If given, display instead of run actions
99 */
100 void merge_cmd(void){
101 int vid; /* Current version "V" */
102 int mid; /* Version we are merging from "M" */
103 int pid; /* The pivot version - most recent common ancestor P */
104 int verboseFlag; /* True if the --verbose option is present */
105 int pickFlag; /* True if the --cherrypick option is present */
106 int backoutFlag; /* True if the --backout option is present */
107 int dryRunFlag; /* True if the --dry-run or -n option is present */
108 int forceFlag; /* True if the --force or -f option is present */
109 const char *zBinGlob; /* The value of --binary */
@@ -123,11 +123,14 @@
123 ** M The version being merged in
124 ** P The "pivot" - the most recent common ancestor of V and M.
125 */
126
127 undo_capture_command_line();
128 verboseFlag = find_option("verbose","v",0)!=0;
129 if ( !verboseFlag ){
130 verboseFlag = find_option("detail",0,0)!=0;
131 }
132 pickFlag = find_option("cherrypick",0,0)!=0;
133 backoutFlag = find_option("backout",0,0)!=0;
134 debugFlag = find_option("debug",0,0)!=0;
135 zBinGlob = find_option("binary",0,1);
136 dryRunFlag = find_option("dry-run","n",0)!=0;
@@ -248,11 +251,11 @@
251 if( !forceFlag && mid==pid ){
252 fossil_print("Merge skipped because it is a no-op. "
253 " Use --force to override.\n");
254 return;
255 }
256 if( verboseFlag ){
257 print_checkin_description(mid, 12, "merge-from:");
258 print_checkin_description(pid, 12, "baseline:");
259 }
260 vfile_check_signature(vid, CKSIG_ENOTFILE);
261 db_begin_transaction();
@@ -502,11 +505,11 @@
505 int islinkm = db_column_int(&q, 8);
506 int rc;
507 char *zFullPath;
508 Blob m, p, r;
509 /* Do a 3-way merge of idp->idm into idp->idv. The results go into idv. */
510 if( verboseFlag ){
511 fossil_print("MERGE %s (pivot=%d v1=%d v2=%d)\n",
512 zName, ridp, ridm, ridv);
513 }else{
514 fossil_print("MERGE %s\n", zName);
515 }
516
+11 -8
--- src/stash.c
+++ src/stash.c
@@ -416,15 +416,15 @@
416416
** are listed, then only stash and revert the named files. The
417417
** "save" verb can be omitted if and only if there are no other
418418
** arguments. The "snapshot" verb works the same as "save" but
419419
** omits the revert, keeping the check-out unchanged.
420420
**
421
-** fossil stash list ?-l|--detail?
422
-** fossil stash ls ?-l|--detail?
421
+** fossil stash list ?-v|--verbose?
422
+** fossil stash ls ?-v|--verbose?
423423
**
424424
** List all changes sets currently stashed. Show information about
425
-** individual files in each changeset if --detail or -l is used.
425
+** individual files in each changeset if --verbose or -v is used.
426426
**
427427
** fossil stash show ?STASHID? ?DIFF-FLAGS?
428428
**
429429
** Show the content of a stash
430430
**
@@ -457,11 +457,11 @@
457457
**
458458
** SUMMARY:
459459
** fossil stash
460460
** fossil stash save ?-m|--comment COMMENT? ?FILES...?
461461
** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...?
462
-** fossil stash list|ls ?-l|--detail?
462
+** fossil stash list|ls ?-v|--verbose?
463463
** fossil stash show ?STASHID? ?DIFF-OPTIONS?
464464
** fossil stash pop
465465
** fossil stash apply ?STASHID?
466466
** fossil stash goto ?STASHID?
467467
** fossil stash rm|drop ?STASHID? ?-a|--all?
@@ -511,18 +511,21 @@
511511
stash_create();
512512
}else
513513
if( memcmp(zCmd, "list", nCmd)==0 || memcmp(zCmd, "ls", nCmd)==0 ){
514514
Stmt q, q2;
515515
int n = 0;
516
- int fDetail = find_option("detail","l",0)!=0;
516
+ int verboseFlag = find_option("verbose","v",0)!=0;
517
+ if( !verboseFlag ){
518
+ verboseFlag = find_option("detail","l",0)!=0;
519
+ }
517520
verify_all_options();
518521
db_prepare(&q,
519522
"SELECT stashid, (SELECT uuid FROM blob WHERE rid=vid),"
520523
" comment, datetime(ctime) FROM stash"
521524
" ORDER BY ctime DESC"
522525
);
523
- if( fDetail ){
526
+ if( verboseFlag ){
524527
db_prepare(&q2, "SELECT isAdded, isRemoved, origname, newname"
525528
" FROM stashfile WHERE stashid=$id");
526529
}
527530
while( db_step(&q)==SQLITE_ROW ){
528531
int stashid = db_column_int(&q, 0);
@@ -536,11 +539,11 @@
536539
zCom = db_column_text(&q, 2);
537540
if( zCom && zCom[0] ){
538541
fossil_print(" ");
539542
comment_print(zCom, 7, 79);
540543
}
541
- if( fDetail ){
544
+ if( verboseFlag ){
542545
db_bind_int(&q2, "$id", stashid);
543546
while( db_step(&q2)==SQLITE_ROW ){
544547
int isAdded = db_column_int(&q2, 0);
545548
int isRemoved = db_column_int(&q2, 1);
546549
const char *zOrig = db_column_text(&q2, 2);
@@ -557,11 +560,11 @@
557560
}
558561
db_reset(&q2);
559562
}
560563
}
561564
db_finalize(&q);
562
- if( fDetail ) db_finalize(&q2);
565
+ if( verboseFlag ) db_finalize(&q2);
563566
if( n==0 ) fossil_print("empty stash\n");
564567
}else
565568
if( memcmp(zCmd, "drop", nCmd)==0 || memcmp(zCmd, "rm", nCmd)==0 ){
566569
int allFlag = find_option("all", "a", 0)!=0;
567570
if( allFlag ){
568571
--- src/stash.c
+++ src/stash.c
@@ -416,15 +416,15 @@
416 ** are listed, then only stash and revert the named files. The
417 ** "save" verb can be omitted if and only if there are no other
418 ** arguments. The "snapshot" verb works the same as "save" but
419 ** omits the revert, keeping the check-out unchanged.
420 **
421 ** fossil stash list ?-l|--detail?
422 ** fossil stash ls ?-l|--detail?
423 **
424 ** List all changes sets currently stashed. Show information about
425 ** individual files in each changeset if --detail or -l is used.
426 **
427 ** fossil stash show ?STASHID? ?DIFF-FLAGS?
428 **
429 ** Show the content of a stash
430 **
@@ -457,11 +457,11 @@
457 **
458 ** SUMMARY:
459 ** fossil stash
460 ** fossil stash save ?-m|--comment COMMENT? ?FILES...?
461 ** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...?
462 ** fossil stash list|ls ?-l|--detail?
463 ** fossil stash show ?STASHID? ?DIFF-OPTIONS?
464 ** fossil stash pop
465 ** fossil stash apply ?STASHID?
466 ** fossil stash goto ?STASHID?
467 ** fossil stash rm|drop ?STASHID? ?-a|--all?
@@ -511,18 +511,21 @@
511 stash_create();
512 }else
513 if( memcmp(zCmd, "list", nCmd)==0 || memcmp(zCmd, "ls", nCmd)==0 ){
514 Stmt q, q2;
515 int n = 0;
516 int fDetail = find_option("detail","l",0)!=0;
 
 
 
517 verify_all_options();
518 db_prepare(&q,
519 "SELECT stashid, (SELECT uuid FROM blob WHERE rid=vid),"
520 " comment, datetime(ctime) FROM stash"
521 " ORDER BY ctime DESC"
522 );
523 if( fDetail ){
524 db_prepare(&q2, "SELECT isAdded, isRemoved, origname, newname"
525 " FROM stashfile WHERE stashid=$id");
526 }
527 while( db_step(&q)==SQLITE_ROW ){
528 int stashid = db_column_int(&q, 0);
@@ -536,11 +539,11 @@
536 zCom = db_column_text(&q, 2);
537 if( zCom && zCom[0] ){
538 fossil_print(" ");
539 comment_print(zCom, 7, 79);
540 }
541 if( fDetail ){
542 db_bind_int(&q2, "$id", stashid);
543 while( db_step(&q2)==SQLITE_ROW ){
544 int isAdded = db_column_int(&q2, 0);
545 int isRemoved = db_column_int(&q2, 1);
546 const char *zOrig = db_column_text(&q2, 2);
@@ -557,11 +560,11 @@
557 }
558 db_reset(&q2);
559 }
560 }
561 db_finalize(&q);
562 if( fDetail ) db_finalize(&q2);
563 if( n==0 ) fossil_print("empty stash\n");
564 }else
565 if( memcmp(zCmd, "drop", nCmd)==0 || memcmp(zCmd, "rm", nCmd)==0 ){
566 int allFlag = find_option("all", "a", 0)!=0;
567 if( allFlag ){
568
--- src/stash.c
+++ src/stash.c
@@ -416,15 +416,15 @@
416 ** are listed, then only stash and revert the named files. The
417 ** "save" verb can be omitted if and only if there are no other
418 ** arguments. The "snapshot" verb works the same as "save" but
419 ** omits the revert, keeping the check-out unchanged.
420 **
421 ** fossil stash list ?-v|--verbose?
422 ** fossil stash ls ?-v|--verbose?
423 **
424 ** List all changes sets currently stashed. Show information about
425 ** individual files in each changeset if --verbose or -v is used.
426 **
427 ** fossil stash show ?STASHID? ?DIFF-FLAGS?
428 **
429 ** Show the content of a stash
430 **
@@ -457,11 +457,11 @@
457 **
458 ** SUMMARY:
459 ** fossil stash
460 ** fossil stash save ?-m|--comment COMMENT? ?FILES...?
461 ** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...?
462 ** fossil stash list|ls ?-v|--verbose?
463 ** fossil stash show ?STASHID? ?DIFF-OPTIONS?
464 ** fossil stash pop
465 ** fossil stash apply ?STASHID?
466 ** fossil stash goto ?STASHID?
467 ** fossil stash rm|drop ?STASHID? ?-a|--all?
@@ -511,18 +511,21 @@
511 stash_create();
512 }else
513 if( memcmp(zCmd, "list", nCmd)==0 || memcmp(zCmd, "ls", nCmd)==0 ){
514 Stmt q, q2;
515 int n = 0;
516 int verboseFlag = find_option("verbose","v",0)!=0;
517 if( !verboseFlag ){
518 verboseFlag = find_option("detail","l",0)!=0;
519 }
520 verify_all_options();
521 db_prepare(&q,
522 "SELECT stashid, (SELECT uuid FROM blob WHERE rid=vid),"
523 " comment, datetime(ctime) FROM stash"
524 " ORDER BY ctime DESC"
525 );
526 if( verboseFlag ){
527 db_prepare(&q2, "SELECT isAdded, isRemoved, origname, newname"
528 " FROM stashfile WHERE stashid=$id");
529 }
530 while( db_step(&q)==SQLITE_ROW ){
531 int stashid = db_column_int(&q, 0);
@@ -536,11 +539,11 @@
539 zCom = db_column_text(&q, 2);
540 if( zCom && zCom[0] ){
541 fossil_print(" ");
542 comment_print(zCom, 7, 79);
543 }
544 if( verboseFlag ){
545 db_bind_int(&q2, "$id", stashid);
546 while( db_step(&q2)==SQLITE_ROW ){
547 int isAdded = db_column_int(&q2, 0);
548 int isRemoved = db_column_int(&q2, 1);
549 const char *zOrig = db_column_text(&q2, 2);
@@ -557,11 +560,11 @@
560 }
561 db_reset(&q2);
562 }
563 }
564 db_finalize(&q);
565 if( verboseFlag ) db_finalize(&q2);
566 if( n==0 ) fossil_print("empty stash\n");
567 }else
568 if( memcmp(zCmd, "drop", nCmd)==0 || memcmp(zCmd, "rm", nCmd)==0 ){
569 int allFlag = find_option("all", "a", 0)!=0;
570 if( allFlag ){
571
+23 -17
--- src/timeline.c
+++ src/timeline.c
@@ -375,11 +375,11 @@
375375
@ (user: %z(href("%z",zLink))%h(zDispUser)</a>%s(zTagList?",":"\051")
376376
}else{
377377
@ (user: %h(zDispUser)%s(zTagList?",":"\051")
378378
}
379379
380
- /* Generate a "detail" link for tags. */
380
+ /* Generate a "details" link for tags. */
381381
if( (zType[0]=='g' || zType[0]=='w' || zType[0]=='t') && g.perm.Hyperlink ){
382382
@ [%z(href("%R/info/%S",zUuid))details</a>]
383383
}
384384
385385
/* Generate the "tags: TAGLIST" at the end of the comment, together
@@ -956,11 +956,11 @@
956956
** u=USER only if belonging to this user
957957
** y=TYPE 'ci', 'w', 't', 'e'
958958
** s=TEXT string search (comment and brief)
959959
** ng Suppress the graph if present
960960
** nd Suppress "divider" lines
961
-** fc Show details of files changed
961
+** v Show details of files changed
962962
** f=UUID Show family (immediate parents and children) of UUID
963963
** from=UUID Path from...
964964
** to=UUID ... to this
965965
** nomerge ... avoid merge links on the path
966966
** uf=FUUID Show only checkins that use given file version
@@ -1071,13 +1071,13 @@
10711071
timeline_temp_table();
10721072
blob_zero(&sql);
10731073
blob_zero(&desc);
10741074
blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1);
10751075
blob_append(&sql, timeline_query_for_www(), -1);
1076
- if( P("fc")!=0 || P("detail")!=0 ){
1076
+ if( P("v")!=0 || P("verbose")!=0 ){
10771077
tmFlags |= TIMELINE_FCHANGES;
1078
- url_add_parameter(&url, "fc", 0);
1078
+ url_add_parameter(&url, "v", 0);
10791079
}
10801080
if( !useDividers ) url_add_parameter(&url, "nd", 0);
10811081
if( ((from_rid && to_rid) || (me_rid && you_rid)) && g.perm.Read ){
10821082
/* If from= and to= are present, display all nodes on a path connecting
10831083
** the two */
@@ -1382,13 +1382,13 @@
13821382
if( nEntry<200 ){
13831383
timeline_submenu(&url, "200 Entries", "n", "200", 0);
13841384
}
13851385
if( zType[0]=='a' || zType[0]=='c' ){
13861386
if( tmFlags & TIMELINE_FCHANGES ){
1387
- timeline_submenu(&url, "Hide Files", "fc", 0, 0);
1387
+ timeline_submenu(&url, "Hide Files", "v", 0, 0);
13881388
}else{
1389
- timeline_submenu(&url, "Show Files", "fc", "", 0);
1389
+ timeline_submenu(&url, "Show Files", "v", "", 0);
13901390
}
13911391
}
13921392
}
13931393
}
13941394
if( P("showsql") ){
@@ -1418,11 +1418,11 @@
14181418
** 4. Number of non-merge children
14191419
** 5. Number of parents
14201420
** 6. mtime
14211421
** 7. branch
14221422
*/
1423
-void print_timeline(Stmt *q, int mxLine, int showfiles){
1423
+void print_timeline(Stmt *q, int mxLine, int verboseFlag){
14241424
int nLine = 0;
14251425
char zPrevDate[20];
14261426
const char *zCurrentUuid=0;
14271427
int fchngQueryInit = 0; /* True if fchngQuery is initialized */
14281428
Stmt fchngQuery; /* Query for file changes on check-ins */
@@ -1474,11 +1474,11 @@
14741474
}
14751475
zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom);
14761476
nLine += comment_print(zFree, 9, 79);
14771477
sqlite3_free(zFree);
14781478
1479
- if(showfiles){
1479
+ if(verboseFlag){
14801480
if( !fchngQueryInit ){
14811481
db_prepare(&fchngQuery,
14821482
"SELECT (pid==0) AS isnew,"
14831483
" (fid==0) AS isdel,"
14841484
" (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name,"
@@ -1573,11 +1573,11 @@
15731573
** The DATETIME should be in the ISO8601 format. For
15741574
** examples: "2007-08-18 07:21:21". You can also say "current"
15751575
** for the current version or "now" for the current time.
15761576
**
15771577
** Options:
1578
-** -f|--showfiles print the list of files changed in a checkin after
1578
+** -v|--verbose print the list of files changed in a checkin after
15791579
** the checkin comment.
15801580
** -n|--limit N display the first N changes (default 20)
15811581
** -t|--type TYPE only display items from the give types, such as:
15821582
** ci = file commits only
15831583
** e = events only
@@ -1593,12 +1593,15 @@
15931593
char *zDate;
15941594
Blob sql;
15951595
int objid = 0;
15961596
Blob uuid;
15971597
int mode = 0 ; /* 0:none 1: before 2:after 3:children 4:parents */
1598
- int showfilesFlag = 0 ;
1599
- showfilesFlag = find_option("showfiles","f", 0)!=0;
1598
+ int verboseFlag = 0 ;
1599
+ verboseFlag = find_option("verbose","v", 0)!=0;
1600
+ if( !verboseFlag){
1601
+ verboseFlag = find_option("showfiles","f", 0)!=0; /* deprecated */
1602
+ }
16001603
db_find_and_open_repository(0, 0);
16011604
zLimit = find_option("limit","n",1);
16021605
zType = find_option("type","t",1);
16031606
if ( !zLimit ){
16041607
zLimit = find_option("count",0,1);
@@ -1683,11 +1686,11 @@
16831686
blob_appendf(&sql, " AND event.type=%Q ", zType);
16841687
}
16851688
blob_appendf(&sql, " ORDER BY event.mtime DESC");
16861689
db_prepare(&q, blob_str(&sql));
16871690
blob_reset(&sql);
1688
- print_timeline(&q, n, showfilesFlag);
1691
+ print_timeline(&q, n, verboseFlag);
16891692
db_finalize(&q);
16901693
}
16911694
16921695
/*
16931696
** This is a version of the "localtime()" function from the standard
@@ -1717,31 +1720,34 @@
17171720
17181721
17191722
/*
17201723
** COMMAND: test-timewarp-list
17211724
**
1722
-** Usage: %fossil test-timewarp-list ?--detail?
1725
+** Usage: %fossil test-timewarp-list ?-v|--verbose?
17231726
**
17241727
** Display all instances of child checkins that appear earlier in time
1725
-** than their parent. If the --detail option is provided, both the
1728
+** than their parent. If the --verbose option is provided, both the
17261729
** parent and child checking and their times are shown.
17271730
*/
17281731
void test_timewarp_cmd(void){
17291732
Stmt q;
1730
- int showDetail;
1733
+ int verboseFlag;
17311734
17321735
db_find_and_open_repository(0, 0);
1733
- showDetail = find_option("detail", 0, 0)!=0;
1736
+ verboseFlag = find_option("verbose", "v", 0)!=0;
1737
+ if( !verboseFlag ){
1738
+ verboseFlag = find_option("detail", 0, 0)!=0; /* deprecated */
1739
+ }
17341740
db_prepare(&q,
17351741
"SELECT (SELECT uuid FROM blob WHERE rid=p.cid),"
17361742
" (SELECT uuid FROM blob WHERE rid=c.cid),"
17371743
" datetime(p.mtime), datetime(c.mtime)"
17381744
" FROM plink p, plink c"
17391745
" WHERE p.cid=c.pid AND p.mtime>c.mtime"
17401746
);
17411747
while( db_step(&q)==SQLITE_ROW ){
1742
- if( !showDetail ){
1748
+ if( !verboseFlag ){
17431749
fossil_print("%s\n", db_column_text(&q, 1));
17441750
}else{
17451751
fossil_print("%.14s -> %.14s %s -> %s\n",
17461752
db_column_text(&q, 0),
17471753
db_column_text(&q, 1),
17481754
--- src/timeline.c
+++ src/timeline.c
@@ -375,11 +375,11 @@
375 @ (user: %z(href("%z",zLink))%h(zDispUser)</a>%s(zTagList?",":"\051")
376 }else{
377 @ (user: %h(zDispUser)%s(zTagList?",":"\051")
378 }
379
380 /* Generate a "detail" link for tags. */
381 if( (zType[0]=='g' || zType[0]=='w' || zType[0]=='t') && g.perm.Hyperlink ){
382 @ [%z(href("%R/info/%S",zUuid))details</a>]
383 }
384
385 /* Generate the "tags: TAGLIST" at the end of the comment, together
@@ -956,11 +956,11 @@
956 ** u=USER only if belonging to this user
957 ** y=TYPE 'ci', 'w', 't', 'e'
958 ** s=TEXT string search (comment and brief)
959 ** ng Suppress the graph if present
960 ** nd Suppress "divider" lines
961 ** fc Show details of files changed
962 ** f=UUID Show family (immediate parents and children) of UUID
963 ** from=UUID Path from...
964 ** to=UUID ... to this
965 ** nomerge ... avoid merge links on the path
966 ** uf=FUUID Show only checkins that use given file version
@@ -1071,13 +1071,13 @@
1071 timeline_temp_table();
1072 blob_zero(&sql);
1073 blob_zero(&desc);
1074 blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1);
1075 blob_append(&sql, timeline_query_for_www(), -1);
1076 if( P("fc")!=0 || P("detail")!=0 ){
1077 tmFlags |= TIMELINE_FCHANGES;
1078 url_add_parameter(&url, "fc", 0);
1079 }
1080 if( !useDividers ) url_add_parameter(&url, "nd", 0);
1081 if( ((from_rid && to_rid) || (me_rid && you_rid)) && g.perm.Read ){
1082 /* If from= and to= are present, display all nodes on a path connecting
1083 ** the two */
@@ -1382,13 +1382,13 @@
1382 if( nEntry<200 ){
1383 timeline_submenu(&url, "200 Entries", "n", "200", 0);
1384 }
1385 if( zType[0]=='a' || zType[0]=='c' ){
1386 if( tmFlags & TIMELINE_FCHANGES ){
1387 timeline_submenu(&url, "Hide Files", "fc", 0, 0);
1388 }else{
1389 timeline_submenu(&url, "Show Files", "fc", "", 0);
1390 }
1391 }
1392 }
1393 }
1394 if( P("showsql") ){
@@ -1418,11 +1418,11 @@
1418 ** 4. Number of non-merge children
1419 ** 5. Number of parents
1420 ** 6. mtime
1421 ** 7. branch
1422 */
1423 void print_timeline(Stmt *q, int mxLine, int showfiles){
1424 int nLine = 0;
1425 char zPrevDate[20];
1426 const char *zCurrentUuid=0;
1427 int fchngQueryInit = 0; /* True if fchngQuery is initialized */
1428 Stmt fchngQuery; /* Query for file changes on check-ins */
@@ -1474,11 +1474,11 @@
1474 }
1475 zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom);
1476 nLine += comment_print(zFree, 9, 79);
1477 sqlite3_free(zFree);
1478
1479 if(showfiles){
1480 if( !fchngQueryInit ){
1481 db_prepare(&fchngQuery,
1482 "SELECT (pid==0) AS isnew,"
1483 " (fid==0) AS isdel,"
1484 " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name,"
@@ -1573,11 +1573,11 @@
1573 ** The DATETIME should be in the ISO8601 format. For
1574 ** examples: "2007-08-18 07:21:21". You can also say "current"
1575 ** for the current version or "now" for the current time.
1576 **
1577 ** Options:
1578 ** -f|--showfiles print the list of files changed in a checkin after
1579 ** the checkin comment.
1580 ** -n|--limit N display the first N changes (default 20)
1581 ** -t|--type TYPE only display items from the give types, such as:
1582 ** ci = file commits only
1583 ** e = events only
@@ -1593,12 +1593,15 @@
1593 char *zDate;
1594 Blob sql;
1595 int objid = 0;
1596 Blob uuid;
1597 int mode = 0 ; /* 0:none 1: before 2:after 3:children 4:parents */
1598 int showfilesFlag = 0 ;
1599 showfilesFlag = find_option("showfiles","f", 0)!=0;
 
 
 
1600 db_find_and_open_repository(0, 0);
1601 zLimit = find_option("limit","n",1);
1602 zType = find_option("type","t",1);
1603 if ( !zLimit ){
1604 zLimit = find_option("count",0,1);
@@ -1683,11 +1686,11 @@
1683 blob_appendf(&sql, " AND event.type=%Q ", zType);
1684 }
1685 blob_appendf(&sql, " ORDER BY event.mtime DESC");
1686 db_prepare(&q, blob_str(&sql));
1687 blob_reset(&sql);
1688 print_timeline(&q, n, showfilesFlag);
1689 db_finalize(&q);
1690 }
1691
1692 /*
1693 ** This is a version of the "localtime()" function from the standard
@@ -1717,31 +1720,34 @@
1717
1718
1719 /*
1720 ** COMMAND: test-timewarp-list
1721 **
1722 ** Usage: %fossil test-timewarp-list ?--detail?
1723 **
1724 ** Display all instances of child checkins that appear earlier in time
1725 ** than their parent. If the --detail option is provided, both the
1726 ** parent and child checking and their times are shown.
1727 */
1728 void test_timewarp_cmd(void){
1729 Stmt q;
1730 int showDetail;
1731
1732 db_find_and_open_repository(0, 0);
1733 showDetail = find_option("detail", 0, 0)!=0;
 
 
 
1734 db_prepare(&q,
1735 "SELECT (SELECT uuid FROM blob WHERE rid=p.cid),"
1736 " (SELECT uuid FROM blob WHERE rid=c.cid),"
1737 " datetime(p.mtime), datetime(c.mtime)"
1738 " FROM plink p, plink c"
1739 " WHERE p.cid=c.pid AND p.mtime>c.mtime"
1740 );
1741 while( db_step(&q)==SQLITE_ROW ){
1742 if( !showDetail ){
1743 fossil_print("%s\n", db_column_text(&q, 1));
1744 }else{
1745 fossil_print("%.14s -> %.14s %s -> %s\n",
1746 db_column_text(&q, 0),
1747 db_column_text(&q, 1),
1748
--- src/timeline.c
+++ src/timeline.c
@@ -375,11 +375,11 @@
375 @ (user: %z(href("%z",zLink))%h(zDispUser)</a>%s(zTagList?",":"\051")
376 }else{
377 @ (user: %h(zDispUser)%s(zTagList?",":"\051")
378 }
379
380 /* Generate a "details" link for tags. */
381 if( (zType[0]=='g' || zType[0]=='w' || zType[0]=='t') && g.perm.Hyperlink ){
382 @ [%z(href("%R/info/%S",zUuid))details</a>]
383 }
384
385 /* Generate the "tags: TAGLIST" at the end of the comment, together
@@ -956,11 +956,11 @@
956 ** u=USER only if belonging to this user
957 ** y=TYPE 'ci', 'w', 't', 'e'
958 ** s=TEXT string search (comment and brief)
959 ** ng Suppress the graph if present
960 ** nd Suppress "divider" lines
961 ** v Show details of files changed
962 ** f=UUID Show family (immediate parents and children) of UUID
963 ** from=UUID Path from...
964 ** to=UUID ... to this
965 ** nomerge ... avoid merge links on the path
966 ** uf=FUUID Show only checkins that use given file version
@@ -1071,13 +1071,13 @@
1071 timeline_temp_table();
1072 blob_zero(&sql);
1073 blob_zero(&desc);
1074 blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1);
1075 blob_append(&sql, timeline_query_for_www(), -1);
1076 if( P("v")!=0 || P("verbose")!=0 ){
1077 tmFlags |= TIMELINE_FCHANGES;
1078 url_add_parameter(&url, "v", 0);
1079 }
1080 if( !useDividers ) url_add_parameter(&url, "nd", 0);
1081 if( ((from_rid && to_rid) || (me_rid && you_rid)) && g.perm.Read ){
1082 /* If from= and to= are present, display all nodes on a path connecting
1083 ** the two */
@@ -1382,13 +1382,13 @@
1382 if( nEntry<200 ){
1383 timeline_submenu(&url, "200 Entries", "n", "200", 0);
1384 }
1385 if( zType[0]=='a' || zType[0]=='c' ){
1386 if( tmFlags & TIMELINE_FCHANGES ){
1387 timeline_submenu(&url, "Hide Files", "v", 0, 0);
1388 }else{
1389 timeline_submenu(&url, "Show Files", "v", "", 0);
1390 }
1391 }
1392 }
1393 }
1394 if( P("showsql") ){
@@ -1418,11 +1418,11 @@
1418 ** 4. Number of non-merge children
1419 ** 5. Number of parents
1420 ** 6. mtime
1421 ** 7. branch
1422 */
1423 void print_timeline(Stmt *q, int mxLine, int verboseFlag){
1424 int nLine = 0;
1425 char zPrevDate[20];
1426 const char *zCurrentUuid=0;
1427 int fchngQueryInit = 0; /* True if fchngQuery is initialized */
1428 Stmt fchngQuery; /* Query for file changes on check-ins */
@@ -1474,11 +1474,11 @@
1474 }
1475 zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom);
1476 nLine += comment_print(zFree, 9, 79);
1477 sqlite3_free(zFree);
1478
1479 if(verboseFlag){
1480 if( !fchngQueryInit ){
1481 db_prepare(&fchngQuery,
1482 "SELECT (pid==0) AS isnew,"
1483 " (fid==0) AS isdel,"
1484 " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name,"
@@ -1573,11 +1573,11 @@
1573 ** The DATETIME should be in the ISO8601 format. For
1574 ** examples: "2007-08-18 07:21:21". You can also say "current"
1575 ** for the current version or "now" for the current time.
1576 **
1577 ** Options:
1578 ** -v|--verbose print the list of files changed in a checkin after
1579 ** the checkin comment.
1580 ** -n|--limit N display the first N changes (default 20)
1581 ** -t|--type TYPE only display items from the give types, such as:
1582 ** ci = file commits only
1583 ** e = events only
@@ -1593,12 +1593,15 @@
1593 char *zDate;
1594 Blob sql;
1595 int objid = 0;
1596 Blob uuid;
1597 int mode = 0 ; /* 0:none 1: before 2:after 3:children 4:parents */
1598 int verboseFlag = 0 ;
1599 verboseFlag = find_option("verbose","v", 0)!=0;
1600 if( !verboseFlag){
1601 verboseFlag = find_option("showfiles","f", 0)!=0; /* deprecated */
1602 }
1603 db_find_and_open_repository(0, 0);
1604 zLimit = find_option("limit","n",1);
1605 zType = find_option("type","t",1);
1606 if ( !zLimit ){
1607 zLimit = find_option("count",0,1);
@@ -1683,11 +1686,11 @@
1686 blob_appendf(&sql, " AND event.type=%Q ", zType);
1687 }
1688 blob_appendf(&sql, " ORDER BY event.mtime DESC");
1689 db_prepare(&q, blob_str(&sql));
1690 blob_reset(&sql);
1691 print_timeline(&q, n, verboseFlag);
1692 db_finalize(&q);
1693 }
1694
1695 /*
1696 ** This is a version of the "localtime()" function from the standard
@@ -1717,31 +1720,34 @@
1720
1721
1722 /*
1723 ** COMMAND: test-timewarp-list
1724 **
1725 ** Usage: %fossil test-timewarp-list ?-v|--verbose?
1726 **
1727 ** Display all instances of child checkins that appear earlier in time
1728 ** than their parent. If the --verbose option is provided, both the
1729 ** parent and child checking and their times are shown.
1730 */
1731 void test_timewarp_cmd(void){
1732 Stmt q;
1733 int verboseFlag;
1734
1735 db_find_and_open_repository(0, 0);
1736 verboseFlag = find_option("verbose", "v", 0)!=0;
1737 if( !verboseFlag ){
1738 verboseFlag = find_option("detail", 0, 0)!=0; /* deprecated */
1739 }
1740 db_prepare(&q,
1741 "SELECT (SELECT uuid FROM blob WHERE rid=p.cid),"
1742 " (SELECT uuid FROM blob WHERE rid=c.cid),"
1743 " datetime(p.mtime), datetime(c.mtime)"
1744 " FROM plink p, plink c"
1745 " WHERE p.cid=c.pid AND p.mtime>c.mtime"
1746 );
1747 while( db_step(&q)==SQLITE_ROW ){
1748 if( !verboseFlag ){
1749 fossil_print("%s\n", db_column_text(&q, 1));
1750 }else{
1751 fossil_print("%.14s -> %.14s %s -> %s\n",
1752 db_column_text(&q, 0),
1753 db_column_text(&q, 1),
1754

Keyboard Shortcuts

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