Fossil SCM

Back out changes in [9978d2aba603d94]. Instead, simply modify checkout so that it never overwrites "manifest" and "manifest.uuid" if those files are explicitly checked in. Ticket [22a59e9a3455d8e].

drh 2010-09-29 13:18 wolfgangFormat2CSS_2 merge
Commit 4208b3b47915c33039680f28d65156d211954c72
+1 -3
--- src/add.c
+++ src/add.c
@@ -36,20 +36,18 @@
3636
Blob pathname;
3737
const char *zPath;
3838
3939
file_tree_name(zName, &pathname, 1);
4040
zPath = blob_str(&pathname);
41
- if( strcmp(zPath, db_manifestName())==0
42
- || strcmp(zPath, "_FOSSIL_")==0
41
+ if( strcmp(zPath, "_FOSSIL_")==0
4342
|| strcmp(zPath, "_FOSSIL_-journal")==0
4443
|| strcmp(zPath, "_FOSSIL_-wal")==0
4544
|| strcmp(zPath, "_FOSSIL_-shm")==0
4645
|| strcmp(zPath, ".fos")==0
4746
|| strcmp(zPath, ".fos-journal")==0
4847
|| strcmp(zPath, ".fos-wal")==0
4948
|| strcmp(zPath, ".fos-shm")==0
50
- || strcmp(zPath, db_manifestUuidName())==0
5149
|| blob_compare(&pathname, pOmit)==0
5250
){
5351
fossil_warning("cannot add %s", zPath);
5452
}else{
5553
if( !file_is_simple_pathname(zPath) ){
5654
--- src/add.c
+++ src/add.c
@@ -36,20 +36,18 @@
36 Blob pathname;
37 const char *zPath;
38
39 file_tree_name(zName, &pathname, 1);
40 zPath = blob_str(&pathname);
41 if( strcmp(zPath, db_manifestName())==0
42 || strcmp(zPath, "_FOSSIL_")==0
43 || strcmp(zPath, "_FOSSIL_-journal")==0
44 || strcmp(zPath, "_FOSSIL_-wal")==0
45 || strcmp(zPath, "_FOSSIL_-shm")==0
46 || strcmp(zPath, ".fos")==0
47 || strcmp(zPath, ".fos-journal")==0
48 || strcmp(zPath, ".fos-wal")==0
49 || strcmp(zPath, ".fos-shm")==0
50 || strcmp(zPath, db_manifestUuidName())==0
51 || blob_compare(&pathname, pOmit)==0
52 ){
53 fossil_warning("cannot add %s", zPath);
54 }else{
55 if( !file_is_simple_pathname(zPath) ){
56
--- src/add.c
+++ src/add.c
@@ -36,20 +36,18 @@
36 Blob pathname;
37 const char *zPath;
38
39 file_tree_name(zName, &pathname, 1);
40 zPath = blob_str(&pathname);
41 if( strcmp(zPath, "_FOSSIL_")==0
 
42 || strcmp(zPath, "_FOSSIL_-journal")==0
43 || strcmp(zPath, "_FOSSIL_-wal")==0
44 || strcmp(zPath, "_FOSSIL_-shm")==0
45 || strcmp(zPath, ".fos")==0
46 || strcmp(zPath, ".fos-journal")==0
47 || strcmp(zPath, ".fos-wal")==0
48 || strcmp(zPath, ".fos-shm")==0
 
49 || blob_compare(&pathname, pOmit)==0
50 ){
51 fossil_warning("cannot add %s", zPath);
52 }else{
53 if( !file_is_simple_pathname(zPath) ){
54
+1 -3
--- src/add.c
+++ src/add.c
@@ -36,20 +36,18 @@
3636
Blob pathname;
3737
const char *zPath;
3838
3939
file_tree_name(zName, &pathname, 1);
4040
zPath = blob_str(&pathname);
41
- if( strcmp(zPath, db_manifestName())==0
42
- || strcmp(zPath, "_FOSSIL_")==0
41
+ if( strcmp(zPath, "_FOSSIL_")==0
4342
|| strcmp(zPath, "_FOSSIL_-journal")==0
4443
|| strcmp(zPath, "_FOSSIL_-wal")==0
4544
|| strcmp(zPath, "_FOSSIL_-shm")==0
4645
|| strcmp(zPath, ".fos")==0
4746
|| strcmp(zPath, ".fos-journal")==0
4847
|| strcmp(zPath, ".fos-wal")==0
4948
|| strcmp(zPath, ".fos-shm")==0
50
- || strcmp(zPath, db_manifestUuidName())==0
5149
|| blob_compare(&pathname, pOmit)==0
5250
){
5351
fossil_warning("cannot add %s", zPath);
5452
}else{
5553
if( !file_is_simple_pathname(zPath) ){
5654
--- src/add.c
+++ src/add.c
@@ -36,20 +36,18 @@
36 Blob pathname;
37 const char *zPath;
38
39 file_tree_name(zName, &pathname, 1);
40 zPath = blob_str(&pathname);
41 if( strcmp(zPath, db_manifestName())==0
42 || strcmp(zPath, "_FOSSIL_")==0
43 || strcmp(zPath, "_FOSSIL_-journal")==0
44 || strcmp(zPath, "_FOSSIL_-wal")==0
45 || strcmp(zPath, "_FOSSIL_-shm")==0
46 || strcmp(zPath, ".fos")==0
47 || strcmp(zPath, ".fos-journal")==0
48 || strcmp(zPath, ".fos-wal")==0
49 || strcmp(zPath, ".fos-shm")==0
50 || strcmp(zPath, db_manifestUuidName())==0
51 || blob_compare(&pathname, pOmit)==0
52 ){
53 fossil_warning("cannot add %s", zPath);
54 }else{
55 if( !file_is_simple_pathname(zPath) ){
56
--- src/add.c
+++ src/add.c
@@ -36,20 +36,18 @@
36 Blob pathname;
37 const char *zPath;
38
39 file_tree_name(zName, &pathname, 1);
40 zPath = blob_str(&pathname);
41 if( strcmp(zPath, "_FOSSIL_")==0
 
42 || strcmp(zPath, "_FOSSIL_-journal")==0
43 || strcmp(zPath, "_FOSSIL_-wal")==0
44 || strcmp(zPath, "_FOSSIL_-shm")==0
45 || strcmp(zPath, ".fos")==0
46 || strcmp(zPath, ".fos-journal")==0
47 || strcmp(zPath, ".fos-wal")==0
48 || strcmp(zPath, ".fos-shm")==0
 
49 || blob_compare(&pathname, pOmit)==0
50 ){
51 fossil_warning("cannot add %s", zPath);
52 }else{
53 if( !file_is_simple_pathname(zPath) ){
54
+28 -11
--- src/checkin.c
+++ src/checkin.c
@@ -535,10 +535,23 @@
535535
assert( strlen(zDate)==19 );
536536
assert( zDate[10]==' ' );
537537
zDate[10] = 'T';
538538
return zDate;
539539
}
540
+
541
+/*
542
+** Return TRUE (non-zero) if a file named "zFilename" exists in
543
+** the checkout identified by vid.
544
+**
545
+** The original purpose of this routine was to check for the presence of
546
+** a "checked-in" file named "manifest" or "manifest.uuid" so as to avoid
547
+** overwriting that file with automatically generated files.
548
+*/
549
+int file_exists_in_checkout(int vid, const char *zFilename){
550
+ return db_exists("SELECT 1 FROM vfile WHERE vid=%d AND pathname=%Q",
551
+ vid, zFilename);
552
+}
540553
541554
/*
542555
** COMMAND: ci
543556
** COMMAND: commit
544557
**
@@ -844,38 +857,42 @@
844857
db_finalize(&q);
845858
}
846859
blob_appendf(&manifest, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin);
847860
md5sum_blob(&manifest, &mcksum);
848861
blob_appendf(&manifest, "Z %b\n", &mcksum);
849
- zManifestFile = mprintf("%s%s", g.zLocalRoot, db_manifestName());
850862
if( !noSign && !g.markPrivate && clearsign(&manifest, &manifest) ){
851863
Blob ans;
852864
blob_zero(&ans);
853865
prompt_user("unable to sign manifest. continue (y/N)? ", &ans);
854866
if( blob_str(&ans)[0]!='y' ){
855867
fossil_exit(1);
856868
}
857869
}
858
- blob_write_to_file(&manifest, zManifestFile);
859
- blob_reset(&manifest);
860
- blob_read_from_file(&manifest, zManifestFile);
861
- free(zManifestFile);
870
+ if( !file_exists_in_checkout(vid, "manifest") ){
871
+ zManifestFile = mprintf("%smanifest", g.zLocalRoot);
872
+ blob_write_to_file(&manifest, zManifestFile);
873
+ blob_reset(&manifest);
874
+ blob_read_from_file(&manifest, zManifestFile);
875
+ free(zManifestFile);
876
+ }
862877
nvid = content_put(&manifest, 0, 0);
863878
if( nvid==0 ){
864879
fossil_panic("trouble committing manifest: %s", g.zErrMsg);
865880
}
866881
db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid);
867882
manifest_crosslink(nvid, &manifest);
868883
content_deltify(vid, nvid, 0);
869884
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid);
870885
printf("New_Version: %s\n", zUuid);
871
- zManifestFile = mprintf("%s%s", g.zLocalRoot, db_manifestUuidName());
872
- blob_zero(&muuid);
873
- blob_appendf(&muuid, "%s\n", zUuid);
874
- blob_write_to_file(&muuid, zManifestFile);
875
- free(zManifestFile);
876
- blob_reset(&muuid);
886
+ if( !file_exists_in_checkout(vid, "manifest.uuid") ){
887
+ zManifestFile = mprintf("%smanifest.uuid", g.zLocalRoot);
888
+ blob_zero(&muuid);
889
+ blob_appendf(&muuid, "%s\n", zUuid);
890
+ blob_write_to_file(&muuid, zManifestFile);
891
+ free(zManifestFile);
892
+ blob_reset(&muuid);
893
+ }
877894
878895
879896
/* Update the vfile and vmerge tables */
880897
db_multi_exec(
881898
"DELETE FROM vfile WHERE (vid!=%d OR deleted) AND file_is_selected(id);"
882899
--- src/checkin.c
+++ src/checkin.c
@@ -535,10 +535,23 @@
535 assert( strlen(zDate)==19 );
536 assert( zDate[10]==' ' );
537 zDate[10] = 'T';
538 return zDate;
539 }
 
 
 
 
 
 
 
 
 
 
 
 
 
540
541 /*
542 ** COMMAND: ci
543 ** COMMAND: commit
544 **
@@ -844,38 +857,42 @@
844 db_finalize(&q);
845 }
846 blob_appendf(&manifest, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin);
847 md5sum_blob(&manifest, &mcksum);
848 blob_appendf(&manifest, "Z %b\n", &mcksum);
849 zManifestFile = mprintf("%s%s", g.zLocalRoot, db_manifestName());
850 if( !noSign && !g.markPrivate && clearsign(&manifest, &manifest) ){
851 Blob ans;
852 blob_zero(&ans);
853 prompt_user("unable to sign manifest. continue (y/N)? ", &ans);
854 if( blob_str(&ans)[0]!='y' ){
855 fossil_exit(1);
856 }
857 }
858 blob_write_to_file(&manifest, zManifestFile);
859 blob_reset(&manifest);
860 blob_read_from_file(&manifest, zManifestFile);
861 free(zManifestFile);
 
 
 
862 nvid = content_put(&manifest, 0, 0);
863 if( nvid==0 ){
864 fossil_panic("trouble committing manifest: %s", g.zErrMsg);
865 }
866 db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid);
867 manifest_crosslink(nvid, &manifest);
868 content_deltify(vid, nvid, 0);
869 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid);
870 printf("New_Version: %s\n", zUuid);
871 zManifestFile = mprintf("%s%s", g.zLocalRoot, db_manifestUuidName());
872 blob_zero(&muuid);
873 blob_appendf(&muuid, "%s\n", zUuid);
874 blob_write_to_file(&muuid, zManifestFile);
875 free(zManifestFile);
876 blob_reset(&muuid);
 
 
877
878
879 /* Update the vfile and vmerge tables */
880 db_multi_exec(
881 "DELETE FROM vfile WHERE (vid!=%d OR deleted) AND file_is_selected(id);"
882
--- src/checkin.c
+++ src/checkin.c
@@ -535,10 +535,23 @@
535 assert( strlen(zDate)==19 );
536 assert( zDate[10]==' ' );
537 zDate[10] = 'T';
538 return zDate;
539 }
540
541 /*
542 ** Return TRUE (non-zero) if a file named "zFilename" exists in
543 ** the checkout identified by vid.
544 **
545 ** The original purpose of this routine was to check for the presence of
546 ** a "checked-in" file named "manifest" or "manifest.uuid" so as to avoid
547 ** overwriting that file with automatically generated files.
548 */
549 int file_exists_in_checkout(int vid, const char *zFilename){
550 return db_exists("SELECT 1 FROM vfile WHERE vid=%d AND pathname=%Q",
551 vid, zFilename);
552 }
553
554 /*
555 ** COMMAND: ci
556 ** COMMAND: commit
557 **
@@ -844,38 +857,42 @@
857 db_finalize(&q);
858 }
859 blob_appendf(&manifest, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin);
860 md5sum_blob(&manifest, &mcksum);
861 blob_appendf(&manifest, "Z %b\n", &mcksum);
 
862 if( !noSign && !g.markPrivate && clearsign(&manifest, &manifest) ){
863 Blob ans;
864 blob_zero(&ans);
865 prompt_user("unable to sign manifest. continue (y/N)? ", &ans);
866 if( blob_str(&ans)[0]!='y' ){
867 fossil_exit(1);
868 }
869 }
870 if( !file_exists_in_checkout(vid, "manifest") ){
871 zManifestFile = mprintf("%smanifest", g.zLocalRoot);
872 blob_write_to_file(&manifest, zManifestFile);
873 blob_reset(&manifest);
874 blob_read_from_file(&manifest, zManifestFile);
875 free(zManifestFile);
876 }
877 nvid = content_put(&manifest, 0, 0);
878 if( nvid==0 ){
879 fossil_panic("trouble committing manifest: %s", g.zErrMsg);
880 }
881 db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid);
882 manifest_crosslink(nvid, &manifest);
883 content_deltify(vid, nvid, 0);
884 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid);
885 printf("New_Version: %s\n", zUuid);
886 if( !file_exists_in_checkout(vid, "manifest.uuid") ){
887 zManifestFile = mprintf("%smanifest.uuid", g.zLocalRoot);
888 blob_zero(&muuid);
889 blob_appendf(&muuid, "%s\n", zUuid);
890 blob_write_to_file(&muuid, zManifestFile);
891 free(zManifestFile);
892 blob_reset(&muuid);
893 }
894
895
896 /* Update the vfile and vmerge tables */
897 db_multi_exec(
898 "DELETE FROM vfile WHERE (vid!=%d OR deleted) AND file_is_selected(id);"
899
+28 -11
--- src/checkin.c
+++ src/checkin.c
@@ -535,10 +535,23 @@
535535
assert( strlen(zDate)==19 );
536536
assert( zDate[10]==' ' );
537537
zDate[10] = 'T';
538538
return zDate;
539539
}
540
+
541
+/*
542
+** Return TRUE (non-zero) if a file named "zFilename" exists in
543
+** the checkout identified by vid.
544
+**
545
+** The original purpose of this routine was to check for the presence of
546
+** a "checked-in" file named "manifest" or "manifest.uuid" so as to avoid
547
+** overwriting that file with automatically generated files.
548
+*/
549
+int file_exists_in_checkout(int vid, const char *zFilename){
550
+ return db_exists("SELECT 1 FROM vfile WHERE vid=%d AND pathname=%Q",
551
+ vid, zFilename);
552
+}
540553
541554
/*
542555
** COMMAND: ci
543556
** COMMAND: commit
544557
**
@@ -844,38 +857,42 @@
844857
db_finalize(&q);
845858
}
846859
blob_appendf(&manifest, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin);
847860
md5sum_blob(&manifest, &mcksum);
848861
blob_appendf(&manifest, "Z %b\n", &mcksum);
849
- zManifestFile = mprintf("%s%s", g.zLocalRoot, db_manifestName());
850862
if( !noSign && !g.markPrivate && clearsign(&manifest, &manifest) ){
851863
Blob ans;
852864
blob_zero(&ans);
853865
prompt_user("unable to sign manifest. continue (y/N)? ", &ans);
854866
if( blob_str(&ans)[0]!='y' ){
855867
fossil_exit(1);
856868
}
857869
}
858
- blob_write_to_file(&manifest, zManifestFile);
859
- blob_reset(&manifest);
860
- blob_read_from_file(&manifest, zManifestFile);
861
- free(zManifestFile);
870
+ if( !file_exists_in_checkout(vid, "manifest") ){
871
+ zManifestFile = mprintf("%smanifest", g.zLocalRoot);
872
+ blob_write_to_file(&manifest, zManifestFile);
873
+ blob_reset(&manifest);
874
+ blob_read_from_file(&manifest, zManifestFile);
875
+ free(zManifestFile);
876
+ }
862877
nvid = content_put(&manifest, 0, 0);
863878
if( nvid==0 ){
864879
fossil_panic("trouble committing manifest: %s", g.zErrMsg);
865880
}
866881
db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid);
867882
manifest_crosslink(nvid, &manifest);
868883
content_deltify(vid, nvid, 0);
869884
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid);
870885
printf("New_Version: %s\n", zUuid);
871
- zManifestFile = mprintf("%s%s", g.zLocalRoot, db_manifestUuidName());
872
- blob_zero(&muuid);
873
- blob_appendf(&muuid, "%s\n", zUuid);
874
- blob_write_to_file(&muuid, zManifestFile);
875
- free(zManifestFile);
876
- blob_reset(&muuid);
886
+ if( !file_exists_in_checkout(vid, "manifest.uuid") ){
887
+ zManifestFile = mprintf("%smanifest.uuid", g.zLocalRoot);
888
+ blob_zero(&muuid);
889
+ blob_appendf(&muuid, "%s\n", zUuid);
890
+ blob_write_to_file(&muuid, zManifestFile);
891
+ free(zManifestFile);
892
+ blob_reset(&muuid);
893
+ }
877894
878895
879896
/* Update the vfile and vmerge tables */
880897
db_multi_exec(
881898
"DELETE FROM vfile WHERE (vid!=%d OR deleted) AND file_is_selected(id);"
882899
--- src/checkin.c
+++ src/checkin.c
@@ -535,10 +535,23 @@
535 assert( strlen(zDate)==19 );
536 assert( zDate[10]==' ' );
537 zDate[10] = 'T';
538 return zDate;
539 }
 
 
 
 
 
 
 
 
 
 
 
 
 
540
541 /*
542 ** COMMAND: ci
543 ** COMMAND: commit
544 **
@@ -844,38 +857,42 @@
844 db_finalize(&q);
845 }
846 blob_appendf(&manifest, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin);
847 md5sum_blob(&manifest, &mcksum);
848 blob_appendf(&manifest, "Z %b\n", &mcksum);
849 zManifestFile = mprintf("%s%s", g.zLocalRoot, db_manifestName());
850 if( !noSign && !g.markPrivate && clearsign(&manifest, &manifest) ){
851 Blob ans;
852 blob_zero(&ans);
853 prompt_user("unable to sign manifest. continue (y/N)? ", &ans);
854 if( blob_str(&ans)[0]!='y' ){
855 fossil_exit(1);
856 }
857 }
858 blob_write_to_file(&manifest, zManifestFile);
859 blob_reset(&manifest);
860 blob_read_from_file(&manifest, zManifestFile);
861 free(zManifestFile);
 
 
 
862 nvid = content_put(&manifest, 0, 0);
863 if( nvid==0 ){
864 fossil_panic("trouble committing manifest: %s", g.zErrMsg);
865 }
866 db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid);
867 manifest_crosslink(nvid, &manifest);
868 content_deltify(vid, nvid, 0);
869 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid);
870 printf("New_Version: %s\n", zUuid);
871 zManifestFile = mprintf("%s%s", g.zLocalRoot, db_manifestUuidName());
872 blob_zero(&muuid);
873 blob_appendf(&muuid, "%s\n", zUuid);
874 blob_write_to_file(&muuid, zManifestFile);
875 free(zManifestFile);
876 blob_reset(&muuid);
 
 
877
878
879 /* Update the vfile and vmerge tables */
880 db_multi_exec(
881 "DELETE FROM vfile WHERE (vid!=%d OR deleted) AND file_is_selected(id);"
882
--- src/checkin.c
+++ src/checkin.c
@@ -535,10 +535,23 @@
535 assert( strlen(zDate)==19 );
536 assert( zDate[10]==' ' );
537 zDate[10] = 'T';
538 return zDate;
539 }
540
541 /*
542 ** Return TRUE (non-zero) if a file named "zFilename" exists in
543 ** the checkout identified by vid.
544 **
545 ** The original purpose of this routine was to check for the presence of
546 ** a "checked-in" file named "manifest" or "manifest.uuid" so as to avoid
547 ** overwriting that file with automatically generated files.
548 */
549 int file_exists_in_checkout(int vid, const char *zFilename){
550 return db_exists("SELECT 1 FROM vfile WHERE vid=%d AND pathname=%Q",
551 vid, zFilename);
552 }
553
554 /*
555 ** COMMAND: ci
556 ** COMMAND: commit
557 **
@@ -844,38 +857,42 @@
857 db_finalize(&q);
858 }
859 blob_appendf(&manifest, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin);
860 md5sum_blob(&manifest, &mcksum);
861 blob_appendf(&manifest, "Z %b\n", &mcksum);
 
862 if( !noSign && !g.markPrivate && clearsign(&manifest, &manifest) ){
863 Blob ans;
864 blob_zero(&ans);
865 prompt_user("unable to sign manifest. continue (y/N)? ", &ans);
866 if( blob_str(&ans)[0]!='y' ){
867 fossil_exit(1);
868 }
869 }
870 if( !file_exists_in_checkout(vid, "manifest") ){
871 zManifestFile = mprintf("%smanifest", g.zLocalRoot);
872 blob_write_to_file(&manifest, zManifestFile);
873 blob_reset(&manifest);
874 blob_read_from_file(&manifest, zManifestFile);
875 free(zManifestFile);
876 }
877 nvid = content_put(&manifest, 0, 0);
878 if( nvid==0 ){
879 fossil_panic("trouble committing manifest: %s", g.zErrMsg);
880 }
881 db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid);
882 manifest_crosslink(nvid, &manifest);
883 content_deltify(vid, nvid, 0);
884 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid);
885 printf("New_Version: %s\n", zUuid);
886 if( !file_exists_in_checkout(vid, "manifest.uuid") ){
887 zManifestFile = mprintf("%smanifest.uuid", g.zLocalRoot);
888 blob_zero(&muuid);
889 blob_appendf(&muuid, "%s\n", zUuid);
890 blob_write_to_file(&muuid, zManifestFile);
891 free(zManifestFile);
892 blob_reset(&muuid);
893 }
894
895
896 /* Update the vfile and vmerge tables */
897 db_multi_exec(
898 "DELETE FROM vfile WHERE (vid!=%d OR deleted) AND file_is_selected(id);"
899
+32 -12
--- src/checkout.c
+++ src/checkout.c
@@ -97,34 +97,33 @@
9797
db_multi_exec("UPDATE vfile SET isexe=%d WHERE vid=%d and pathname=%Q",
9898
onoff, vid, zFilename);
9999
}
100100
101101
/*
102
-** Read the manifest file given by vid out of the repository
103
-** and store it in the root of the local check-out.
102
+** Set or clear the execute permission bit (as appropriate) for all
103
+** files in the current check-out.
104
+**
105
+** If the checkout does not have explicit files named "manifest" and
106
+** "manifest.uuid" then automatically generate files with those names
107
+** containing, respectively, the text of the manifest and the artifact
108
+** ID of the manifest.
104109
*/
105110
void manifest_to_disk(int vid){
106111
char *zManFile;
107112
Blob manifest;
108113
Blob hash;
109114
Blob filename;
110115
int baseLen;
111116
int i;
117
+ int seenManifest = 0;
118
+ int seenManifestUuid = 0;
112119
Manifest m;
113120
121
+ /* Check the EXE permission status of all files
122
+ */
114123
blob_zero(&manifest);
115
- zManFile = mprintf("%s%s", g.zLocalRoot, db_manifestName());
116124
content_get(vid, &manifest);
117
- blob_write_to_file(&manifest, zManFile);
118
- free(zManFile);
119
- blob_zero(&hash);
120
- sha1sum_blob(&manifest, &hash);
121
- zManFile = mprintf("%s%s", g.zLocalRoot,db_manifestUuidName());
122
- blob_append(&hash, "\n", 1);
123
- blob_write_to_file(&hash, zManFile);
124
- free(zManFile);
125
- blob_reset(&hash);
126125
manifest_parse(&m, &manifest);
127126
blob_zero(&filename);
128127
blob_appendf(&filename, "%s/", g.zLocalRoot);
129128
baseLen = blob_size(&filename);
130129
for(i=0; i<m.nFile; i++){
@@ -132,13 +131,34 @@
132131
blob_append(&filename, m.aFile[i].zName, -1);
133132
isExe = m.aFile[i].zPerm && strstr(m.aFile[i].zPerm, "x");
134133
file_setexe(blob_str(&filename), isExe);
135134
set_or_clear_isexe(m.aFile[i].zName, vid, isExe);
136135
blob_resize(&filename, baseLen);
136
+ if( memcmp(m.aFile[i].zName, "manifest", 8)==0 ){
137
+ if( m.aFile[i].zName[8]==0 ) seenManifest = 1;
138
+ if( strcmp(&m.aFile[i].zName[8], ".uuid")==0 ) seenManifestUuid = 1;
139
+ }
137140
}
138141
blob_reset(&filename);
139142
manifest_clear(&m);
143
+
144
+ blob_zero(&manifest);
145
+ content_get(vid, &manifest);
146
+ if( !seenManifest ){
147
+ zManFile = mprintf("%smanifest", g.zLocalRoot);
148
+ blob_write_to_file(&manifest, zManFile);
149
+ free(zManFile);
150
+ }
151
+ if( !seenManifestUuid ){
152
+ blob_zero(&hash);
153
+ sha1sum_blob(&manifest, &hash);
154
+ zManFile = mprintf("%smanifest.uuid", g.zLocalRoot);
155
+ blob_append(&hash, "\n", 1);
156
+ blob_write_to_file(&hash, zManFile);
157
+ free(zManFile);
158
+ blob_reset(&hash);
159
+ }
140160
}
141161
142162
/*
143163
** COMMAND: checkout
144164
** COMMAND: co
145165
--- src/checkout.c
+++ src/checkout.c
@@ -97,34 +97,33 @@
97 db_multi_exec("UPDATE vfile SET isexe=%d WHERE vid=%d and pathname=%Q",
98 onoff, vid, zFilename);
99 }
100
101 /*
102 ** Read the manifest file given by vid out of the repository
103 ** and store it in the root of the local check-out.
 
 
 
 
 
104 */
105 void manifest_to_disk(int vid){
106 char *zManFile;
107 Blob manifest;
108 Blob hash;
109 Blob filename;
110 int baseLen;
111 int i;
 
 
112 Manifest m;
113
 
 
114 blob_zero(&manifest);
115 zManFile = mprintf("%s%s", g.zLocalRoot, db_manifestName());
116 content_get(vid, &manifest);
117 blob_write_to_file(&manifest, zManFile);
118 free(zManFile);
119 blob_zero(&hash);
120 sha1sum_blob(&manifest, &hash);
121 zManFile = mprintf("%s%s", g.zLocalRoot,db_manifestUuidName());
122 blob_append(&hash, "\n", 1);
123 blob_write_to_file(&hash, zManFile);
124 free(zManFile);
125 blob_reset(&hash);
126 manifest_parse(&m, &manifest);
127 blob_zero(&filename);
128 blob_appendf(&filename, "%s/", g.zLocalRoot);
129 baseLen = blob_size(&filename);
130 for(i=0; i<m.nFile; i++){
@@ -132,13 +131,34 @@
132 blob_append(&filename, m.aFile[i].zName, -1);
133 isExe = m.aFile[i].zPerm && strstr(m.aFile[i].zPerm, "x");
134 file_setexe(blob_str(&filename), isExe);
135 set_or_clear_isexe(m.aFile[i].zName, vid, isExe);
136 blob_resize(&filename, baseLen);
 
 
 
 
137 }
138 blob_reset(&filename);
139 manifest_clear(&m);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140 }
141
142 /*
143 ** COMMAND: checkout
144 ** COMMAND: co
145
--- src/checkout.c
+++ src/checkout.c
@@ -97,34 +97,33 @@
97 db_multi_exec("UPDATE vfile SET isexe=%d WHERE vid=%d and pathname=%Q",
98 onoff, vid, zFilename);
99 }
100
101 /*
102 ** Set or clear the execute permission bit (as appropriate) for all
103 ** files in the current check-out.
104 **
105 ** If the checkout does not have explicit files named "manifest" and
106 ** "manifest.uuid" then automatically generate files with those names
107 ** containing, respectively, the text of the manifest and the artifact
108 ** ID of the manifest.
109 */
110 void manifest_to_disk(int vid){
111 char *zManFile;
112 Blob manifest;
113 Blob hash;
114 Blob filename;
115 int baseLen;
116 int i;
117 int seenManifest = 0;
118 int seenManifestUuid = 0;
119 Manifest m;
120
121 /* Check the EXE permission status of all files
122 */
123 blob_zero(&manifest);
 
124 content_get(vid, &manifest);
 
 
 
 
 
 
 
 
 
125 manifest_parse(&m, &manifest);
126 blob_zero(&filename);
127 blob_appendf(&filename, "%s/", g.zLocalRoot);
128 baseLen = blob_size(&filename);
129 for(i=0; i<m.nFile; i++){
@@ -132,13 +131,34 @@
131 blob_append(&filename, m.aFile[i].zName, -1);
132 isExe = m.aFile[i].zPerm && strstr(m.aFile[i].zPerm, "x");
133 file_setexe(blob_str(&filename), isExe);
134 set_or_clear_isexe(m.aFile[i].zName, vid, isExe);
135 blob_resize(&filename, baseLen);
136 if( memcmp(m.aFile[i].zName, "manifest", 8)==0 ){
137 if( m.aFile[i].zName[8]==0 ) seenManifest = 1;
138 if( strcmp(&m.aFile[i].zName[8], ".uuid")==0 ) seenManifestUuid = 1;
139 }
140 }
141 blob_reset(&filename);
142 manifest_clear(&m);
143
144 blob_zero(&manifest);
145 content_get(vid, &manifest);
146 if( !seenManifest ){
147 zManFile = mprintf("%smanifest", g.zLocalRoot);
148 blob_write_to_file(&manifest, zManFile);
149 free(zManFile);
150 }
151 if( !seenManifestUuid ){
152 blob_zero(&hash);
153 sha1sum_blob(&manifest, &hash);
154 zManFile = mprintf("%smanifest.uuid", g.zLocalRoot);
155 blob_append(&hash, "\n", 1);
156 blob_write_to_file(&hash, zManFile);
157 free(zManFile);
158 blob_reset(&hash);
159 }
160 }
161
162 /*
163 ** COMMAND: checkout
164 ** COMMAND: co
165
+32 -12
--- src/checkout.c
+++ src/checkout.c
@@ -97,34 +97,33 @@
9797
db_multi_exec("UPDATE vfile SET isexe=%d WHERE vid=%d and pathname=%Q",
9898
onoff, vid, zFilename);
9999
}
100100
101101
/*
102
-** Read the manifest file given by vid out of the repository
103
-** and store it in the root of the local check-out.
102
+** Set or clear the execute permission bit (as appropriate) for all
103
+** files in the current check-out.
104
+**
105
+** If the checkout does not have explicit files named "manifest" and
106
+** "manifest.uuid" then automatically generate files with those names
107
+** containing, respectively, the text of the manifest and the artifact
108
+** ID of the manifest.
104109
*/
105110
void manifest_to_disk(int vid){
106111
char *zManFile;
107112
Blob manifest;
108113
Blob hash;
109114
Blob filename;
110115
int baseLen;
111116
int i;
117
+ int seenManifest = 0;
118
+ int seenManifestUuid = 0;
112119
Manifest m;
113120
121
+ /* Check the EXE permission status of all files
122
+ */
114123
blob_zero(&manifest);
115
- zManFile = mprintf("%s%s", g.zLocalRoot, db_manifestName());
116124
content_get(vid, &manifest);
117
- blob_write_to_file(&manifest, zManFile);
118
- free(zManFile);
119
- blob_zero(&hash);
120
- sha1sum_blob(&manifest, &hash);
121
- zManFile = mprintf("%s%s", g.zLocalRoot,db_manifestUuidName());
122
- blob_append(&hash, "\n", 1);
123
- blob_write_to_file(&hash, zManFile);
124
- free(zManFile);
125
- blob_reset(&hash);
126125
manifest_parse(&m, &manifest);
127126
blob_zero(&filename);
128127
blob_appendf(&filename, "%s/", g.zLocalRoot);
129128
baseLen = blob_size(&filename);
130129
for(i=0; i<m.nFile; i++){
@@ -132,13 +131,34 @@
132131
blob_append(&filename, m.aFile[i].zName, -1);
133132
isExe = m.aFile[i].zPerm && strstr(m.aFile[i].zPerm, "x");
134133
file_setexe(blob_str(&filename), isExe);
135134
set_or_clear_isexe(m.aFile[i].zName, vid, isExe);
136135
blob_resize(&filename, baseLen);
136
+ if( memcmp(m.aFile[i].zName, "manifest", 8)==0 ){
137
+ if( m.aFile[i].zName[8]==0 ) seenManifest = 1;
138
+ if( strcmp(&m.aFile[i].zName[8], ".uuid")==0 ) seenManifestUuid = 1;
139
+ }
137140
}
138141
blob_reset(&filename);
139142
manifest_clear(&m);
143
+
144
+ blob_zero(&manifest);
145
+ content_get(vid, &manifest);
146
+ if( !seenManifest ){
147
+ zManFile = mprintf("%smanifest", g.zLocalRoot);
148
+ blob_write_to_file(&manifest, zManFile);
149
+ free(zManFile);
150
+ }
151
+ if( !seenManifestUuid ){
152
+ blob_zero(&hash);
153
+ sha1sum_blob(&manifest, &hash);
154
+ zManFile = mprintf("%smanifest.uuid", g.zLocalRoot);
155
+ blob_append(&hash, "\n", 1);
156
+ blob_write_to_file(&hash, zManFile);
157
+ free(zManFile);
158
+ blob_reset(&hash);
159
+ }
140160
}
141161
142162
/*
143163
** COMMAND: checkout
144164
** COMMAND: co
145165
--- src/checkout.c
+++ src/checkout.c
@@ -97,34 +97,33 @@
97 db_multi_exec("UPDATE vfile SET isexe=%d WHERE vid=%d and pathname=%Q",
98 onoff, vid, zFilename);
99 }
100
101 /*
102 ** Read the manifest file given by vid out of the repository
103 ** and store it in the root of the local check-out.
 
 
 
 
 
104 */
105 void manifest_to_disk(int vid){
106 char *zManFile;
107 Blob manifest;
108 Blob hash;
109 Blob filename;
110 int baseLen;
111 int i;
 
 
112 Manifest m;
113
 
 
114 blob_zero(&manifest);
115 zManFile = mprintf("%s%s", g.zLocalRoot, db_manifestName());
116 content_get(vid, &manifest);
117 blob_write_to_file(&manifest, zManFile);
118 free(zManFile);
119 blob_zero(&hash);
120 sha1sum_blob(&manifest, &hash);
121 zManFile = mprintf("%s%s", g.zLocalRoot,db_manifestUuidName());
122 blob_append(&hash, "\n", 1);
123 blob_write_to_file(&hash, zManFile);
124 free(zManFile);
125 blob_reset(&hash);
126 manifest_parse(&m, &manifest);
127 blob_zero(&filename);
128 blob_appendf(&filename, "%s/", g.zLocalRoot);
129 baseLen = blob_size(&filename);
130 for(i=0; i<m.nFile; i++){
@@ -132,13 +131,34 @@
132 blob_append(&filename, m.aFile[i].zName, -1);
133 isExe = m.aFile[i].zPerm && strstr(m.aFile[i].zPerm, "x");
134 file_setexe(blob_str(&filename), isExe);
135 set_or_clear_isexe(m.aFile[i].zName, vid, isExe);
136 blob_resize(&filename, baseLen);
 
 
 
 
137 }
138 blob_reset(&filename);
139 manifest_clear(&m);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140 }
141
142 /*
143 ** COMMAND: checkout
144 ** COMMAND: co
145
--- src/checkout.c
+++ src/checkout.c
@@ -97,34 +97,33 @@
97 db_multi_exec("UPDATE vfile SET isexe=%d WHERE vid=%d and pathname=%Q",
98 onoff, vid, zFilename);
99 }
100
101 /*
102 ** Set or clear the execute permission bit (as appropriate) for all
103 ** files in the current check-out.
104 **
105 ** If the checkout does not have explicit files named "manifest" and
106 ** "manifest.uuid" then automatically generate files with those names
107 ** containing, respectively, the text of the manifest and the artifact
108 ** ID of the manifest.
109 */
110 void manifest_to_disk(int vid){
111 char *zManFile;
112 Blob manifest;
113 Blob hash;
114 Blob filename;
115 int baseLen;
116 int i;
117 int seenManifest = 0;
118 int seenManifestUuid = 0;
119 Manifest m;
120
121 /* Check the EXE permission status of all files
122 */
123 blob_zero(&manifest);
 
124 content_get(vid, &manifest);
 
 
 
 
 
 
 
 
 
125 manifest_parse(&m, &manifest);
126 blob_zero(&filename);
127 blob_appendf(&filename, "%s/", g.zLocalRoot);
128 baseLen = blob_size(&filename);
129 for(i=0; i<m.nFile; i++){
@@ -132,13 +131,34 @@
131 blob_append(&filename, m.aFile[i].zName, -1);
132 isExe = m.aFile[i].zPerm && strstr(m.aFile[i].zPerm, "x");
133 file_setexe(blob_str(&filename), isExe);
134 set_or_clear_isexe(m.aFile[i].zName, vid, isExe);
135 blob_resize(&filename, baseLen);
136 if( memcmp(m.aFile[i].zName, "manifest", 8)==0 ){
137 if( m.aFile[i].zName[8]==0 ) seenManifest = 1;
138 if( strcmp(&m.aFile[i].zName[8], ".uuid")==0 ) seenManifestUuid = 1;
139 }
140 }
141 blob_reset(&filename);
142 manifest_clear(&m);
143
144 blob_zero(&manifest);
145 content_get(vid, &manifest);
146 if( !seenManifest ){
147 zManFile = mprintf("%smanifest", g.zLocalRoot);
148 blob_write_to_file(&manifest, zManFile);
149 free(zManFile);
150 }
151 if( !seenManifestUuid ){
152 blob_zero(&hash);
153 sha1sum_blob(&manifest, &hash);
154 zManFile = mprintf("%smanifest.uuid", g.zLocalRoot);
155 blob_append(&hash, "\n", 1);
156 blob_write_to_file(&hash, zManFile);
157 free(zManFile);
158 blob_reset(&hash);
159 }
160 }
161
162 /*
163 ** COMMAND: checkout
164 ** COMMAND: co
165
-48
--- src/db.c
+++ src/db.c
@@ -49,52 +49,10 @@
4949
Stmt *pNext, *pPrev; /* List of all unfinalized statements */
5050
int nStep; /* Number of sqlite3_step() calls */
5151
};
5252
#endif /* INTERFACE */
5353
54
-/*
55
-** Get the configured name for the manifest file
56
-*/
57
-const char* db_manifestName(void){
58
- static char zManifestFNDefault[] = "manifest";
59
-
60
- if (!g.zManifestFN){
61
- char *zManifestFNPara;
62
-
63
- zManifestFNPara = db_get("manifest",zManifestFNDefault);
64
- if (!zManifestFNPara || !*zManifestFNPara){
65
- zManifestFNPara = zManifestFNDefault;
66
- }
67
- g.zManifestFN = mprintf("%s",db_get("manifest",zManifestFNPara));
68
- }
69
- return (g.zManifestFN);
70
-}
71
-
72
-/*
73
-** Get the configured name for the manifest.uuid file
74
-*/
75
-const char* db_manifestUuidName(void){
76
- if (!g.zManifestUuidFN){
77
- g.zManifestUuidFN = mprintf("%s.uuid",db_manifestName());
78
- }
79
- return (g.zManifestUuidFN);
80
-}
81
-
82
-/*
83
-** clear manifest filename caches
84
-*/
85
-void db_FreeManifestNames(void){
86
- if (g.zManifestFN){
87
- free(g.zManifestFN);
88
- g.zManifestFN = 0;
89
- }
90
- if (g.zManifestUuidFN){
91
- free(g.zManifestUuidFN);
92
- g.zManifestUuidFN = 0;
93
- }
94
-}
95
-
9654
/*
9755
** Call this routine when a database error occurs.
9856
*/
9957
static void db_err(const char *zFormat, ...){
10058
va_list ap;
@@ -825,12 +783,10 @@
825783
while( n>1 && zPwd[n-1]=='/' ){
826784
n--;
827785
zPwd[n] = 0;
828786
}
829787
g.zLocalRoot = mprintf("%s/", zPwd);
830
- g.zManifestFN = 0;
831
- g.zManifestUuidFN = 0;
832788
return 1;
833789
}
834790
}
835791
n--;
836792
while( n>0 && zPwd[n]!='/' ){ n--; }
@@ -1566,11 +1522,10 @@
15661522
{ "editor", 0, 16, "" },
15671523
{ "gdiff-command", 0, 16, "gdiff" },
15681524
{ "ignore-glob", 0, 40, "" },
15691525
{ "http-port", 0, 16, "8080" },
15701526
{ "localauth", 0, 0, "0" },
1571
- { "manifest", 0, 32, "" },
15721527
{ "mtime-changes", 0, 0, "0" },
15731528
{ "pgp-command", 0, 32, "gpg --clearsign -o " },
15741529
{ "proxy", 0, 32, "off" },
15751530
{ "ssh-command", 0, 32, "" },
15761531
{ "web-browser", 0, 32, "" },
@@ -1630,12 +1585,10 @@
16301585
** localauth If enabled, require that HTTP connections from
16311586
** 127.0.0.1 be authenticated by password. If
16321587
** false, all HTTP requests from localhost have
16331588
** unrestricted access to the repository.
16341589
**
1635
-** manifest name of manifest file, standard is manifest
1636
-**
16371590
** mtime-changes Use file modification times (mtimes) to detect when
16381591
** files have been modified. (Default "on".)
16391592
**
16401593
** pgp-command Command used to clear-sign manifests at check-in.
16411594
** The default is "gpg --clearsign -o ".
@@ -1686,7 +1639,6 @@
16861639
print_setting(ctrlSettings[i].name);
16871640
}
16881641
}else{
16891642
usage("?PROPERTY? ?VALUE?");
16901643
}
1691
- db_FreeManifestNames();
16921644
}
16931645
--- src/db.c
+++ src/db.c
@@ -49,52 +49,10 @@
49 Stmt *pNext, *pPrev; /* List of all unfinalized statements */
50 int nStep; /* Number of sqlite3_step() calls */
51 };
52 #endif /* INTERFACE */
53
54 /*
55 ** Get the configured name for the manifest file
56 */
57 const char* db_manifestName(void){
58 static char zManifestFNDefault[] = "manifest";
59
60 if (!g.zManifestFN){
61 char *zManifestFNPara;
62
63 zManifestFNPara = db_get("manifest",zManifestFNDefault);
64 if (!zManifestFNPara || !*zManifestFNPara){
65 zManifestFNPara = zManifestFNDefault;
66 }
67 g.zManifestFN = mprintf("%s",db_get("manifest",zManifestFNPara));
68 }
69 return (g.zManifestFN);
70 }
71
72 /*
73 ** Get the configured name for the manifest.uuid file
74 */
75 const char* db_manifestUuidName(void){
76 if (!g.zManifestUuidFN){
77 g.zManifestUuidFN = mprintf("%s.uuid",db_manifestName());
78 }
79 return (g.zManifestUuidFN);
80 }
81
82 /*
83 ** clear manifest filename caches
84 */
85 void db_FreeManifestNames(void){
86 if (g.zManifestFN){
87 free(g.zManifestFN);
88 g.zManifestFN = 0;
89 }
90 if (g.zManifestUuidFN){
91 free(g.zManifestUuidFN);
92 g.zManifestUuidFN = 0;
93 }
94 }
95
96 /*
97 ** Call this routine when a database error occurs.
98 */
99 static void db_err(const char *zFormat, ...){
100 va_list ap;
@@ -825,12 +783,10 @@
825 while( n>1 && zPwd[n-1]=='/' ){
826 n--;
827 zPwd[n] = 0;
828 }
829 g.zLocalRoot = mprintf("%s/", zPwd);
830 g.zManifestFN = 0;
831 g.zManifestUuidFN = 0;
832 return 1;
833 }
834 }
835 n--;
836 while( n>0 && zPwd[n]!='/' ){ n--; }
@@ -1566,11 +1522,10 @@
1566 { "editor", 0, 16, "" },
1567 { "gdiff-command", 0, 16, "gdiff" },
1568 { "ignore-glob", 0, 40, "" },
1569 { "http-port", 0, 16, "8080" },
1570 { "localauth", 0, 0, "0" },
1571 { "manifest", 0, 32, "" },
1572 { "mtime-changes", 0, 0, "0" },
1573 { "pgp-command", 0, 32, "gpg --clearsign -o " },
1574 { "proxy", 0, 32, "off" },
1575 { "ssh-command", 0, 32, "" },
1576 { "web-browser", 0, 32, "" },
@@ -1630,12 +1585,10 @@
1630 ** localauth If enabled, require that HTTP connections from
1631 ** 127.0.0.1 be authenticated by password. If
1632 ** false, all HTTP requests from localhost have
1633 ** unrestricted access to the repository.
1634 **
1635 ** manifest name of manifest file, standard is manifest
1636 **
1637 ** mtime-changes Use file modification times (mtimes) to detect when
1638 ** files have been modified. (Default "on".)
1639 **
1640 ** pgp-command Command used to clear-sign manifests at check-in.
1641 ** The default is "gpg --clearsign -o ".
@@ -1686,7 +1639,6 @@
1686 print_setting(ctrlSettings[i].name);
1687 }
1688 }else{
1689 usage("?PROPERTY? ?VALUE?");
1690 }
1691 db_FreeManifestNames();
1692 }
1693
--- src/db.c
+++ src/db.c
@@ -49,52 +49,10 @@
49 Stmt *pNext, *pPrev; /* List of all unfinalized statements */
50 int nStep; /* Number of sqlite3_step() calls */
51 };
52 #endif /* INTERFACE */
53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54 /*
55 ** Call this routine when a database error occurs.
56 */
57 static void db_err(const char *zFormat, ...){
58 va_list ap;
@@ -825,12 +783,10 @@
783 while( n>1 && zPwd[n-1]=='/' ){
784 n--;
785 zPwd[n] = 0;
786 }
787 g.zLocalRoot = mprintf("%s/", zPwd);
 
 
788 return 1;
789 }
790 }
791 n--;
792 while( n>0 && zPwd[n]!='/' ){ n--; }
@@ -1566,11 +1522,10 @@
1522 { "editor", 0, 16, "" },
1523 { "gdiff-command", 0, 16, "gdiff" },
1524 { "ignore-glob", 0, 40, "" },
1525 { "http-port", 0, 16, "8080" },
1526 { "localauth", 0, 0, "0" },
 
1527 { "mtime-changes", 0, 0, "0" },
1528 { "pgp-command", 0, 32, "gpg --clearsign -o " },
1529 { "proxy", 0, 32, "off" },
1530 { "ssh-command", 0, 32, "" },
1531 { "web-browser", 0, 32, "" },
@@ -1630,12 +1585,10 @@
1585 ** localauth If enabled, require that HTTP connections from
1586 ** 127.0.0.1 be authenticated by password. If
1587 ** false, all HTTP requests from localhost have
1588 ** unrestricted access to the repository.
1589 **
 
 
1590 ** mtime-changes Use file modification times (mtimes) to detect when
1591 ** files have been modified. (Default "on".)
1592 **
1593 ** pgp-command Command used to clear-sign manifests at check-in.
1594 ** The default is "gpg --clearsign -o ".
@@ -1686,7 +1639,6 @@
1639 print_setting(ctrlSettings[i].name);
1640 }
1641 }else{
1642 usage("?PROPERTY? ?VALUE?");
1643 }
 
1644 }
1645
-2
--- src/main.c
+++ src/main.c
@@ -59,12 +59,10 @@
5959
char *zRepositoryName; /* Name of the repository database */
6060
char *zRepoDb; /* SQLite database name for the repository */
6161
const char *zHome; /* Name of user home directory */
6262
int localOpen; /* True if the local database is open */
6363
char *zLocalRoot; /* The directory holding the local database */
64
- char *zManifestFN; /* The name of the manifest file in checkouts */
65
- char *zManifestUuidFN; /* The name of the manifest.uuid file in checkouts */
6664
int minPrefix; /* Number of digits needed for a distinct UUID */
6765
int fSqlTrace; /* True if -sqltrace flag is present */
6866
int fSqlPrint; /* True if -sqlprint flag is present */
6967
int fQuiet; /* True if -quiet flag is present */
7068
int fHttpTrace; /* Trace outbound HTTP requests */
7169
--- src/main.c
+++ src/main.c
@@ -59,12 +59,10 @@
59 char *zRepositoryName; /* Name of the repository database */
60 char *zRepoDb; /* SQLite database name for the repository */
61 const char *zHome; /* Name of user home directory */
62 int localOpen; /* True if the local database is open */
63 char *zLocalRoot; /* The directory holding the local database */
64 char *zManifestFN; /* The name of the manifest file in checkouts */
65 char *zManifestUuidFN; /* The name of the manifest.uuid file in checkouts */
66 int minPrefix; /* Number of digits needed for a distinct UUID */
67 int fSqlTrace; /* True if -sqltrace flag is present */
68 int fSqlPrint; /* True if -sqlprint flag is present */
69 int fQuiet; /* True if -quiet flag is present */
70 int fHttpTrace; /* Trace outbound HTTP requests */
71
--- src/main.c
+++ src/main.c
@@ -59,12 +59,10 @@
59 char *zRepositoryName; /* Name of the repository database */
60 char *zRepoDb; /* SQLite database name for the repository */
61 const char *zHome; /* Name of user home directory */
62 int localOpen; /* True if the local database is open */
63 char *zLocalRoot; /* The directory holding the local database */
 
 
64 int minPrefix; /* Number of digits needed for a distinct UUID */
65 int fSqlTrace; /* True if -sqltrace flag is present */
66 int fSqlPrint; /* True if -sqlprint flag is present */
67 int fQuiet; /* True if -quiet flag is present */
68 int fHttpTrace; /* Trace outbound HTTP requests */
69
-2
--- src/main.c
+++ src/main.c
@@ -59,12 +59,10 @@
5959
char *zRepositoryName; /* Name of the repository database */
6060
char *zRepoDb; /* SQLite database name for the repository */
6161
const char *zHome; /* Name of user home directory */
6262
int localOpen; /* True if the local database is open */
6363
char *zLocalRoot; /* The directory holding the local database */
64
- char *zManifestFN; /* The name of the manifest file in checkouts */
65
- char *zManifestUuidFN; /* The name of the manifest.uuid file in checkouts */
6664
int minPrefix; /* Number of digits needed for a distinct UUID */
6765
int fSqlTrace; /* True if -sqltrace flag is present */
6866
int fSqlPrint; /* True if -sqlprint flag is present */
6967
int fQuiet; /* True if -quiet flag is present */
7068
int fHttpTrace; /* Trace outbound HTTP requests */
7169
--- src/main.c
+++ src/main.c
@@ -59,12 +59,10 @@
59 char *zRepositoryName; /* Name of the repository database */
60 char *zRepoDb; /* SQLite database name for the repository */
61 const char *zHome; /* Name of user home directory */
62 int localOpen; /* True if the local database is open */
63 char *zLocalRoot; /* The directory holding the local database */
64 char *zManifestFN; /* The name of the manifest file in checkouts */
65 char *zManifestUuidFN; /* The name of the manifest.uuid file in checkouts */
66 int minPrefix; /* Number of digits needed for a distinct UUID */
67 int fSqlTrace; /* True if -sqltrace flag is present */
68 int fSqlPrint; /* True if -sqlprint flag is present */
69 int fQuiet; /* True if -quiet flag is present */
70 int fHttpTrace; /* Trace outbound HTTP requests */
71
--- src/main.c
+++ src/main.c
@@ -59,12 +59,10 @@
59 char *zRepositoryName; /* Name of the repository database */
60 char *zRepoDb; /* SQLite database name for the repository */
61 const char *zHome; /* Name of user home directory */
62 int localOpen; /* True if the local database is open */
63 char *zLocalRoot; /* The directory holding the local database */
 
 
64 int minPrefix; /* Number of digits needed for a distinct UUID */
65 int fSqlTrace; /* True if -sqltrace flag is present */
66 int fSqlPrint; /* True if -sqlprint flag is present */
67 int fQuiet; /* True if -quiet flag is present */
68 int fHttpTrace; /* Trace outbound HTTP requests */
69
--- src/setup.c
+++ src/setup.c
@@ -866,11 +866,10 @@
866866
if( !g.okSetup ){
867867
login_needed();
868868
}
869869
870870
style_header("Settings");
871
- db_FreeManifestNames();
872871
db_begin_transaction();
873872
@ <p>This page provides a simple interface to the "fossil setting" command.
874873
@ See the "fossil help setting" output below for further information on
875874
@ the meaning of each setting.</p><hr />
876875
@ <form action="%s(g.zBaseURL)/setup_settings" method="post"><div>
877876
--- src/setup.c
+++ src/setup.c
@@ -866,11 +866,10 @@
866 if( !g.okSetup ){
867 login_needed();
868 }
869
870 style_header("Settings");
871 db_FreeManifestNames();
872 db_begin_transaction();
873 @ <p>This page provides a simple interface to the "fossil setting" command.
874 @ See the "fossil help setting" output below for further information on
875 @ the meaning of each setting.</p><hr />
876 @ <form action="%s(g.zBaseURL)/setup_settings" method="post"><div>
877
--- src/setup.c
+++ src/setup.c
@@ -866,11 +866,10 @@
866 if( !g.okSetup ){
867 login_needed();
868 }
869
870 style_header("Settings");
 
871 db_begin_transaction();
872 @ <p>This page provides a simple interface to the "fossil setting" command.
873 @ See the "fossil help setting" output below for further information on
874 @ the meaning of each setting.</p><hr />
875 @ <form action="%s(g.zBaseURL)/setup_settings" method="post"><div>
876
--- src/setup.c
+++ src/setup.c
@@ -866,11 +866,10 @@
866866
if( !g.okSetup ){
867867
login_needed();
868868
}
869869
870870
style_header("Settings");
871
- db_FreeManifestNames();
872871
db_begin_transaction();
873872
@ <p>This page provides a simple interface to the "fossil setting" command.
874873
@ See the "fossil help setting" output below for further information on
875874
@ the meaning of each setting.</p><hr />
876875
@ <form action="%s(g.zBaseURL)/setup_settings" method="post"><div>
877876
--- src/setup.c
+++ src/setup.c
@@ -866,11 +866,10 @@
866 if( !g.okSetup ){
867 login_needed();
868 }
869
870 style_header("Settings");
871 db_FreeManifestNames();
872 db_begin_transaction();
873 @ <p>This page provides a simple interface to the "fossil setting" command.
874 @ See the "fossil help setting" output below for further information on
875 @ the meaning of each setting.</p><hr />
876 @ <form action="%s(g.zBaseURL)/setup_settings" method="post"><div>
877
--- src/setup.c
+++ src/setup.c
@@ -866,11 +866,10 @@
866 if( !g.okSetup ){
867 login_needed();
868 }
869
870 style_header("Settings");
 
871 db_begin_transaction();
872 @ <p>This page provides a simple interface to the "fossil setting" command.
873 @ See the "fossil help setting" output below for further information on
874 @ the meaning of each setting.</p><hr />
875 @ <form action="%s(g.zBaseURL)/setup_settings" method="post"><div>
876
+2 -2
--- src/zip.c
+++ src/zip.c
@@ -338,19 +338,19 @@
338338
nPrefix = blob_size(&filename);
339339
340340
if( manifest_parse(&m, &mfile) ){
341341
char *zName;
342342
zip_set_timedate(m.rDate);
343
- blob_append(&filename, db_manifestName(), -1);
343
+ blob_append(&filename, "manifest", -1);
344344
zName = blob_str(&filename);
345345
zip_add_folders(zName);
346346
zip_add_file(zName, &file);
347347
sha1sum_blob(&file, &hash);
348348
blob_reset(&file);
349349
blob_append(&hash, "\n", 1);
350350
blob_resize(&filename, nPrefix);
351
- blob_append(&filename, db_manifestUuidName(), -1);
351
+ blob_append(&filename, "manifest.uuid", -1);
352352
zName = blob_str(&filename);
353353
zip_add_file(zName, &hash);
354354
blob_reset(&hash);
355355
for(i=0; i<m.nFile; i++){
356356
int fid = uuid_to_rid(m.aFile[i].zUuid, 0);
357357
--- src/zip.c
+++ src/zip.c
@@ -338,19 +338,19 @@
338 nPrefix = blob_size(&filename);
339
340 if( manifest_parse(&m, &mfile) ){
341 char *zName;
342 zip_set_timedate(m.rDate);
343 blob_append(&filename, db_manifestName(), -1);
344 zName = blob_str(&filename);
345 zip_add_folders(zName);
346 zip_add_file(zName, &file);
347 sha1sum_blob(&file, &hash);
348 blob_reset(&file);
349 blob_append(&hash, "\n", 1);
350 blob_resize(&filename, nPrefix);
351 blob_append(&filename, db_manifestUuidName(), -1);
352 zName = blob_str(&filename);
353 zip_add_file(zName, &hash);
354 blob_reset(&hash);
355 for(i=0; i<m.nFile; i++){
356 int fid = uuid_to_rid(m.aFile[i].zUuid, 0);
357
--- src/zip.c
+++ src/zip.c
@@ -338,19 +338,19 @@
338 nPrefix = blob_size(&filename);
339
340 if( manifest_parse(&m, &mfile) ){
341 char *zName;
342 zip_set_timedate(m.rDate);
343 blob_append(&filename, "manifest", -1);
344 zName = blob_str(&filename);
345 zip_add_folders(zName);
346 zip_add_file(zName, &file);
347 sha1sum_blob(&file, &hash);
348 blob_reset(&file);
349 blob_append(&hash, "\n", 1);
350 blob_resize(&filename, nPrefix);
351 blob_append(&filename, "manifest.uuid", -1);
352 zName = blob_str(&filename);
353 zip_add_file(zName, &hash);
354 blob_reset(&hash);
355 for(i=0; i<m.nFile; i++){
356 int fid = uuid_to_rid(m.aFile[i].zUuid, 0);
357

Keyboard Shortcuts

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