Fossil SCM

Slightly hacky way of putting versioned properties in .fossil-settings dir. Version ignore-glob, binary-glob, crnl-glob and manifest. Glob splitting allows line breaks as well as spaces and commas.

ben 2011-05-21 16:18 UTC bens-expr
Commit 56b75c768ab35e7c808342f41df1e15b8f28a59e
+3 -3
--- src/add.c
+++ src/add.c
@@ -60,11 +60,11 @@
6060
"manifest.uuid",
6161
};
6262
6363
if( N>=0 && N<count(azName) ) return azName[N];
6464
if( N>=count(azName) && N<count(azName)+count(azManifest)
65
- && db_get_boolean("manifest",0) ){
65
+ && db_get_versionable_setting_boolean("manifest",0) ){
6666
return azManifest[N-count(azName)];
6767
}
6868
return 0;
6969
}
7070
@@ -185,11 +185,11 @@
185185
186186
zIgnoreFlag = find_option("ignore",0,1);
187187
includeDotFiles = find_option("dotfiles",0,0)!=0;
188188
db_must_be_within_tree();
189189
if( zIgnoreFlag==0 ){
190
- zIgnoreFlag = db_get("ignore-glob", 0);
190
+ zIgnoreFlag = db_get_versionable_setting("ignore-glob", 0);
191191
}
192192
vid = db_lget_int("checkout",0);
193193
if( vid==0 ){
194194
fossil_panic("no checkout to add to");
195195
}
@@ -337,11 +337,11 @@
337337
int nDelete = 0;
338338
Glob *pIgnore;
339339
340340
db_must_be_within_tree();
341341
if( zIgnoreFlag==0 ){
342
- zIgnoreFlag = db_get("ignore-glob", 0);
342
+ zIgnoreFlag = db_get_versionable_setting("ignore-glob", 0);
343343
}
344344
vid = db_lget_int("checkout",0);
345345
if( vid==0 ){
346346
fossil_panic("no checkout to add to");
347347
}
348348
--- src/add.c
+++ src/add.c
@@ -60,11 +60,11 @@
60 "manifest.uuid",
61 };
62
63 if( N>=0 && N<count(azName) ) return azName[N];
64 if( N>=count(azName) && N<count(azName)+count(azManifest)
65 && db_get_boolean("manifest",0) ){
66 return azManifest[N-count(azName)];
67 }
68 return 0;
69 }
70
@@ -185,11 +185,11 @@
185
186 zIgnoreFlag = find_option("ignore",0,1);
187 includeDotFiles = find_option("dotfiles",0,0)!=0;
188 db_must_be_within_tree();
189 if( zIgnoreFlag==0 ){
190 zIgnoreFlag = db_get("ignore-glob", 0);
191 }
192 vid = db_lget_int("checkout",0);
193 if( vid==0 ){
194 fossil_panic("no checkout to add to");
195 }
@@ -337,11 +337,11 @@
337 int nDelete = 0;
338 Glob *pIgnore;
339
340 db_must_be_within_tree();
341 if( zIgnoreFlag==0 ){
342 zIgnoreFlag = db_get("ignore-glob", 0);
343 }
344 vid = db_lget_int("checkout",0);
345 if( vid==0 ){
346 fossil_panic("no checkout to add to");
347 }
348
--- src/add.c
+++ src/add.c
@@ -60,11 +60,11 @@
60 "manifest.uuid",
61 };
62
63 if( N>=0 && N<count(azName) ) return azName[N];
64 if( N>=count(azName) && N<count(azName)+count(azManifest)
65 && db_get_versionable_setting_boolean("manifest",0) ){
66 return azManifest[N-count(azName)];
67 }
68 return 0;
69 }
70
@@ -185,11 +185,11 @@
185
186 zIgnoreFlag = find_option("ignore",0,1);
187 includeDotFiles = find_option("dotfiles",0,0)!=0;
188 db_must_be_within_tree();
189 if( zIgnoreFlag==0 ){
190 zIgnoreFlag = db_get_versionable_setting("ignore-glob", 0);
191 }
192 vid = db_lget_int("checkout",0);
193 if( vid==0 ){
194 fossil_panic("no checkout to add to");
195 }
@@ -337,11 +337,11 @@
337 int nDelete = 0;
338 Glob *pIgnore;
339
340 db_must_be_within_tree();
341 if( zIgnoreFlag==0 ){
342 zIgnoreFlag = db_get_versionable_setting("ignore-glob", 0);
343 }
344 vid = db_lget_int("checkout",0);
345 if( vid==0 ){
346 fossil_panic("no checkout to add to");
347 }
348
+5 -5
--- src/checkin.c
+++ src/checkin.c
@@ -224,16 +224,16 @@
224224
int allFlag = find_option("dotfiles",0,0)!=0;
225225
int outputManifest;
226226
Glob *pIgnore;
227227
228228
db_must_be_within_tree();
229
- outputManifest = db_get_boolean("manifest",0);
229
+ outputManifest = db_get_versionable_setting_boolean("manifest",0);
230230
db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
231231
n = strlen(g.zLocalRoot);
232232
blob_init(&path, g.zLocalRoot, n-1);
233233
if( zIgnoreFlag==0 ){
234
- zIgnoreFlag = db_get("ignore-glob", 0);
234
+ zIgnoreFlag = db_get_versionable_setting("ignore-glob", 0);
235235
}
236236
pIgnore = glob_create(zIgnoreFlag);
237237
vfile_scan(&path, blob_size(&path), allFlag, pIgnore);
238238
glob_free(pIgnore);
239239
db_prepare(&q,
@@ -283,11 +283,11 @@
283283
allFlag = find_option("force","f",0)!=0;
284284
dotfilesFlag = find_option("dotfiles",0,0)!=0;
285285
zIgnoreFlag = find_option("ignore",0,1);
286286
db_must_be_within_tree();
287287
if( zIgnoreFlag==0 ){
288
- zIgnoreFlag = db_get("ignore-glob", 0);
288
+ zIgnoreFlag = db_get_versionable_setting("ignore-glob", 0);
289289
}
290290
db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
291291
n = strlen(g.zLocalRoot);
292292
blob_init(&path, g.zLocalRoot, n-1);
293293
pIgnore = glob_create(zIgnoreFlag);
@@ -831,11 +831,11 @@
831831
zUserOvrd = find_option("user-override",0,1);
832832
db_must_be_within_tree();
833833
noSign = db_get_boolean("omitsign", 0)|noSign;
834834
if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; }
835835
useCksum = db_get_boolean("repo-cksum", 1);
836
- outputManifest = db_get_boolean("manifest", 0);
836
+ outputManifest = db_get_versionable_setting_boolean("manifest", 0);
837837
verify_all_options();
838838
839839
/* So that older versions of Fossil (that do not understand delta-
840840
** manifest) can continue to use this repository, do not create a new
841841
** delta-manifest unless this repository already contains one or more
@@ -972,11 +972,11 @@
972972
** the identified fils are inserted (if they have been modified).
973973
*/
974974
db_prepare(&q,
975975
"SELECT id, %Q || pathname, mrid, %s FROM vfile "
976976
"WHERE chnged==1 AND NOT deleted AND file_is_selected(id)",
977
- g.zLocalRoot, glob_expr("pathname", db_get("crnl-glob",""))
977
+ g.zLocalRoot, glob_expr("pathname", db_get_versionable_setting("crnl-glob",""))
978978
);
979979
while( db_step(&q)==SQLITE_ROW ){
980980
int id, rid;
981981
const char *zFullname;
982982
Blob content;
983983
--- src/checkin.c
+++ src/checkin.c
@@ -224,16 +224,16 @@
224 int allFlag = find_option("dotfiles",0,0)!=0;
225 int outputManifest;
226 Glob *pIgnore;
227
228 db_must_be_within_tree();
229 outputManifest = db_get_boolean("manifest",0);
230 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
231 n = strlen(g.zLocalRoot);
232 blob_init(&path, g.zLocalRoot, n-1);
233 if( zIgnoreFlag==0 ){
234 zIgnoreFlag = db_get("ignore-glob", 0);
235 }
236 pIgnore = glob_create(zIgnoreFlag);
237 vfile_scan(&path, blob_size(&path), allFlag, pIgnore);
238 glob_free(pIgnore);
239 db_prepare(&q,
@@ -283,11 +283,11 @@
283 allFlag = find_option("force","f",0)!=0;
284 dotfilesFlag = find_option("dotfiles",0,0)!=0;
285 zIgnoreFlag = find_option("ignore",0,1);
286 db_must_be_within_tree();
287 if( zIgnoreFlag==0 ){
288 zIgnoreFlag = db_get("ignore-glob", 0);
289 }
290 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
291 n = strlen(g.zLocalRoot);
292 blob_init(&path, g.zLocalRoot, n-1);
293 pIgnore = glob_create(zIgnoreFlag);
@@ -831,11 +831,11 @@
831 zUserOvrd = find_option("user-override",0,1);
832 db_must_be_within_tree();
833 noSign = db_get_boolean("omitsign", 0)|noSign;
834 if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; }
835 useCksum = db_get_boolean("repo-cksum", 1);
836 outputManifest = db_get_boolean("manifest", 0);
837 verify_all_options();
838
839 /* So that older versions of Fossil (that do not understand delta-
840 ** manifest) can continue to use this repository, do not create a new
841 ** delta-manifest unless this repository already contains one or more
@@ -972,11 +972,11 @@
972 ** the identified fils are inserted (if they have been modified).
973 */
974 db_prepare(&q,
975 "SELECT id, %Q || pathname, mrid, %s FROM vfile "
976 "WHERE chnged==1 AND NOT deleted AND file_is_selected(id)",
977 g.zLocalRoot, glob_expr("pathname", db_get("crnl-glob",""))
978 );
979 while( db_step(&q)==SQLITE_ROW ){
980 int id, rid;
981 const char *zFullname;
982 Blob content;
983
--- src/checkin.c
+++ src/checkin.c
@@ -224,16 +224,16 @@
224 int allFlag = find_option("dotfiles",0,0)!=0;
225 int outputManifest;
226 Glob *pIgnore;
227
228 db_must_be_within_tree();
229 outputManifest = db_get_versionable_setting_boolean("manifest",0);
230 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
231 n = strlen(g.zLocalRoot);
232 blob_init(&path, g.zLocalRoot, n-1);
233 if( zIgnoreFlag==0 ){
234 zIgnoreFlag = db_get_versionable_setting("ignore-glob", 0);
235 }
236 pIgnore = glob_create(zIgnoreFlag);
237 vfile_scan(&path, blob_size(&path), allFlag, pIgnore);
238 glob_free(pIgnore);
239 db_prepare(&q,
@@ -283,11 +283,11 @@
283 allFlag = find_option("force","f",0)!=0;
284 dotfilesFlag = find_option("dotfiles",0,0)!=0;
285 zIgnoreFlag = find_option("ignore",0,1);
286 db_must_be_within_tree();
287 if( zIgnoreFlag==0 ){
288 zIgnoreFlag = db_get_versionable_setting("ignore-glob", 0);
289 }
290 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
291 n = strlen(g.zLocalRoot);
292 blob_init(&path, g.zLocalRoot, n-1);
293 pIgnore = glob_create(zIgnoreFlag);
@@ -831,11 +831,11 @@
831 zUserOvrd = find_option("user-override",0,1);
832 db_must_be_within_tree();
833 noSign = db_get_boolean("omitsign", 0)|noSign;
834 if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; }
835 useCksum = db_get_boolean("repo-cksum", 1);
836 outputManifest = db_get_versionable_setting_boolean("manifest", 0);
837 verify_all_options();
838
839 /* So that older versions of Fossil (that do not understand delta-
840 ** manifest) can continue to use this repository, do not create a new
841 ** delta-manifest unless this repository already contains one or more
@@ -972,11 +972,11 @@
972 ** the identified fils are inserted (if they have been modified).
973 */
974 db_prepare(&q,
975 "SELECT id, %Q || pathname, mrid, %s FROM vfile "
976 "WHERE chnged==1 AND NOT deleted AND file_is_selected(id)",
977 g.zLocalRoot, glob_expr("pathname", db_get_versionable_setting("crnl-glob",""))
978 );
979 while( db_step(&q)==SQLITE_ROW ){
980 int id, rid;
981 const char *zFullname;
982 Blob content;
983
+1 -1
--- src/checkout.c
+++ src/checkout.c
@@ -141,11 +141,11 @@
141141
void manifest_to_disk(int vid){
142142
char *zManFile;
143143
Blob manifest;
144144
Blob hash;
145145
146
- if( db_get_boolean("manifest",0) ){
146
+ if( db_get_versionable_setting_boolean("manifest",0) ){
147147
blob_zero(&manifest);
148148
content_get(vid, &manifest);
149149
zManFile = mprintf("%smanifest", g.zLocalRoot);
150150
blob_write_to_file(&manifest, zManFile);
151151
free(zManFile);
152152
--- src/checkout.c
+++ src/checkout.c
@@ -141,11 +141,11 @@
141 void manifest_to_disk(int vid){
142 char *zManFile;
143 Blob manifest;
144 Blob hash;
145
146 if( db_get_boolean("manifest",0) ){
147 blob_zero(&manifest);
148 content_get(vid, &manifest);
149 zManFile = mprintf("%smanifest", g.zLocalRoot);
150 blob_write_to_file(&manifest, zManFile);
151 free(zManFile);
152
--- src/checkout.c
+++ src/checkout.c
@@ -141,11 +141,11 @@
141 void manifest_to_disk(int vid){
142 char *zManFile;
143 Blob manifest;
144 Blob hash;
145
146 if( db_get_versionable_setting_boolean("manifest",0) ){
147 blob_zero(&manifest);
148 content_get(vid, &manifest);
149 zManFile = mprintf("%smanifest", g.zLocalRoot);
150 blob_write_to_file(&manifest, zManFile);
151 free(zManFile);
152
+36
--- src/db.c
+++ src/db.c
@@ -1390,10 +1390,46 @@
13901390
sqlite3 *dbTemp = g.db;
13911391
g.db = g.dbConfig;
13921392
g.dbConfig = dbTemp;
13931393
}
13941394
}
1395
+
1396
+/*
1397
+** Get a potentially versioned setting - either from .fossil-settings/<name>
1398
+*/
1399
+char *db_get_versionable_setting(const char *zName, char *zDefault){
1400
+ char *s = 0;
1401
+ if( db_open_local() ){
1402
+ /* See if there's a versioned setting */
1403
+ Blob versionedPathname;
1404
+ blob_zero(&versionedPathname);
1405
+ blob_appendf(&versionedPathname, "%s/.fossil-settings/%s", g.zLocalRoot, zName);
1406
+ char *zVersionedPathname = blob_str(&versionedPathname);
1407
+ if( file_size(zVersionedPathname) >= 0 ){
1408
+ /* File exists, and contains the value for this setting. Load from the file. */
1409
+ Blob setting;
1410
+ blob_zero(&setting);
1411
+ if( blob_read_from_file(&setting, zVersionedPathname) >= 0 ){
1412
+ s = strdup(blob_str(&setting));
1413
+ }
1414
+ blob_reset(&setting);
1415
+ }
1416
+ blob_reset(&versionedPathname);
1417
+ }
1418
+ if( s != 0 ){
1419
+ return s;
1420
+ }
1421
+ /* Fall back to settings in the database */
1422
+ return db_get(zName, zDefault);
1423
+}
1424
+int db_get_versionable_setting_boolean(const char *zName, int dflt){
1425
+ char *zVal = db_get_versionable_setting(zName, dflt ? "on" : "off");
1426
+ if( is_truth(zVal) ) return 1;
1427
+ if( is_false(zVal) ) return 0;
1428
+ return dflt;
1429
+}
1430
+
13951431
13961432
/*
13971433
** Get and set values from the CONFIG, GLOBAL_CONFIG and VVAR table in the
13981434
** repository and local databases.
13991435
*/
14001436
--- src/db.c
+++ src/db.c
@@ -1390,10 +1390,46 @@
1390 sqlite3 *dbTemp = g.db;
1391 g.db = g.dbConfig;
1392 g.dbConfig = dbTemp;
1393 }
1394 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1395
1396 /*
1397 ** Get and set values from the CONFIG, GLOBAL_CONFIG and VVAR table in the
1398 ** repository and local databases.
1399 */
1400
--- src/db.c
+++ src/db.c
@@ -1390,10 +1390,46 @@
1390 sqlite3 *dbTemp = g.db;
1391 g.db = g.dbConfig;
1392 g.dbConfig = dbTemp;
1393 }
1394 }
1395
1396 /*
1397 ** Get a potentially versioned setting - either from .fossil-settings/<name>
1398 */
1399 char *db_get_versionable_setting(const char *zName, char *zDefault){
1400 char *s = 0;
1401 if( db_open_local() ){
1402 /* See if there's a versioned setting */
1403 Blob versionedPathname;
1404 blob_zero(&versionedPathname);
1405 blob_appendf(&versionedPathname, "%s/.fossil-settings/%s", g.zLocalRoot, zName);
1406 char *zVersionedPathname = blob_str(&versionedPathname);
1407 if( file_size(zVersionedPathname) >= 0 ){
1408 /* File exists, and contains the value for this setting. Load from the file. */
1409 Blob setting;
1410 blob_zero(&setting);
1411 if( blob_read_from_file(&setting, zVersionedPathname) >= 0 ){
1412 s = strdup(blob_str(&setting));
1413 }
1414 blob_reset(&setting);
1415 }
1416 blob_reset(&versionedPathname);
1417 }
1418 if( s != 0 ){
1419 return s;
1420 }
1421 /* Fall back to settings in the database */
1422 return db_get(zName, zDefault);
1423 }
1424 int db_get_versionable_setting_boolean(const char *zName, int dflt){
1425 char *zVal = db_get_versionable_setting(zName, dflt ? "on" : "off");
1426 if( is_truth(zVal) ) return 1;
1427 if( is_false(zVal) ) return 0;
1428 return dflt;
1429 }
1430
1431
1432 /*
1433 ** Get and set values from the CONFIG, GLOBAL_CONFIG and VVAR table in the
1434 ** repository and local databases.
1435 */
1436
+4 -4
--- src/glob.c
+++ src/glob.c
@@ -110,24 +110,24 @@
110110
p = fossil_malloc( sizeof(*p) + nList+1 );
111111
memset(p, 0, sizeof(*p));
112112
z = (char*)&p[1];
113113
memcpy(z, zPatternList, nList+1);
114114
while( z[0] ){
115
- while( z[0]==',' || z[0]==' ' ) z++; /* Skip leading spaces */
115
+ while( z[0]==',' || z[0]==' ' || z[0]=='\n' || z[0]=='\r' ) z++; /* Skip leading spaces and newlines */
116116
if( z[0]=='\'' || z[0]=='"' ){
117117
delimiter = z[0];
118118
z++;
119119
}else{
120120
delimiter = ',';
121121
}
122122
if( z[0]==0 ) break;
123123
p->azPattern = fossil_realloc(p->azPattern, (p->nPattern+1)*sizeof(char*) );
124124
p->azPattern[p->nPattern++] = z;
125
- for(i=0; z[i] && z[i]!=delimiter; i++){}
125
+ for(i=0; z[i] && z[i]!=delimiter && z[i]!='\n' && z[i]!='\r'; i++){}
126126
if( delimiter==',' ){
127
- /* Remove trailing spaces on a comma-delimited pattern */
128
- for(j=i; j>1 && z[j-1]==' '; j--){}
127
+ /* Remove trailing spaces / newlines on a comma-delimited pattern */
128
+ for(j=i; j>1 && (z[j-1]==' ' || z[j-1]=='\n' || z[j-1]=='\r'); j--){}
129129
if( j<i ) z[j] = 0;
130130
}
131131
if( z[i]==0 ) break;
132132
z[i] = 0;
133133
z += i+1;
134134
--- src/glob.c
+++ src/glob.c
@@ -110,24 +110,24 @@
110 p = fossil_malloc( sizeof(*p) + nList+1 );
111 memset(p, 0, sizeof(*p));
112 z = (char*)&p[1];
113 memcpy(z, zPatternList, nList+1);
114 while( z[0] ){
115 while( z[0]==',' || z[0]==' ' ) z++; /* Skip leading spaces */
116 if( z[0]=='\'' || z[0]=='"' ){
117 delimiter = z[0];
118 z++;
119 }else{
120 delimiter = ',';
121 }
122 if( z[0]==0 ) break;
123 p->azPattern = fossil_realloc(p->azPattern, (p->nPattern+1)*sizeof(char*) );
124 p->azPattern[p->nPattern++] = z;
125 for(i=0; z[i] && z[i]!=delimiter; i++){}
126 if( delimiter==',' ){
127 /* Remove trailing spaces on a comma-delimited pattern */
128 for(j=i; j>1 && z[j-1]==' '; j--){}
129 if( j<i ) z[j] = 0;
130 }
131 if( z[i]==0 ) break;
132 z[i] = 0;
133 z += i+1;
134
--- src/glob.c
+++ src/glob.c
@@ -110,24 +110,24 @@
110 p = fossil_malloc( sizeof(*p) + nList+1 );
111 memset(p, 0, sizeof(*p));
112 z = (char*)&p[1];
113 memcpy(z, zPatternList, nList+1);
114 while( z[0] ){
115 while( z[0]==',' || z[0]==' ' || z[0]=='\n' || z[0]=='\r' ) z++; /* Skip leading spaces and newlines */
116 if( z[0]=='\'' || z[0]=='"' ){
117 delimiter = z[0];
118 z++;
119 }else{
120 delimiter = ',';
121 }
122 if( z[0]==0 ) break;
123 p->azPattern = fossil_realloc(p->azPattern, (p->nPattern+1)*sizeof(char*) );
124 p->azPattern[p->nPattern++] = z;
125 for(i=0; z[i] && z[i]!=delimiter && z[i]!='\n' && z[i]!='\r'; i++){}
126 if( delimiter==',' ){
127 /* Remove trailing spaces / newlines on a comma-delimited pattern */
128 for(j=i; j>1 && (z[j-1]==' ' || z[j-1]=='\n' || z[j-1]=='\r'); j--){}
129 if( j<i ) z[j] = 0;
130 }
131 if( z[i]==0 ) break;
132 z[i] = 0;
133 z += i+1;
134
+1 -1
--- src/merge.c
+++ src/merge.c
@@ -91,11 +91,11 @@
9191
zPivot = find_option("baseline",0,1);
9292
if( g.argc!=3 ){
9393
usage("VERSION");
9494
}
9595
db_must_be_within_tree();
96
- if( zBinGlob==0 ) zBinGlob = db_get("binary-glob",0);
96
+ if( zBinGlob==0 ) zBinGlob = db_get_versionable_setting("binary-glob",0);
9797
vid = db_lget_int("checkout", 0);
9898
if( vid==0 ){
9999
fossil_fatal("nothing is checked out");
100100
}
101101
mid = name_to_rid(g.argv[2]);
102102
--- src/merge.c
+++ src/merge.c
@@ -91,11 +91,11 @@
91 zPivot = find_option("baseline",0,1);
92 if( g.argc!=3 ){
93 usage("VERSION");
94 }
95 db_must_be_within_tree();
96 if( zBinGlob==0 ) zBinGlob = db_get("binary-glob",0);
97 vid = db_lget_int("checkout", 0);
98 if( vid==0 ){
99 fossil_fatal("nothing is checked out");
100 }
101 mid = name_to_rid(g.argv[2]);
102
--- src/merge.c
+++ src/merge.c
@@ -91,11 +91,11 @@
91 zPivot = find_option("baseline",0,1);
92 if( g.argc!=3 ){
93 usage("VERSION");
94 }
95 db_must_be_within_tree();
96 if( zBinGlob==0 ) zBinGlob = db_get_versionable_setting("binary-glob",0);
97 vid = db_lget_int("checkout", 0);
98 if( vid==0 ){
99 fossil_fatal("nothing is checked out");
100 }
101 mid = name_to_rid(g.argv[2]);
102
+1 -1
--- src/tar.c
+++ src/tar.c
@@ -215,11 +215,11 @@
215215
nPrefix = blob_size(&filename);
216216
217217
pManifest = manifest_get(rid, CFTYPE_MANIFEST);
218218
if( pManifest ){
219219
mTime = (pManifest->rDate - 2440587.5)*86400.0;
220
- if( db_get_boolean("manifest", 0) ){
220
+ if( db_get_versionable_setting_boolean("manifest", 0) ){
221221
blob_append(&filename, "manifest", -1);
222222
zName = blob_str(&filename);
223223
tar_add_file(zName, &mfile, 0, mTime);
224224
sha1sum_blob(&mfile, &hash);
225225
blob_reset(&mfile);
226226
--- src/tar.c
+++ src/tar.c
@@ -215,11 +215,11 @@
215 nPrefix = blob_size(&filename);
216
217 pManifest = manifest_get(rid, CFTYPE_MANIFEST);
218 if( pManifest ){
219 mTime = (pManifest->rDate - 2440587.5)*86400.0;
220 if( db_get_boolean("manifest", 0) ){
221 blob_append(&filename, "manifest", -1);
222 zName = blob_str(&filename);
223 tar_add_file(zName, &mfile, 0, mTime);
224 sha1sum_blob(&mfile, &hash);
225 blob_reset(&mfile);
226
--- src/tar.c
+++ src/tar.c
@@ -215,11 +215,11 @@
215 nPrefix = blob_size(&filename);
216
217 pManifest = manifest_get(rid, CFTYPE_MANIFEST);
218 if( pManifest ){
219 mTime = (pManifest->rDate - 2440587.5)*86400.0;
220 if( db_get_versionable_setting_boolean("manifest", 0) ){
221 blob_append(&filename, "manifest", -1);
222 zName = blob_str(&filename);
223 tar_add_file(zName, &mfile, 0, mTime);
224 sha1sum_blob(&mfile, &hash);
225 blob_reset(&mfile);
226
+1 -1
--- src/zip.c
+++ src/zip.c
@@ -337,11 +337,11 @@
337337
338338
pManifest = manifest_get(rid, CFTYPE_MANIFEST);
339339
if( pManifest ){
340340
char *zName;
341341
zip_set_timedate(pManifest->rDate);
342
- if( db_get_boolean("manifest", 0) ){
342
+ if( db_get_versionable_setting_boolean("manifest", 0) ){
343343
blob_append(&filename, "manifest", -1);
344344
zName = blob_str(&filename);
345345
zip_add_folders(zName);
346346
zip_add_file(zName, &mfile, 0);
347347
sha1sum_blob(&mfile, &hash);
348348
--- src/zip.c
+++ src/zip.c
@@ -337,11 +337,11 @@
337
338 pManifest = manifest_get(rid, CFTYPE_MANIFEST);
339 if( pManifest ){
340 char *zName;
341 zip_set_timedate(pManifest->rDate);
342 if( db_get_boolean("manifest", 0) ){
343 blob_append(&filename, "manifest", -1);
344 zName = blob_str(&filename);
345 zip_add_folders(zName);
346 zip_add_file(zName, &mfile, 0);
347 sha1sum_blob(&mfile, &hash);
348
--- src/zip.c
+++ src/zip.c
@@ -337,11 +337,11 @@
337
338 pManifest = manifest_get(rid, CFTYPE_MANIFEST);
339 if( pManifest ){
340 char *zName;
341 zip_set_timedate(pManifest->rDate);
342 if( db_get_versionable_setting_boolean("manifest", 0) ){
343 blob_append(&filename, "manifest", -1);
344 zName = blob_str(&filename);
345 zip_add_folders(zName);
346 zip_add_file(zName, &mfile, 0);
347 sha1sum_blob(&mfile, &hash);
348

Keyboard Shortcuts

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