Fossil SCM

Add the "notime" query parameter to the www timeline display.

drh 2014-11-08 18:58 UTC trunk
Commit ce4d3fce528a3ad9ce0f87bfd8ccb0499b0781f4
2 files changed +9 -1 +23 -10
+9 -1
--- src/timeline.c
+++ src/timeline.c
@@ -77,10 +77,11 @@
7777
#define TIMELINE_FCHANGES 0x0020 /* Detail file changes */
7878
#define TIMELINE_BRCOLOR 0x0040 /* Background color by branch name */
7979
#define TIMELINE_UCOLOR 0x0080 /* Background color by user */
8080
#define TIMELINE_FRENAMES 0x0100 /* Detail only file name changes */
8181
#define TIMELINE_UNHIDE 0x0200 /* Unhide check-ins with "hidden" tag */
82
+#define TIMELINE_OMITTIME 0x0400 /* Omit all date and time marks */
8283
#endif
8384
8485
/*
8586
** Hash a string and use the hash to determine a background color.
8687
*/
@@ -285,11 +286,13 @@
285286
}
286287
prevWasDivider = 1;
287288
continue;
288289
}
289290
prevWasDivider = 0;
290
- if( dateFormat<2 ){
291
+ if( tmFlags & TIMELINE_OMITTIME ){
292
+ zTime[0] = 0;
293
+ }else if( dateFormat<2 ){
291294
if( fossil_strnicmp(zDate, zPrevDate, 10) ){
292295
sqlite3_snprintf(sizeof(zPrevDate), zPrevDate, "%.10s", zDate);
293296
@ <tr><td>
294297
@ <div class="divider timelineDate">%s(zPrevDate)</div>
295298
@ </td><td></td><td></td></tr>
@@ -1011,10 +1014,11 @@
10111014
** uf=FUUID Show only checkins that use given file version
10121015
** brbg Background color from branch name
10131016
** ubg Background color from user
10141017
** namechng Show only checkins that filename changes
10151018
** ym=YYYY-MM Shown only events for the given year/month.
1019
+** notime Omit timestamps from the display
10161020
**
10171021
** p= and d= can appear individually or together. If either p= or d=
10181022
** appear, then u=, y=, a=, and b= are ignored.
10191023
**
10201024
** If a= and b= appear, only a= is used. If neither appear, the most
@@ -1080,10 +1084,14 @@
10801084
if( zType[0]=='a' ){
10811085
tmFlags = TIMELINE_BRIEF | TIMELINE_GRAPH;
10821086
}else{
10831087
tmFlags = TIMELINE_GRAPH;
10841088
}
1089
+ if( P("notime")!=0 ){
1090
+ tmFlags |= TIMELINE_OMITTIME;
1091
+ url_add_parameter(&url, "notime", "1");
1092
+ }
10851093
url_add_parameter(&url, "n", mprintf("%d", nEntry));
10861094
if( P("ng")!=0 || zSearch!=0 ){
10871095
tmFlags &= ~TIMELINE_GRAPH;
10881096
url_add_parameter(&url, "ng", 0);
10891097
}
10901098
--- src/timeline.c
+++ src/timeline.c
@@ -77,10 +77,11 @@
77 #define TIMELINE_FCHANGES 0x0020 /* Detail file changes */
78 #define TIMELINE_BRCOLOR 0x0040 /* Background color by branch name */
79 #define TIMELINE_UCOLOR 0x0080 /* Background color by user */
80 #define TIMELINE_FRENAMES 0x0100 /* Detail only file name changes */
81 #define TIMELINE_UNHIDE 0x0200 /* Unhide check-ins with "hidden" tag */
 
82 #endif
83
84 /*
85 ** Hash a string and use the hash to determine a background color.
86 */
@@ -285,11 +286,13 @@
285 }
286 prevWasDivider = 1;
287 continue;
288 }
289 prevWasDivider = 0;
290 if( dateFormat<2 ){
 
 
291 if( fossil_strnicmp(zDate, zPrevDate, 10) ){
292 sqlite3_snprintf(sizeof(zPrevDate), zPrevDate, "%.10s", zDate);
293 @ <tr><td>
294 @ <div class="divider timelineDate">%s(zPrevDate)</div>
295 @ </td><td></td><td></td></tr>
@@ -1011,10 +1014,11 @@
1011 ** uf=FUUID Show only checkins that use given file version
1012 ** brbg Background color from branch name
1013 ** ubg Background color from user
1014 ** namechng Show only checkins that filename changes
1015 ** ym=YYYY-MM Shown only events for the given year/month.
 
1016 **
1017 ** p= and d= can appear individually or together. If either p= or d=
1018 ** appear, then u=, y=, a=, and b= are ignored.
1019 **
1020 ** If a= and b= appear, only a= is used. If neither appear, the most
@@ -1080,10 +1084,14 @@
1080 if( zType[0]=='a' ){
1081 tmFlags = TIMELINE_BRIEF | TIMELINE_GRAPH;
1082 }else{
1083 tmFlags = TIMELINE_GRAPH;
1084 }
 
 
 
 
1085 url_add_parameter(&url, "n", mprintf("%d", nEntry));
1086 if( P("ng")!=0 || zSearch!=0 ){
1087 tmFlags &= ~TIMELINE_GRAPH;
1088 url_add_parameter(&url, "ng", 0);
1089 }
1090
--- src/timeline.c
+++ src/timeline.c
@@ -77,10 +77,11 @@
77 #define TIMELINE_FCHANGES 0x0020 /* Detail file changes */
78 #define TIMELINE_BRCOLOR 0x0040 /* Background color by branch name */
79 #define TIMELINE_UCOLOR 0x0080 /* Background color by user */
80 #define TIMELINE_FRENAMES 0x0100 /* Detail only file name changes */
81 #define TIMELINE_UNHIDE 0x0200 /* Unhide check-ins with "hidden" tag */
82 #define TIMELINE_OMITTIME 0x0400 /* Omit all date and time marks */
83 #endif
84
85 /*
86 ** Hash a string and use the hash to determine a background color.
87 */
@@ -285,11 +286,13 @@
286 }
287 prevWasDivider = 1;
288 continue;
289 }
290 prevWasDivider = 0;
291 if( tmFlags & TIMELINE_OMITTIME ){
292 zTime[0] = 0;
293 }else if( dateFormat<2 ){
294 if( fossil_strnicmp(zDate, zPrevDate, 10) ){
295 sqlite3_snprintf(sizeof(zPrevDate), zPrevDate, "%.10s", zDate);
296 @ <tr><td>
297 @ <div class="divider timelineDate">%s(zPrevDate)</div>
298 @ </td><td></td><td></td></tr>
@@ -1011,10 +1014,11 @@
1014 ** uf=FUUID Show only checkins that use given file version
1015 ** brbg Background color from branch name
1016 ** ubg Background color from user
1017 ** namechng Show only checkins that filename changes
1018 ** ym=YYYY-MM Shown only events for the given year/month.
1019 ** notime Omit timestamps from the display
1020 **
1021 ** p= and d= can appear individually or together. If either p= or d=
1022 ** appear, then u=, y=, a=, and b= are ignored.
1023 **
1024 ** If a= and b= appear, only a= is used. If neither appear, the most
@@ -1080,10 +1084,14 @@
1084 if( zType[0]=='a' ){
1085 tmFlags = TIMELINE_BRIEF | TIMELINE_GRAPH;
1086 }else{
1087 tmFlags = TIMELINE_GRAPH;
1088 }
1089 if( P("notime")!=0 ){
1090 tmFlags |= TIMELINE_OMITTIME;
1091 url_add_parameter(&url, "notime", "1");
1092 }
1093 url_add_parameter(&url, "n", mprintf("%d", nEntry));
1094 if( P("ng")!=0 || zSearch!=0 ){
1095 tmFlags &= ~TIMELINE_GRAPH;
1096 url_add_parameter(&url, "ng", 0);
1097 }
1098
+23 -10
--- www/makefile.wiki
+++ www/makefile.wiki
@@ -1,11 +1,11 @@
11
<title>The Fossil Build Process</title>
22
33
<h1>1.0 Introduction</h1>
44
55
The build process for Fossil is tricky in that the source code
6
-needs to be processed by three different preprocessor programs
6
+needs to be processed by multiple preprocessor programs
77
before it is compiled. Most users will download a
88
[http://www.fossil-scm.org/download.html | precompiled binary]
99
so this is of no consequence to them, and even those who
1010
want to compile the code themselves can use one of the
1111
[./build.wiki | existing makefiles].
@@ -27,19 +27,20 @@
2727
are:
2828
2929
1. mkindex.c
3030
2. translate.c
3131
3. makeheaders.c
32
+ 4. mkbuiltin.c
3233
3334
Fossil makes use of [http://www.sqlite.org/ | SQLite] for on-disk
3435
storage. The SQLite implementation is contained in three source
3536
code files that do not participate in the preprocessing steps.
3637
These three files that implement SQLite are:
3738
38
- 4. sqlite3.c
39
- 5. sqlite3.h
40
- 6. shell.c
39
+ 5. sqlite3.c
40
+ 6. sqlite3.h
41
+ 7. shell.c
4142
4243
The sqlite3.c and sqlite3.h source files are byte-for-byte copies of a
4344
standard [http://www.sqlite.org/amalgamation.html | amalgamation].
4445
The shell.c source file is code for the SQLite
4546
[http://www.sqlite.org/sqlite.html | command-line shell] that is used
@@ -47,39 +48,46 @@
4748
shell.c source file is also a byte-for-byte copy of the
4849
shell.c file from the SQLite release.
4950
5051
The TH1 script engine is implemented using files:
5152
52
- 7. th.c
53
- 8. th.h
53
+ 8. th.c
54
+ 9. th.h
5455
5556
These two files are imports like the SQLite source files,
5657
and so are not preprocessed.
5758
5859
The VERSION.h header file is generated from other information sources
5960
using a small program called:
6061
61
- 9. mkversion.c
62
+ 10. mkversion.c
6263
6364
The src/ subdirectory also contains documentation about the
6465
makeheaders preprocessor program:
6566
66
- 10. [../src/makeheaders.html | makeheaders.html]
67
+ 11. [../src/makeheaders.html | makeheaders.html]
6768
6869
Click on the link to read this documentation. In addition there is
6970
a [http://www.tcl.tk/ | Tcl] script used to build the various makefiles:
7071
71
- 11. makemake.tcl
72
+ 12. makemake.tcl
7273
7374
Running this Tcl script will automatically regenerate all makefiles.
7475
In order to add a new source file to the Fossil implementation, simply
7576
edit makemake.tcl to add the new filename, then rerun the script, and
7677
all of the makefiles for all targets will be rebuild.
78
+
79
+There is a static checker program that analyzes the printf-style format
80
+strings used in SQLite for errors. This static checker is not required
81
+to build Fossil (it is only a validation step) but it is included in this
82
+list for completeness and because the makefiles will invoke it:
83
+
84
+ 13. ../tool/format_check.c
7785
7886
Finally, there is one of the makefiles generated by makemake.tcl:
7987
80
- 12. main.mk
88
+ 14. main.mk
8189
8290
The main.mk makefile is invoked from the Makefile in the top-level
8391
directory. The main.mk is generated by makemake.tcl and should not
8492
be hand edited. Other makefiles generated by makemake.tcl are in
8593
other subdirectories (currently all in the win/ subdirectory).
@@ -116,10 +124,15 @@
116124
The pathnames in the above command might need to be adjusted to get the
117125
directories right. The point is that the manifest.uuid, manifest, and
118126
VERSION files
119127
in the root of the source tree are the three arguments and
120128
the generated VERSION.h file appears on standard output.
129
+
130
+The "builtin_data.h" header file contains definitions of byte arrays for
131
+various text and binary files that are built into the Fossil executable.
132
+The "builtin_data.h" file is generated by the "mkbuiltin" executable which
133
+is built from the "mkbuiltin.c" source file.s
121134
122135
<a name="preprocessing"></a>
123136
<h1>4.0 Preprocessing</h1>
124137
125138
There are three preprocessors for the Fossil sources. The mkindex
126139
--- www/makefile.wiki
+++ www/makefile.wiki
@@ -1,11 +1,11 @@
1 <title>The Fossil Build Process</title>
2
3 <h1>1.0 Introduction</h1>
4
5 The build process for Fossil is tricky in that the source code
6 needs to be processed by three different preprocessor programs
7 before it is compiled. Most users will download a
8 [http://www.fossil-scm.org/download.html | precompiled binary]
9 so this is of no consequence to them, and even those who
10 want to compile the code themselves can use one of the
11 [./build.wiki | existing makefiles].
@@ -27,19 +27,20 @@
27 are:
28
29 1. mkindex.c
30 2. translate.c
31 3. makeheaders.c
 
32
33 Fossil makes use of [http://www.sqlite.org/ | SQLite] for on-disk
34 storage. The SQLite implementation is contained in three source
35 code files that do not participate in the preprocessing steps.
36 These three files that implement SQLite are:
37
38 4. sqlite3.c
39 5. sqlite3.h
40 6. shell.c
41
42 The sqlite3.c and sqlite3.h source files are byte-for-byte copies of a
43 standard [http://www.sqlite.org/amalgamation.html | amalgamation].
44 The shell.c source file is code for the SQLite
45 [http://www.sqlite.org/sqlite.html | command-line shell] that is used
@@ -47,39 +48,46 @@
47 shell.c source file is also a byte-for-byte copy of the
48 shell.c file from the SQLite release.
49
50 The TH1 script engine is implemented using files:
51
52 7. th.c
53 8. th.h
54
55 These two files are imports like the SQLite source files,
56 and so are not preprocessed.
57
58 The VERSION.h header file is generated from other information sources
59 using a small program called:
60
61 9. mkversion.c
62
63 The src/ subdirectory also contains documentation about the
64 makeheaders preprocessor program:
65
66 10. [../src/makeheaders.html | makeheaders.html]
67
68 Click on the link to read this documentation. In addition there is
69 a [http://www.tcl.tk/ | Tcl] script used to build the various makefiles:
70
71 11. makemake.tcl
72
73 Running this Tcl script will automatically regenerate all makefiles.
74 In order to add a new source file to the Fossil implementation, simply
75 edit makemake.tcl to add the new filename, then rerun the script, and
76 all of the makefiles for all targets will be rebuild.
 
 
 
 
 
 
 
77
78 Finally, there is one of the makefiles generated by makemake.tcl:
79
80 12. main.mk
81
82 The main.mk makefile is invoked from the Makefile in the top-level
83 directory. The main.mk is generated by makemake.tcl and should not
84 be hand edited. Other makefiles generated by makemake.tcl are in
85 other subdirectories (currently all in the win/ subdirectory).
@@ -116,10 +124,15 @@
116 The pathnames in the above command might need to be adjusted to get the
117 directories right. The point is that the manifest.uuid, manifest, and
118 VERSION files
119 in the root of the source tree are the three arguments and
120 the generated VERSION.h file appears on standard output.
 
 
 
 
 
121
122 <a name="preprocessing"></a>
123 <h1>4.0 Preprocessing</h1>
124
125 There are three preprocessors for the Fossil sources. The mkindex
126
--- www/makefile.wiki
+++ www/makefile.wiki
@@ -1,11 +1,11 @@
1 <title>The Fossil Build Process</title>
2
3 <h1>1.0 Introduction</h1>
4
5 The build process for Fossil is tricky in that the source code
6 needs to be processed by multiple preprocessor programs
7 before it is compiled. Most users will download a
8 [http://www.fossil-scm.org/download.html | precompiled binary]
9 so this is of no consequence to them, and even those who
10 want to compile the code themselves can use one of the
11 [./build.wiki | existing makefiles].
@@ -27,19 +27,20 @@
27 are:
28
29 1. mkindex.c
30 2. translate.c
31 3. makeheaders.c
32 4. mkbuiltin.c
33
34 Fossil makes use of [http://www.sqlite.org/ | SQLite] for on-disk
35 storage. The SQLite implementation is contained in three source
36 code files that do not participate in the preprocessing steps.
37 These three files that implement SQLite are:
38
39 5. sqlite3.c
40 6. sqlite3.h
41 7. shell.c
42
43 The sqlite3.c and sqlite3.h source files are byte-for-byte copies of a
44 standard [http://www.sqlite.org/amalgamation.html | amalgamation].
45 The shell.c source file is code for the SQLite
46 [http://www.sqlite.org/sqlite.html | command-line shell] that is used
@@ -47,39 +48,46 @@
48 shell.c source file is also a byte-for-byte copy of the
49 shell.c file from the SQLite release.
50
51 The TH1 script engine is implemented using files:
52
53 8. th.c
54 9. th.h
55
56 These two files are imports like the SQLite source files,
57 and so are not preprocessed.
58
59 The VERSION.h header file is generated from other information sources
60 using a small program called:
61
62 10. mkversion.c
63
64 The src/ subdirectory also contains documentation about the
65 makeheaders preprocessor program:
66
67 11. [../src/makeheaders.html | makeheaders.html]
68
69 Click on the link to read this documentation. In addition there is
70 a [http://www.tcl.tk/ | Tcl] script used to build the various makefiles:
71
72 12. makemake.tcl
73
74 Running this Tcl script will automatically regenerate all makefiles.
75 In order to add a new source file to the Fossil implementation, simply
76 edit makemake.tcl to add the new filename, then rerun the script, and
77 all of the makefiles for all targets will be rebuild.
78
79 There is a static checker program that analyzes the printf-style format
80 strings used in SQLite for errors. This static checker is not required
81 to build Fossil (it is only a validation step) but it is included in this
82 list for completeness and because the makefiles will invoke it:
83
84 13. ../tool/format_check.c
85
86 Finally, there is one of the makefiles generated by makemake.tcl:
87
88 14. main.mk
89
90 The main.mk makefile is invoked from the Makefile in the top-level
91 directory. The main.mk is generated by makemake.tcl and should not
92 be hand edited. Other makefiles generated by makemake.tcl are in
93 other subdirectories (currently all in the win/ subdirectory).
@@ -116,10 +124,15 @@
124 The pathnames in the above command might need to be adjusted to get the
125 directories right. The point is that the manifest.uuid, manifest, and
126 VERSION files
127 in the root of the source tree are the three arguments and
128 the generated VERSION.h file appears on standard output.
129
130 The "builtin_data.h" header file contains definitions of byte arrays for
131 various text and binary files that are built into the Fossil executable.
132 The "builtin_data.h" file is generated by the "mkbuiltin" executable which
133 is built from the "mkbuiltin.c" source file.s
134
135 <a name="preprocessing"></a>
136 <h1>4.0 Preprocessing</h1>
137
138 There are three preprocessors for the Fossil sources. The mkindex
139

Keyboard Shortcuts

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