Fossil SCM

Add support for the "l" flag to the "manifest" setting to enable creation of a file "manifest.symlinks" which lists the names of all symlinks

andygoth 2017-09-29 00:53 trunk
Commit 8d6bdd1e00cf2cf8bc7fd101fcff023a915428e13e7f64bb8dde201a416f7aae
+5 -4
--- src/add.c
+++ src/add.c
@@ -78,15 +78,16 @@
7878
*/
7979
static const struct {
8080
const char *fname;
8181
int flg;
8282
}aManifestflags[] = {
83
- { "manifest", MFESTFLG_RAW },
84
- { "manifest.uuid", MFESTFLG_UUID },
85
- { "manifest.tags", MFESTFLG_TAGS }
83
+ { "manifest", MFESTFLG_RAW },
84
+ { "manifest.uuid", MFESTFLG_UUID },
85
+ { "manifest.tags", MFESTFLG_TAGS },
86
+ { "manifest.symlinks", MFESTFLG_SYMLINKS }
8687
};
87
- static const char *azManifests[3];
88
+ static const char *azManifests[4];
8889
8990
/*
9091
** Names of repository files, if they exist in the checkout.
9192
*/
9293
static const char *azRepo[4] = { 0, 0, 0, 0 };
9394
--- src/add.c
+++ src/add.c
@@ -78,15 +78,16 @@
78 */
79 static const struct {
80 const char *fname;
81 int flg;
82 }aManifestflags[] = {
83 { "manifest", MFESTFLG_RAW },
84 { "manifest.uuid", MFESTFLG_UUID },
85 { "manifest.tags", MFESTFLG_TAGS }
 
86 };
87 static const char *azManifests[3];
88
89 /*
90 ** Names of repository files, if they exist in the checkout.
91 */
92 static const char *azRepo[4] = { 0, 0, 0, 0 };
93
--- src/add.c
+++ src/add.c
@@ -78,15 +78,16 @@
78 */
79 static const struct {
80 const char *fname;
81 int flg;
82 }aManifestflags[] = {
83 { "manifest", MFESTFLG_RAW },
84 { "manifest.uuid", MFESTFLG_UUID },
85 { "manifest.tags", MFESTFLG_TAGS },
86 { "manifest.symlinks", MFESTFLG_SYMLINKS }
87 };
88 static const char *azManifests[4];
89
90 /*
91 ** Names of repository files, if they exist in the checkout.
92 */
93 static const char *azRepo[4] = { 0, 0, 0, 0 };
94
--- src/checkin.c
+++ src/checkin.c
@@ -2613,10 +2613,20 @@
26132613
get_checkin_taglist(nvid, &tagslist);
26142614
blob_write_to_file(&tagslist, zManifestFile);
26152615
blob_reset(&tagslist);
26162616
free(zManifestFile);
26172617
}
2618
+
2619
+ if( outputManifest & MFESTFLG_SYMLINKS ){
2620
+ Blob symlinkslist;
2621
+ zManifestFile = mprintf("%smanifest.symlinks", g.zLocalRoot);
2622
+ blob_zero(&symlinkslist);
2623
+ get_checkin_symlinklist(nvid, &symlinkslist);
2624
+ blob_write_to_file(&symlinkslist, zManifestFile);
2625
+ blob_reset(&symlinkslist);
2626
+ free(zManifestFile);
2627
+ }
26182628
26192629
if( !g.markPrivate ){
26202630
autosync_loop(SYNC_PUSH|SYNC_PULL, db_get_int("autosync-tries", 1), 0);
26212631
}
26222632
if( count_nonbranch_children(vid)>1 ){
26232633
--- src/checkin.c
+++ src/checkin.c
@@ -2613,10 +2613,20 @@
2613 get_checkin_taglist(nvid, &tagslist);
2614 blob_write_to_file(&tagslist, zManifestFile);
2615 blob_reset(&tagslist);
2616 free(zManifestFile);
2617 }
 
 
 
 
 
 
 
 
 
 
2618
2619 if( !g.markPrivate ){
2620 autosync_loop(SYNC_PUSH|SYNC_PULL, db_get_int("autosync-tries", 1), 0);
2621 }
2622 if( count_nonbranch_children(vid)>1 ){
2623
--- src/checkin.c
+++ src/checkin.c
@@ -2613,10 +2613,20 @@
2613 get_checkin_taglist(nvid, &tagslist);
2614 blob_write_to_file(&tagslist, zManifestFile);
2615 blob_reset(&tagslist);
2616 free(zManifestFile);
2617 }
2618
2619 if( outputManifest & MFESTFLG_SYMLINKS ){
2620 Blob symlinkslist;
2621 zManifestFile = mprintf("%smanifest.symlinks", g.zLocalRoot);
2622 blob_zero(&symlinkslist);
2623 get_checkin_symlinklist(nvid, &symlinkslist);
2624 blob_write_to_file(&symlinkslist, zManifestFile);
2625 blob_reset(&symlinkslist);
2626 free(zManifestFile);
2627 }
2628
2629 if( !g.markPrivate ){
2630 autosync_loop(SYNC_PUSH|SYNC_PULL, db_get_int("autosync-tries", 1), 0);
2631 }
2632 if( count_nonbranch_children(vid)>1 ){
2633
+35 -4
--- src/checkout.c
+++ src/checkout.c
@@ -93,12 +93,11 @@
9393
db_reset(&s);
9494
}
9595
9696
/*
9797
** Set or clear the execute permission bit (as appropriate) for all
98
-** files in the current check-out, and replace files that have
99
-** symlink bit with actual symlinks.
98
+** files in the current check-out.
10099
*/
101100
void checkout_set_all_exe(int vid){
102101
Blob filename;
103102
int baseLen;
104103
Manifest *pManifest;
@@ -128,17 +127,18 @@
128127
/*
129128
** If the "manifest" setting is true, then automatically generate
130129
** files named "manifest" and "manifest.uuid" containing, respectively,
131130
** the text of the manifest and the artifact ID of the manifest.
132131
** If the manifest setting is set, but is not a boolean value, then treat
133
-** each character as a flag to enable writing "manifest", "manifest.uuid" or
134
-** "manifest.tags".
132
+** each character as a flag to enable writing "manifest", "manifest.uuid",
133
+** "manifest.tags", or "manifest.symlinks".
135134
*/
136135
void manifest_to_disk(int vid){
137136
char *zManFile;
138137
Blob manifest;
139138
Blob taglist;
139
+ Blob symlinklist;
140140
int flg;
141141
142142
flg = db_get_manifest_setting();
143143
144144
if( flg & MFESTFLG_RAW ){
@@ -182,10 +182,24 @@
182182
zManFile = mprintf("%smanifest.tags", g.zLocalRoot);
183183
file_delete(zManFile);
184184
free(zManFile);
185185
}
186186
}
187
+ if( flg & MFESTFLG_SYMLINKS ){
188
+ blob_zero(&symlinklist);
189
+ zManFile = mprintf("%smanifest.symlinks", g.zLocalRoot);
190
+ get_checkin_symlinklist(vid, &symlinklist);
191
+ blob_write_to_file(&symlinklist, zManFile);
192
+ free(zManFile);
193
+ blob_reset(&symlinklist);
194
+ }else{
195
+ if( !db_exists("SELECT 1 FROM vfile WHERE pathname='manifest.symlinks'") ){
196
+ zManFile = mprintf("%smanifest.symlinks", g.zLocalRoot);
197
+ file_delete(zManFile);
198
+ free(zManFile);
199
+ }
200
+ }
187201
}
188202
189203
/*
190204
** Find the branch name and all symbolic tags for a particular check-in
191205
** identified by "rid".
@@ -216,10 +230,27 @@
216230
}
217231
db_reset(&stmt);
218232
db_finalize(&stmt);
219233
}
220234
235
+/*
236
+** Store into "pOut" a sorted list of all symlinks in a checkin "rid". Each
237
+** entry in the list is the full name of the symlink (not the name of its
238
+** target) followed by a newline.
239
+*/
240
+void get_checkin_symlinklist(int rid, Blob *pOut){
241
+ Manifest *pManifest = manifest_get(rid, CFTYPE_MANIFEST, 0);
242
+ ManifestFile *pFile;
243
+ blob_reset(pOut);
244
+ manifest_file_rewind(pManifest);
245
+ while( (pFile = manifest_file_next(pManifest, 0)) ){
246
+ if( pFile->zPerm && strstr(pFile->zPerm, "l") ){
247
+ blob_appendf(pOut, "%s\n", pFile->zName);
248
+ }
249
+ }
250
+ manifest_destroy(pManifest);
251
+}
221252
222253
/*
223254
** COMMAND: checkout*
224255
** COMMAND: co*
225256
**
226257
--- src/checkout.c
+++ src/checkout.c
@@ -93,12 +93,11 @@
93 db_reset(&s);
94 }
95
96 /*
97 ** Set or clear the execute permission bit (as appropriate) for all
98 ** files in the current check-out, and replace files that have
99 ** symlink bit with actual symlinks.
100 */
101 void checkout_set_all_exe(int vid){
102 Blob filename;
103 int baseLen;
104 Manifest *pManifest;
@@ -128,17 +127,18 @@
128 /*
129 ** If the "manifest" setting is true, then automatically generate
130 ** files named "manifest" and "manifest.uuid" containing, respectively,
131 ** the text of the manifest and the artifact ID of the manifest.
132 ** If the manifest setting is set, but is not a boolean value, then treat
133 ** each character as a flag to enable writing "manifest", "manifest.uuid" or
134 ** "manifest.tags".
135 */
136 void manifest_to_disk(int vid){
137 char *zManFile;
138 Blob manifest;
139 Blob taglist;
 
140 int flg;
141
142 flg = db_get_manifest_setting();
143
144 if( flg & MFESTFLG_RAW ){
@@ -182,10 +182,24 @@
182 zManFile = mprintf("%smanifest.tags", g.zLocalRoot);
183 file_delete(zManFile);
184 free(zManFile);
185 }
186 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187 }
188
189 /*
190 ** Find the branch name and all symbolic tags for a particular check-in
191 ** identified by "rid".
@@ -216,10 +230,27 @@
216 }
217 db_reset(&stmt);
218 db_finalize(&stmt);
219 }
220
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
222 /*
223 ** COMMAND: checkout*
224 ** COMMAND: co*
225 **
226
--- src/checkout.c
+++ src/checkout.c
@@ -93,12 +93,11 @@
93 db_reset(&s);
94 }
95
96 /*
97 ** Set or clear the execute permission bit (as appropriate) for all
98 ** files in the current check-out.
 
99 */
100 void checkout_set_all_exe(int vid){
101 Blob filename;
102 int baseLen;
103 Manifest *pManifest;
@@ -128,17 +127,18 @@
127 /*
128 ** If the "manifest" setting is true, then automatically generate
129 ** files named "manifest" and "manifest.uuid" containing, respectively,
130 ** the text of the manifest and the artifact ID of the manifest.
131 ** If the manifest setting is set, but is not a boolean value, then treat
132 ** each character as a flag to enable writing "manifest", "manifest.uuid",
133 ** "manifest.tags", or "manifest.symlinks".
134 */
135 void manifest_to_disk(int vid){
136 char *zManFile;
137 Blob manifest;
138 Blob taglist;
139 Blob symlinklist;
140 int flg;
141
142 flg = db_get_manifest_setting();
143
144 if( flg & MFESTFLG_RAW ){
@@ -182,10 +182,24 @@
182 zManFile = mprintf("%smanifest.tags", g.zLocalRoot);
183 file_delete(zManFile);
184 free(zManFile);
185 }
186 }
187 if( flg & MFESTFLG_SYMLINKS ){
188 blob_zero(&symlinklist);
189 zManFile = mprintf("%smanifest.symlinks", g.zLocalRoot);
190 get_checkin_symlinklist(vid, &symlinklist);
191 blob_write_to_file(&symlinklist, zManFile);
192 free(zManFile);
193 blob_reset(&symlinklist);
194 }else{
195 if( !db_exists("SELECT 1 FROM vfile WHERE pathname='manifest.symlinks'") ){
196 zManFile = mprintf("%smanifest.symlinks", g.zLocalRoot);
197 file_delete(zManFile);
198 free(zManFile);
199 }
200 }
201 }
202
203 /*
204 ** Find the branch name and all symbolic tags for a particular check-in
205 ** identified by "rid".
@@ -216,10 +230,27 @@
230 }
231 db_reset(&stmt);
232 db_finalize(&stmt);
233 }
234
235 /*
236 ** Store into "pOut" a sorted list of all symlinks in a checkin "rid". Each
237 ** entry in the list is the full name of the symlink (not the name of its
238 ** target) followed by a newline.
239 */
240 void get_checkin_symlinklist(int rid, Blob *pOut){
241 Manifest *pManifest = manifest_get(rid, CFTYPE_MANIFEST, 0);
242 ManifestFile *pFile;
243 blob_reset(pOut);
244 manifest_file_rewind(pManifest);
245 while( (pFile = manifest_file_next(pManifest, 0)) ){
246 if( pFile->zPerm && strstr(pFile->zPerm, "l") ){
247 blob_appendf(pOut, "%s\n", pFile->zName);
248 }
249 }
250 manifest_destroy(pManifest);
251 }
252
253 /*
254 ** COMMAND: checkout*
255 ** COMMAND: co*
256 **
257
+11 -9
--- src/db.c
+++ src/db.c
@@ -2475,13 +2475,14 @@
24752475
db_multi_exec("REPLACE INTO vvar(name,value) VALUES(%Q,%d)", zName, value);
24762476
}
24772477
24782478
#if INTERFACE
24792479
/* Manifest generation flags */
2480
-#define MFESTFLG_RAW 0x01
2481
-#define MFESTFLG_UUID 0x02
2482
-#define MFESTFLG_TAGS 0x04
2480
+#define MFESTFLG_RAW 0x01
2481
+#define MFESTFLG_UUID 0x02
2482
+#define MFESTFLG_TAGS 0x04
2483
+#define MFESTFLG_SYMLINKS 0x08
24832484
#endif /* INTERFACE */
24842485
24852486
/*
24862487
** Get the manifest setting. For backwards compatibility first check if the
24872488
** value is a boolean. If it's not a boolean, treat each character as a flag
@@ -2498,13 +2499,14 @@
24982499
return MFESTFLG_RAW|MFESTFLG_UUID;
24992500
}
25002501
flg = 0;
25012502
while( *zVal ){
25022503
switch( *zVal ){
2503
- case 'r': flg |= MFESTFLG_RAW; break;
2504
- case 'u': flg |= MFESTFLG_UUID; break;
2505
- case 't': flg |= MFESTFLG_TAGS; break;
2504
+ case 'r': flg |= MFESTFLG_RAW; break;
2505
+ case 'u': flg |= MFESTFLG_UUID; break;
2506
+ case 't': flg |= MFESTFLG_TAGS; break;
2507
+ case 'l': flg |= MFESTFLG_SYMLINKS; break;
25062508
}
25072509
zVal++;
25082510
}
25092511
return flg;
25102512
}
@@ -2982,13 +2984,13 @@
29822984
/*
29832985
** SETTING: manifest width=5 versionable
29842986
** If enabled, automatically create files "manifest" and "manifest.uuid"
29852987
** in every checkout.
29862988
**
2987
-** Optionally use combinations of characters 'r' for "manifest",
2988
-** 'u' for "manifest.uuid" and 't' for "manifest.tags". The SQLite
2989
-** and Fossil repositories both require manifests.
2989
+** Optionally use combinations of characters 'r' for "manifest", 'u' for
2990
+** "manifest.uuid", 't' for "manifest.tags", and 'l' for "manifest.symlinks".
2991
+** The SQLite and Fossil repositories both require manifests.
29902992
*/
29912993
/*
29922994
** SETTING: max-loadavg width=25 default=0.0
29932995
** Some CPU-intensive web pages (ex: /zip, /tarball, /blame)
29942996
** are disallowed if the system load average goes above this
29952997
--- src/db.c
+++ src/db.c
@@ -2475,13 +2475,14 @@
2475 db_multi_exec("REPLACE INTO vvar(name,value) VALUES(%Q,%d)", zName, value);
2476 }
2477
2478 #if INTERFACE
2479 /* Manifest generation flags */
2480 #define MFESTFLG_RAW 0x01
2481 #define MFESTFLG_UUID 0x02
2482 #define MFESTFLG_TAGS 0x04
 
2483 #endif /* INTERFACE */
2484
2485 /*
2486 ** Get the manifest setting. For backwards compatibility first check if the
2487 ** value is a boolean. If it's not a boolean, treat each character as a flag
@@ -2498,13 +2499,14 @@
2498 return MFESTFLG_RAW|MFESTFLG_UUID;
2499 }
2500 flg = 0;
2501 while( *zVal ){
2502 switch( *zVal ){
2503 case 'r': flg |= MFESTFLG_RAW; break;
2504 case 'u': flg |= MFESTFLG_UUID; break;
2505 case 't': flg |= MFESTFLG_TAGS; break;
 
2506 }
2507 zVal++;
2508 }
2509 return flg;
2510 }
@@ -2982,13 +2984,13 @@
2982 /*
2983 ** SETTING: manifest width=5 versionable
2984 ** If enabled, automatically create files "manifest" and "manifest.uuid"
2985 ** in every checkout.
2986 **
2987 ** Optionally use combinations of characters 'r' for "manifest",
2988 ** 'u' for "manifest.uuid" and 't' for "manifest.tags". The SQLite
2989 ** and Fossil repositories both require manifests.
2990 */
2991 /*
2992 ** SETTING: max-loadavg width=25 default=0.0
2993 ** Some CPU-intensive web pages (ex: /zip, /tarball, /blame)
2994 ** are disallowed if the system load average goes above this
2995
--- src/db.c
+++ src/db.c
@@ -2475,13 +2475,14 @@
2475 db_multi_exec("REPLACE INTO vvar(name,value) VALUES(%Q,%d)", zName, value);
2476 }
2477
2478 #if INTERFACE
2479 /* Manifest generation flags */
2480 #define MFESTFLG_RAW 0x01
2481 #define MFESTFLG_UUID 0x02
2482 #define MFESTFLG_TAGS 0x04
2483 #define MFESTFLG_SYMLINKS 0x08
2484 #endif /* INTERFACE */
2485
2486 /*
2487 ** Get the manifest setting. For backwards compatibility first check if the
2488 ** value is a boolean. If it's not a boolean, treat each character as a flag
@@ -2498,13 +2499,14 @@
2499 return MFESTFLG_RAW|MFESTFLG_UUID;
2500 }
2501 flg = 0;
2502 while( *zVal ){
2503 switch( *zVal ){
2504 case 'r': flg |= MFESTFLG_RAW; break;
2505 case 'u': flg |= MFESTFLG_UUID; break;
2506 case 't': flg |= MFESTFLG_TAGS; break;
2507 case 'l': flg |= MFESTFLG_SYMLINKS; break;
2508 }
2509 zVal++;
2510 }
2511 return flg;
2512 }
@@ -2982,13 +2984,13 @@
2984 /*
2985 ** SETTING: manifest width=5 versionable
2986 ** If enabled, automatically create files "manifest" and "manifest.uuid"
2987 ** in every checkout.
2988 **
2989 ** Optionally use combinations of characters 'r' for "manifest", 'u' for
2990 ** "manifest.uuid", 't' for "manifest.tags", and 'l' for "manifest.symlinks".
2991 ** The SQLite and Fossil repositories both require manifests.
2992 */
2993 /*
2994 ** SETTING: max-loadavg width=25 default=0.0
2995 ** Some CPU-intensive web pages (ex: /zip, /tarball, /blame)
2996 ** are disallowed if the system load average goes above this
2997
+15
--- src/tar.c
+++ src/tar.c
@@ -514,10 +514,15 @@
514514
if( (pInclude==0 || glob_match(pInclude, "manifest.tags"))
515515
&& !glob_match(pExclude, "manifest.tags")
516516
&& (flg & MFESTFLG_TAGS) ){
517517
eflg |= MFESTFLG_TAGS;
518518
}
519
+ if( (pInclude==0 || glob_match(pInclude, "manifest.symlinks"))
520
+ && !glob_match(pExclude, "manifest.symlinks")
521
+ && (flg & MFESTFLG_SYMLINKS) ){
522
+ eflg |= MFESTFLG_SYMLINKS;
523
+ }
519524
520525
if( eflg & (MFESTFLG_RAW|MFESTFLG_UUID) ){
521526
if( eflg & MFESTFLG_RAW ){
522527
blob_append(&filename, "manifest", -1);
523528
zName = blob_str(&filename);
@@ -542,10 +547,20 @@
542547
blob_resize(&filename, nPrefix);
543548
blob_append(&filename, "manifest.tags", -1);
544549
zName = blob_str(&filename);
545550
tar_add_file(zName, &tagslist, 0, mTime);
546551
blob_reset(&tagslist);
552
+ }
553
+ if( eflg & MFESTFLG_SYMLINKS ){
554
+ Blob symlinklist;
555
+ blob_zero(&symlinklist);
556
+ get_checkin_symlinklist(rid, &symlinklist);
557
+ blob_resize(&filename, nPrefix);
558
+ blob_append(&filename, "manifest.symlinks", -1);
559
+ zName = blob_str(&filename);
560
+ tar_add_file(zName, &symlinklist, 0, mTime);
561
+ blob_reset(&symlinklist);
547562
}
548563
}
549564
manifest_file_rewind(pManifest);
550565
while( (pFile = manifest_file_next(pManifest,0))!=0 ){
551566
int fid;
552567
--- src/tar.c
+++ src/tar.c
@@ -514,10 +514,15 @@
514 if( (pInclude==0 || glob_match(pInclude, "manifest.tags"))
515 && !glob_match(pExclude, "manifest.tags")
516 && (flg & MFESTFLG_TAGS) ){
517 eflg |= MFESTFLG_TAGS;
518 }
 
 
 
 
 
519
520 if( eflg & (MFESTFLG_RAW|MFESTFLG_UUID) ){
521 if( eflg & MFESTFLG_RAW ){
522 blob_append(&filename, "manifest", -1);
523 zName = blob_str(&filename);
@@ -542,10 +547,20 @@
542 blob_resize(&filename, nPrefix);
543 blob_append(&filename, "manifest.tags", -1);
544 zName = blob_str(&filename);
545 tar_add_file(zName, &tagslist, 0, mTime);
546 blob_reset(&tagslist);
 
 
 
 
 
 
 
 
 
 
547 }
548 }
549 manifest_file_rewind(pManifest);
550 while( (pFile = manifest_file_next(pManifest,0))!=0 ){
551 int fid;
552
--- src/tar.c
+++ src/tar.c
@@ -514,10 +514,15 @@
514 if( (pInclude==0 || glob_match(pInclude, "manifest.tags"))
515 && !glob_match(pExclude, "manifest.tags")
516 && (flg & MFESTFLG_TAGS) ){
517 eflg |= MFESTFLG_TAGS;
518 }
519 if( (pInclude==0 || glob_match(pInclude, "manifest.symlinks"))
520 && !glob_match(pExclude, "manifest.symlinks")
521 && (flg & MFESTFLG_SYMLINKS) ){
522 eflg |= MFESTFLG_SYMLINKS;
523 }
524
525 if( eflg & (MFESTFLG_RAW|MFESTFLG_UUID) ){
526 if( eflg & MFESTFLG_RAW ){
527 blob_append(&filename, "manifest", -1);
528 zName = blob_str(&filename);
@@ -542,10 +547,20 @@
547 blob_resize(&filename, nPrefix);
548 blob_append(&filename, "manifest.tags", -1);
549 zName = blob_str(&filename);
550 tar_add_file(zName, &tagslist, 0, mTime);
551 blob_reset(&tagslist);
552 }
553 if( eflg & MFESTFLG_SYMLINKS ){
554 Blob symlinklist;
555 blob_zero(&symlinklist);
556 get_checkin_symlinklist(rid, &symlinklist);
557 blob_resize(&filename, nPrefix);
558 blob_append(&filename, "manifest.symlinks", -1);
559 zName = blob_str(&filename);
560 tar_add_file(zName, &symlinklist, 0, mTime);
561 blob_reset(&symlinklist);
562 }
563 }
564 manifest_file_rewind(pManifest);
565 while( (pFile = manifest_file_next(pManifest,0))!=0 ){
566 int fid;
567
+16
--- src/zip.c
+++ src/zip.c
@@ -371,10 +371,15 @@
371371
if( (pInclude==0 || glob_match(pInclude, "manifest.tags"))
372372
&& !glob_match(pExclude, "manifest.tags")
373373
&& (flg & MFESTFLG_TAGS) ){
374374
eflg |= MFESTFLG_TAGS;
375375
}
376
+ if( (pInclude==0 || glob_match(pInclude, "manifest.symlinks"))
377
+ && !glob_match(pExclude, "manifest.symlinks")
378
+ && (flg & MFESTFLG_SYMLINKS) ){
379
+ eflg |= MFESTFLG_SYMLINKS;
380
+ }
376381
377382
if( eflg & MFESTFLG_RAW ){
378383
blob_append(&filename, "manifest", -1);
379384
zName = blob_str(&filename);
380385
zip_add_folders(zName);
@@ -397,10 +402,21 @@
397402
blob_append(&filename, "manifest.tags", -1);
398403
zName = blob_str(&filename);
399404
zip_add_folders(zName);
400405
zip_add_file(zName, &tagslist, 0);
401406
blob_reset(&tagslist);
407
+ }
408
+ if( eflg & MFESTFLG_SYMLINKS ){
409
+ Blob symlinklist;
410
+ blob_zero(&symlinklist);
411
+ get_checkin_symlinklist(rid, &symlinklist);
412
+ blob_resize(&filename, nPrefix);
413
+ blob_append(&filename, "manifest.symlinks", -1);
414
+ zName = blob_str(&filename);
415
+ zip_add_folders(zName);
416
+ zip_add_file(zName, &symlinklist, 0);
417
+ blob_reset(&symlinklist);
402418
}
403419
}
404420
manifest_file_rewind(pManifest);
405421
while( (pFile = manifest_file_next(pManifest,0))!=0 ){
406422
int fid;
407423
--- src/zip.c
+++ src/zip.c
@@ -371,10 +371,15 @@
371 if( (pInclude==0 || glob_match(pInclude, "manifest.tags"))
372 && !glob_match(pExclude, "manifest.tags")
373 && (flg & MFESTFLG_TAGS) ){
374 eflg |= MFESTFLG_TAGS;
375 }
 
 
 
 
 
376
377 if( eflg & MFESTFLG_RAW ){
378 blob_append(&filename, "manifest", -1);
379 zName = blob_str(&filename);
380 zip_add_folders(zName);
@@ -397,10 +402,21 @@
397 blob_append(&filename, "manifest.tags", -1);
398 zName = blob_str(&filename);
399 zip_add_folders(zName);
400 zip_add_file(zName, &tagslist, 0);
401 blob_reset(&tagslist);
 
 
 
 
 
 
 
 
 
 
 
402 }
403 }
404 manifest_file_rewind(pManifest);
405 while( (pFile = manifest_file_next(pManifest,0))!=0 ){
406 int fid;
407
--- src/zip.c
+++ src/zip.c
@@ -371,10 +371,15 @@
371 if( (pInclude==0 || glob_match(pInclude, "manifest.tags"))
372 && !glob_match(pExclude, "manifest.tags")
373 && (flg & MFESTFLG_TAGS) ){
374 eflg |= MFESTFLG_TAGS;
375 }
376 if( (pInclude==0 || glob_match(pInclude, "manifest.symlinks"))
377 && !glob_match(pExclude, "manifest.symlinks")
378 && (flg & MFESTFLG_SYMLINKS) ){
379 eflg |= MFESTFLG_SYMLINKS;
380 }
381
382 if( eflg & MFESTFLG_RAW ){
383 blob_append(&filename, "manifest", -1);
384 zName = blob_str(&filename);
385 zip_add_folders(zName);
@@ -397,10 +402,21 @@
402 blob_append(&filename, "manifest.tags", -1);
403 zName = blob_str(&filename);
404 zip_add_folders(zName);
405 zip_add_file(zName, &tagslist, 0);
406 blob_reset(&tagslist);
407 }
408 if( eflg & MFESTFLG_SYMLINKS ){
409 Blob symlinklist;
410 blob_zero(&symlinklist);
411 get_checkin_symlinklist(rid, &symlinklist);
412 blob_resize(&filename, nPrefix);
413 blob_append(&filename, "manifest.symlinks", -1);
414 zName = blob_str(&filename);
415 zip_add_folders(zName);
416 zip_add_file(zName, &symlinklist, 0);
417 blob_reset(&symlinklist);
418 }
419 }
420 manifest_file_rewind(pManifest);
421 while( (pFile = manifest_file_next(pManifest,0))!=0 ){
422 int fid;
423
--- www/changes.wiki
+++ www/changes.wiki
@@ -30,10 +30,12 @@
3030
[/help?cmd=zip|zip], and [/help?cmd=tarball|tarball] pages and commands to
3131
honor the versioned manifest setting when outside of an open checkout
3232
directory.
3333
* The admin-log and access-log settings are now on by default for
3434
new repositories.
35
+ * Add support for the "l" flag to the "manifest" setting to enable creation
36
+ of a file "manifest.symlinks" which lists the names of all symlinks.
3537
* Update the built-in SQLite to version 3.20.1.
3638
3739
<a name='v2_3'></a>
3840
<h2>Changes for Version 2.3 (2017-07-21)</h2>
3941
4042
--- www/changes.wiki
+++ www/changes.wiki
@@ -30,10 +30,12 @@
30 [/help?cmd=zip|zip], and [/help?cmd=tarball|tarball] pages and commands to
31 honor the versioned manifest setting when outside of an open checkout
32 directory.
33 * The admin-log and access-log settings are now on by default for
34 new repositories.
 
 
35 * Update the built-in SQLite to version 3.20.1.
36
37 <a name='v2_3'></a>
38 <h2>Changes for Version 2.3 (2017-07-21)</h2>
39
40
--- www/changes.wiki
+++ www/changes.wiki
@@ -30,10 +30,12 @@
30 [/help?cmd=zip|zip], and [/help?cmd=tarball|tarball] pages and commands to
31 honor the versioned manifest setting when outside of an open checkout
32 directory.
33 * The admin-log and access-log settings are now on by default for
34 new repositories.
35 * Add support for the "l" flag to the "manifest" setting to enable creation
36 of a file "manifest.symlinks" which lists the names of all symlinks.
37 * Update the built-in SQLite to version 3.20.1.
38
39 <a name='v2_3'></a>
40 <h2>Changes for Version 2.3 (2017-07-21)</h2>
41
42

Keyboard Shortcuts

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