Fossil SCM

(config reset) now re-adds the default ticket report format. Problem reported via mailing list.

stephan 2013-04-30 18:14 trunk
Commit 679ba615f4faffaf1fa305858d6456112d320326
--- src/configure.c
+++ src/configure.c
@@ -931,10 +931,11 @@
931931
db_multi_exec("DELETE FROM concealed");
932932
}else if( fossil_strcmp(zName,"@shun")==0 ){
933933
db_multi_exec("DELETE FROM shun");
934934
}else if( fossil_strcmp(zName,"@reportfmt")==0 ){
935935
db_multi_exec("DELETE FROM reportfmt");
936
+ db_multi_exec(zRepositorySchemaReports);
936937
}
937938
}
938939
db_end_transaction(0);
939940
fossil_print("Configuration reset to factory defaults.\n");
940941
fossil_print("To recover, use: %s %s import %s\n",
941942
--- src/configure.c
+++ src/configure.c
@@ -931,10 +931,11 @@
931 db_multi_exec("DELETE FROM concealed");
932 }else if( fossil_strcmp(zName,"@shun")==0 ){
933 db_multi_exec("DELETE FROM shun");
934 }else if( fossil_strcmp(zName,"@reportfmt")==0 ){
935 db_multi_exec("DELETE FROM reportfmt");
 
936 }
937 }
938 db_end_transaction(0);
939 fossil_print("Configuration reset to factory defaults.\n");
940 fossil_print("To recover, use: %s %s import %s\n",
941
--- src/configure.c
+++ src/configure.c
@@ -931,10 +931,11 @@
931 db_multi_exec("DELETE FROM concealed");
932 }else if( fossil_strcmp(zName,"@shun")==0 ){
933 db_multi_exec("DELETE FROM shun");
934 }else if( fossil_strcmp(zName,"@reportfmt")==0 ){
935 db_multi_exec("DELETE FROM reportfmt");
936 db_multi_exec(zRepositorySchemaReports);
937 }
938 }
939 db_end_transaction(0);
940 fossil_print("Configuration reset to factory defaults.\n");
941 fossil_print("To recover, use: %s %s import %s\n",
942
+1
--- src/db.c
+++ src/db.c
@@ -1227,10 +1227,11 @@
12271227
*/
12281228
void db_create_repository(const char *zFilename){
12291229
db_init_database(
12301230
zFilename,
12311231
zRepositorySchema1,
1232
+ zRepositorySchemaReports,
12321233
zRepositorySchema2,
12331234
(char*)0
12341235
);
12351236
db_delete_on_failure(zFilename);
12361237
}
12371238
--- src/db.c
+++ src/db.c
@@ -1227,10 +1227,11 @@
1227 */
1228 void db_create_repository(const char *zFilename){
1229 db_init_database(
1230 zFilename,
1231 zRepositorySchema1,
 
1232 zRepositorySchema2,
1233 (char*)0
1234 );
1235 db_delete_on_failure(zFilename);
1236 }
1237
--- src/db.c
+++ src/db.c
@@ -1227,10 +1227,11 @@
1227 */
1228 void db_create_repository(const char *zFilename){
1229 db_init_database(
1230 zFilename,
1231 zRepositorySchema1,
1232 zRepositorySchemaReports,
1233 zRepositorySchema2,
1234 (char*)0
1235 );
1236 db_delete_on_failure(zFilename);
1237 }
1238
+20 -14
--- src/schema.c
+++ src/schema.c
@@ -153,10 +153,30 @@
153153
@ -- table. Private artifacts are omitted from the "unclustered" and
154154
@ -- "unsent" tables.
155155
@ --
156156
@ CREATE TABLE private(rid INTEGER PRIMARY KEY);
157157
@
158
+@ -- Some ticket content (such as the originators email address or contact
159
+@ -- information) needs to be obscured to protect privacy. This is achieved
160
+@ -- by storing an SHA1 hash of the content. For display, the hash is
161
+@ -- mapped back into the original text using this table.
162
+@ --
163
+@ -- This table contains sensitive information and should not be shared
164
+@ -- with unauthorized users.
165
+@ --
166
+@ CREATE TABLE concealed(
167
+@ hash TEXT PRIMARY KEY, -- The SHA1 hash of content
168
+@ mtime DATE, -- Time created. Seconds since 1970
169
+@ content TEXT -- Content intended to be concealed
170
+@ );
171
+;
172
+
173
+/*
174
+** The reportfmt parts of the schema. This is in an extra script so
175
+** that (configure reset) can install the default report.
176
+*/
177
+const char zRepositorySchemaReports[] =
158178
@ -- An entry in this table describes a database query that generates a
159179
@ -- table of tickets.
160180
@ --
161181
@ CREATE TABLE reportfmt(
162182
@ rn INTEGER PRIMARY KEY, -- Report number
@@ -185,24 +205,10 @@
185205
@ type,
186206
@ status,
187207
@ subsystem,
188208
@ title
189209
@ FROM ticket');
190
-@
191
-@ -- Some ticket content (such as the originators email address or contact
192
-@ -- information) needs to be obscured to protect privacy. This is achieved
193
-@ -- by storing an SHA1 hash of the content. For display, the hash is
194
-@ -- mapped back into the original text using this table.
195
-@ --
196
-@ -- This table contains sensitive information and should not be shared
197
-@ -- with unauthorized users.
198
-@ --
199
-@ CREATE TABLE concealed(
200
-@ hash TEXT PRIMARY KEY, -- The SHA1 hash of content
201
-@ mtime DATE, -- Time created. Seconds since 1970
202
-@ content TEXT -- Content intended to be concealed
203
-@ );
204210
;
205211
206212
const char zRepositorySchema2[] =
207213
@ -- Filenames
208214
@ --
209215
--- src/schema.c
+++ src/schema.c
@@ -153,10 +153,30 @@
153 @ -- table. Private artifacts are omitted from the "unclustered" and
154 @ -- "unsent" tables.
155 @ --
156 @ CREATE TABLE private(rid INTEGER PRIMARY KEY);
157 @
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158 @ -- An entry in this table describes a database query that generates a
159 @ -- table of tickets.
160 @ --
161 @ CREATE TABLE reportfmt(
162 @ rn INTEGER PRIMARY KEY, -- Report number
@@ -185,24 +205,10 @@
185 @ type,
186 @ status,
187 @ subsystem,
188 @ title
189 @ FROM ticket');
190 @
191 @ -- Some ticket content (such as the originators email address or contact
192 @ -- information) needs to be obscured to protect privacy. This is achieved
193 @ -- by storing an SHA1 hash of the content. For display, the hash is
194 @ -- mapped back into the original text using this table.
195 @ --
196 @ -- This table contains sensitive information and should not be shared
197 @ -- with unauthorized users.
198 @ --
199 @ CREATE TABLE concealed(
200 @ hash TEXT PRIMARY KEY, -- The SHA1 hash of content
201 @ mtime DATE, -- Time created. Seconds since 1970
202 @ content TEXT -- Content intended to be concealed
203 @ );
204 ;
205
206 const char zRepositorySchema2[] =
207 @ -- Filenames
208 @ --
209
--- src/schema.c
+++ src/schema.c
@@ -153,10 +153,30 @@
153 @ -- table. Private artifacts are omitted from the "unclustered" and
154 @ -- "unsent" tables.
155 @ --
156 @ CREATE TABLE private(rid INTEGER PRIMARY KEY);
157 @
158 @ -- Some ticket content (such as the originators email address or contact
159 @ -- information) needs to be obscured to protect privacy. This is achieved
160 @ -- by storing an SHA1 hash of the content. For display, the hash is
161 @ -- mapped back into the original text using this table.
162 @ --
163 @ -- This table contains sensitive information and should not be shared
164 @ -- with unauthorized users.
165 @ --
166 @ CREATE TABLE concealed(
167 @ hash TEXT PRIMARY KEY, -- The SHA1 hash of content
168 @ mtime DATE, -- Time created. Seconds since 1970
169 @ content TEXT -- Content intended to be concealed
170 @ );
171 ;
172
173 /*
174 ** The reportfmt parts of the schema. This is in an extra script so
175 ** that (configure reset) can install the default report.
176 */
177 const char zRepositorySchemaReports[] =
178 @ -- An entry in this table describes a database query that generates a
179 @ -- table of tickets.
180 @ --
181 @ CREATE TABLE reportfmt(
182 @ rn INTEGER PRIMARY KEY, -- Report number
@@ -185,24 +205,10 @@
205 @ type,
206 @ status,
207 @ subsystem,
208 @ title
209 @ FROM ticket');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210 ;
211
212 const char zRepositorySchema2[] =
213 @ -- Filenames
214 @ --
215

Keyboard Shortcuts

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