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].
Commit
4208b3b47915c33039680f28d65156d211954c72
Parent
e01f7e6db20270f…
12 files changed
+1
-3
+1
-3
+28
-11
+28
-11
+32
-12
+32
-12
-48
-2
-2
-1
-1
+2
-2
+1
-3
| --- src/add.c | ||
| +++ src/add.c | ||
| @@ -36,20 +36,18 @@ | ||
| 36 | 36 | Blob pathname; |
| 37 | 37 | const char *zPath; |
| 38 | 38 | |
| 39 | 39 | file_tree_name(zName, &pathname, 1); |
| 40 | 40 | zPath = blob_str(&pathname); |
| 41 | - if( strcmp(zPath, db_manifestName())==0 | |
| 42 | - || strcmp(zPath, "_FOSSIL_")==0 | |
| 41 | + if( strcmp(zPath, "_FOSSIL_")==0 | |
| 43 | 42 | || strcmp(zPath, "_FOSSIL_-journal")==0 |
| 44 | 43 | || strcmp(zPath, "_FOSSIL_-wal")==0 |
| 45 | 44 | || strcmp(zPath, "_FOSSIL_-shm")==0 |
| 46 | 45 | || strcmp(zPath, ".fos")==0 |
| 47 | 46 | || strcmp(zPath, ".fos-journal")==0 |
| 48 | 47 | || strcmp(zPath, ".fos-wal")==0 |
| 49 | 48 | || strcmp(zPath, ".fos-shm")==0 |
| 50 | - || strcmp(zPath, db_manifestUuidName())==0 | |
| 51 | 49 | || blob_compare(&pathname, pOmit)==0 |
| 52 | 50 | ){ |
| 53 | 51 | fossil_warning("cannot add %s", zPath); |
| 54 | 52 | }else{ |
| 55 | 53 | if( !file_is_simple_pathname(zPath) ){ |
| 56 | 54 |
| --- 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 @@ | ||
| 36 | 36 | Blob pathname; |
| 37 | 37 | const char *zPath; |
| 38 | 38 | |
| 39 | 39 | file_tree_name(zName, &pathname, 1); |
| 40 | 40 | zPath = blob_str(&pathname); |
| 41 | - if( strcmp(zPath, db_manifestName())==0 | |
| 42 | - || strcmp(zPath, "_FOSSIL_")==0 | |
| 41 | + if( strcmp(zPath, "_FOSSIL_")==0 | |
| 43 | 42 | || strcmp(zPath, "_FOSSIL_-journal")==0 |
| 44 | 43 | || strcmp(zPath, "_FOSSIL_-wal")==0 |
| 45 | 44 | || strcmp(zPath, "_FOSSIL_-shm")==0 |
| 46 | 45 | || strcmp(zPath, ".fos")==0 |
| 47 | 46 | || strcmp(zPath, ".fos-journal")==0 |
| 48 | 47 | || strcmp(zPath, ".fos-wal")==0 |
| 49 | 48 | || strcmp(zPath, ".fos-shm")==0 |
| 50 | - || strcmp(zPath, db_manifestUuidName())==0 | |
| 51 | 49 | || blob_compare(&pathname, pOmit)==0 |
| 52 | 50 | ){ |
| 53 | 51 | fossil_warning("cannot add %s", zPath); |
| 54 | 52 | }else{ |
| 55 | 53 | if( !file_is_simple_pathname(zPath) ){ |
| 56 | 54 |
| --- 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 @@ | ||
| 535 | 535 | assert( strlen(zDate)==19 ); |
| 536 | 536 | assert( zDate[10]==' ' ); |
| 537 | 537 | zDate[10] = 'T'; |
| 538 | 538 | return zDate; |
| 539 | 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 | +} | |
| 540 | 553 | |
| 541 | 554 | /* |
| 542 | 555 | ** COMMAND: ci |
| 543 | 556 | ** COMMAND: commit |
| 544 | 557 | ** |
| @@ -844,38 +857,42 @@ | ||
| 844 | 857 | db_finalize(&q); |
| 845 | 858 | } |
| 846 | 859 | blob_appendf(&manifest, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin); |
| 847 | 860 | md5sum_blob(&manifest, &mcksum); |
| 848 | 861 | blob_appendf(&manifest, "Z %b\n", &mcksum); |
| 849 | - zManifestFile = mprintf("%s%s", g.zLocalRoot, db_manifestName()); | |
| 850 | 862 | if( !noSign && !g.markPrivate && clearsign(&manifest, &manifest) ){ |
| 851 | 863 | Blob ans; |
| 852 | 864 | blob_zero(&ans); |
| 853 | 865 | prompt_user("unable to sign manifest. continue (y/N)? ", &ans); |
| 854 | 866 | if( blob_str(&ans)[0]!='y' ){ |
| 855 | 867 | fossil_exit(1); |
| 856 | 868 | } |
| 857 | 869 | } |
| 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 | + } | |
| 862 | 877 | nvid = content_put(&manifest, 0, 0); |
| 863 | 878 | if( nvid==0 ){ |
| 864 | 879 | fossil_panic("trouble committing manifest: %s", g.zErrMsg); |
| 865 | 880 | } |
| 866 | 881 | db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid); |
| 867 | 882 | manifest_crosslink(nvid, &manifest); |
| 868 | 883 | content_deltify(vid, nvid, 0); |
| 869 | 884 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid); |
| 870 | 885 | 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 | + } | |
| 877 | 894 | |
| 878 | 895 | |
| 879 | 896 | /* Update the vfile and vmerge tables */ |
| 880 | 897 | db_multi_exec( |
| 881 | 898 | "DELETE FROM vfile WHERE (vid!=%d OR deleted) AND file_is_selected(id);" |
| 882 | 899 |
| --- 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 @@ | ||
| 535 | 535 | assert( strlen(zDate)==19 ); |
| 536 | 536 | assert( zDate[10]==' ' ); |
| 537 | 537 | zDate[10] = 'T'; |
| 538 | 538 | return zDate; |
| 539 | 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 | +} | |
| 540 | 553 | |
| 541 | 554 | /* |
| 542 | 555 | ** COMMAND: ci |
| 543 | 556 | ** COMMAND: commit |
| 544 | 557 | ** |
| @@ -844,38 +857,42 @@ | ||
| 844 | 857 | db_finalize(&q); |
| 845 | 858 | } |
| 846 | 859 | blob_appendf(&manifest, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin); |
| 847 | 860 | md5sum_blob(&manifest, &mcksum); |
| 848 | 861 | blob_appendf(&manifest, "Z %b\n", &mcksum); |
| 849 | - zManifestFile = mprintf("%s%s", g.zLocalRoot, db_manifestName()); | |
| 850 | 862 | if( !noSign && !g.markPrivate && clearsign(&manifest, &manifest) ){ |
| 851 | 863 | Blob ans; |
| 852 | 864 | blob_zero(&ans); |
| 853 | 865 | prompt_user("unable to sign manifest. continue (y/N)? ", &ans); |
| 854 | 866 | if( blob_str(&ans)[0]!='y' ){ |
| 855 | 867 | fossil_exit(1); |
| 856 | 868 | } |
| 857 | 869 | } |
| 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 | + } | |
| 862 | 877 | nvid = content_put(&manifest, 0, 0); |
| 863 | 878 | if( nvid==0 ){ |
| 864 | 879 | fossil_panic("trouble committing manifest: %s", g.zErrMsg); |
| 865 | 880 | } |
| 866 | 881 | db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid); |
| 867 | 882 | manifest_crosslink(nvid, &manifest); |
| 868 | 883 | content_deltify(vid, nvid, 0); |
| 869 | 884 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid); |
| 870 | 885 | 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 | + } | |
| 877 | 894 | |
| 878 | 895 | |
| 879 | 896 | /* Update the vfile and vmerge tables */ |
| 880 | 897 | db_multi_exec( |
| 881 | 898 | "DELETE FROM vfile WHERE (vid!=%d OR deleted) AND file_is_selected(id);" |
| 882 | 899 |
| --- 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 @@ | ||
| 97 | 97 | db_multi_exec("UPDATE vfile SET isexe=%d WHERE vid=%d and pathname=%Q", |
| 98 | 98 | onoff, vid, zFilename); |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 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. | |
| 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. | |
| 104 | 109 | */ |
| 105 | 110 | void manifest_to_disk(int vid){ |
| 106 | 111 | char *zManFile; |
| 107 | 112 | Blob manifest; |
| 108 | 113 | Blob hash; |
| 109 | 114 | Blob filename; |
| 110 | 115 | int baseLen; |
| 111 | 116 | int i; |
| 117 | + int seenManifest = 0; | |
| 118 | + int seenManifestUuid = 0; | |
| 112 | 119 | Manifest m; |
| 113 | 120 | |
| 121 | + /* Check the EXE permission status of all files | |
| 122 | + */ | |
| 114 | 123 | blob_zero(&manifest); |
| 115 | - zManFile = mprintf("%s%s", g.zLocalRoot, db_manifestName()); | |
| 116 | 124 | 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 | 125 | manifest_parse(&m, &manifest); |
| 127 | 126 | blob_zero(&filename); |
| 128 | 127 | blob_appendf(&filename, "%s/", g.zLocalRoot); |
| 129 | 128 | baseLen = blob_size(&filename); |
| 130 | 129 | for(i=0; i<m.nFile; i++){ |
| @@ -132,13 +131,34 @@ | ||
| 132 | 131 | blob_append(&filename, m.aFile[i].zName, -1); |
| 133 | 132 | isExe = m.aFile[i].zPerm && strstr(m.aFile[i].zPerm, "x"); |
| 134 | 133 | file_setexe(blob_str(&filename), isExe); |
| 135 | 134 | set_or_clear_isexe(m.aFile[i].zName, vid, isExe); |
| 136 | 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 | + } | |
| 137 | 140 | } |
| 138 | 141 | blob_reset(&filename); |
| 139 | 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 | + } | |
| 140 | 160 | } |
| 141 | 161 | |
| 142 | 162 | /* |
| 143 | 163 | ** COMMAND: checkout |
| 144 | 164 | ** COMMAND: co |
| 145 | 165 |
| --- 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 @@ | ||
| 97 | 97 | db_multi_exec("UPDATE vfile SET isexe=%d WHERE vid=%d and pathname=%Q", |
| 98 | 98 | onoff, vid, zFilename); |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 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. | |
| 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. | |
| 104 | 109 | */ |
| 105 | 110 | void manifest_to_disk(int vid){ |
| 106 | 111 | char *zManFile; |
| 107 | 112 | Blob manifest; |
| 108 | 113 | Blob hash; |
| 109 | 114 | Blob filename; |
| 110 | 115 | int baseLen; |
| 111 | 116 | int i; |
| 117 | + int seenManifest = 0; | |
| 118 | + int seenManifestUuid = 0; | |
| 112 | 119 | Manifest m; |
| 113 | 120 | |
| 121 | + /* Check the EXE permission status of all files | |
| 122 | + */ | |
| 114 | 123 | blob_zero(&manifest); |
| 115 | - zManFile = mprintf("%s%s", g.zLocalRoot, db_manifestName()); | |
| 116 | 124 | 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 | 125 | manifest_parse(&m, &manifest); |
| 127 | 126 | blob_zero(&filename); |
| 128 | 127 | blob_appendf(&filename, "%s/", g.zLocalRoot); |
| 129 | 128 | baseLen = blob_size(&filename); |
| 130 | 129 | for(i=0; i<m.nFile; i++){ |
| @@ -132,13 +131,34 @@ | ||
| 132 | 131 | blob_append(&filename, m.aFile[i].zName, -1); |
| 133 | 132 | isExe = m.aFile[i].zPerm && strstr(m.aFile[i].zPerm, "x"); |
| 134 | 133 | file_setexe(blob_str(&filename), isExe); |
| 135 | 134 | set_or_clear_isexe(m.aFile[i].zName, vid, isExe); |
| 136 | 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 | + } | |
| 137 | 140 | } |
| 138 | 141 | blob_reset(&filename); |
| 139 | 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 | + } | |
| 140 | 160 | } |
| 141 | 161 | |
| 142 | 162 | /* |
| 143 | 163 | ** COMMAND: checkout |
| 144 | 164 | ** COMMAND: co |
| 145 | 165 |
| --- 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 |
M
src/db.c
-48
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -49,52 +49,10 @@ | ||
| 49 | 49 | Stmt *pNext, *pPrev; /* List of all unfinalized statements */ |
| 50 | 50 | int nStep; /* Number of sqlite3_step() calls */ |
| 51 | 51 | }; |
| 52 | 52 | #endif /* INTERFACE */ |
| 53 | 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 | 54 | /* |
| 97 | 55 | ** Call this routine when a database error occurs. |
| 98 | 56 | */ |
| 99 | 57 | static void db_err(const char *zFormat, ...){ |
| 100 | 58 | va_list ap; |
| @@ -825,12 +783,10 @@ | ||
| 825 | 783 | while( n>1 && zPwd[n-1]=='/' ){ |
| 826 | 784 | n--; |
| 827 | 785 | zPwd[n] = 0; |
| 828 | 786 | } |
| 829 | 787 | g.zLocalRoot = mprintf("%s/", zPwd); |
| 830 | - g.zManifestFN = 0; | |
| 831 | - g.zManifestUuidFN = 0; | |
| 832 | 788 | return 1; |
| 833 | 789 | } |
| 834 | 790 | } |
| 835 | 791 | n--; |
| 836 | 792 | while( n>0 && zPwd[n]!='/' ){ n--; } |
| @@ -1566,11 +1522,10 @@ | ||
| 1566 | 1522 | { "editor", 0, 16, "" }, |
| 1567 | 1523 | { "gdiff-command", 0, 16, "gdiff" }, |
| 1568 | 1524 | { "ignore-glob", 0, 40, "" }, |
| 1569 | 1525 | { "http-port", 0, 16, "8080" }, |
| 1570 | 1526 | { "localauth", 0, 0, "0" }, |
| 1571 | - { "manifest", 0, 32, "" }, | |
| 1572 | 1527 | { "mtime-changes", 0, 0, "0" }, |
| 1573 | 1528 | { "pgp-command", 0, 32, "gpg --clearsign -o " }, |
| 1574 | 1529 | { "proxy", 0, 32, "off" }, |
| 1575 | 1530 | { "ssh-command", 0, 32, "" }, |
| 1576 | 1531 | { "web-browser", 0, 32, "" }, |
| @@ -1630,12 +1585,10 @@ | ||
| 1630 | 1585 | ** localauth If enabled, require that HTTP connections from |
| 1631 | 1586 | ** 127.0.0.1 be authenticated by password. If |
| 1632 | 1587 | ** false, all HTTP requests from localhost have |
| 1633 | 1588 | ** unrestricted access to the repository. |
| 1634 | 1589 | ** |
| 1635 | -** manifest name of manifest file, standard is manifest | |
| 1636 | -** | |
| 1637 | 1590 | ** mtime-changes Use file modification times (mtimes) to detect when |
| 1638 | 1591 | ** files have been modified. (Default "on".) |
| 1639 | 1592 | ** |
| 1640 | 1593 | ** pgp-command Command used to clear-sign manifests at check-in. |
| 1641 | 1594 | ** The default is "gpg --clearsign -o ". |
| @@ -1686,7 +1639,6 @@ | ||
| 1686 | 1639 | print_setting(ctrlSettings[i].name); |
| 1687 | 1640 | } |
| 1688 | 1641 | }else{ |
| 1689 | 1642 | usage("?PROPERTY? ?VALUE?"); |
| 1690 | 1643 | } |
| 1691 | - db_FreeManifestNames(); | |
| 1692 | 1644 | } |
| 1693 | 1645 |
| --- 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 @@ | ||
| 59 | 59 | char *zRepositoryName; /* Name of the repository database */ |
| 60 | 60 | char *zRepoDb; /* SQLite database name for the repository */ |
| 61 | 61 | const char *zHome; /* Name of user home directory */ |
| 62 | 62 | int localOpen; /* True if the local database is open */ |
| 63 | 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 | 64 | int minPrefix; /* Number of digits needed for a distinct UUID */ |
| 67 | 65 | int fSqlTrace; /* True if -sqltrace flag is present */ |
| 68 | 66 | int fSqlPrint; /* True if -sqlprint flag is present */ |
| 69 | 67 | int fQuiet; /* True if -quiet flag is present */ |
| 70 | 68 | int fHttpTrace; /* Trace outbound HTTP requests */ |
| 71 | 69 |
| --- 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 @@ | ||
| 59 | 59 | char *zRepositoryName; /* Name of the repository database */ |
| 60 | 60 | char *zRepoDb; /* SQLite database name for the repository */ |
| 61 | 61 | const char *zHome; /* Name of user home directory */ |
| 62 | 62 | int localOpen; /* True if the local database is open */ |
| 63 | 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 | 64 | int minPrefix; /* Number of digits needed for a distinct UUID */ |
| 67 | 65 | int fSqlTrace; /* True if -sqltrace flag is present */ |
| 68 | 66 | int fSqlPrint; /* True if -sqlprint flag is present */ |
| 69 | 67 | int fQuiet; /* True if -quiet flag is present */ |
| 70 | 68 | int fHttpTrace; /* Trace outbound HTTP requests */ |
| 71 | 69 |
| --- 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 |
-1
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -866,11 +866,10 @@ | ||
| 866 | 866 | if( !g.okSetup ){ |
| 867 | 867 | login_needed(); |
| 868 | 868 | } |
| 869 | 869 | |
| 870 | 870 | style_header("Settings"); |
| 871 | - db_FreeManifestNames(); | |
| 872 | 871 | db_begin_transaction(); |
| 873 | 872 | @ <p>This page provides a simple interface to the "fossil setting" command. |
| 874 | 873 | @ See the "fossil help setting" output below for further information on |
| 875 | 874 | @ the meaning of each setting.</p><hr /> |
| 876 | 875 | @ <form action="%s(g.zBaseURL)/setup_settings" method="post"><div> |
| 877 | 876 |
| --- 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 |
-1
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -866,11 +866,10 @@ | ||
| 866 | 866 | if( !g.okSetup ){ |
| 867 | 867 | login_needed(); |
| 868 | 868 | } |
| 869 | 869 | |
| 870 | 870 | style_header("Settings"); |
| 871 | - db_FreeManifestNames(); | |
| 872 | 871 | db_begin_transaction(); |
| 873 | 872 | @ <p>This page provides a simple interface to the "fossil setting" command. |
| 874 | 873 | @ See the "fossil help setting" output below for further information on |
| 875 | 874 | @ the meaning of each setting.</p><hr /> |
| 876 | 875 | @ <form action="%s(g.zBaseURL)/setup_settings" method="post"><div> |
| 877 | 876 |
| --- 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 @@ | ||
| 338 | 338 | nPrefix = blob_size(&filename); |
| 339 | 339 | |
| 340 | 340 | if( manifest_parse(&m, &mfile) ){ |
| 341 | 341 | char *zName; |
| 342 | 342 | zip_set_timedate(m.rDate); |
| 343 | - blob_append(&filename, db_manifestName(), -1); | |
| 343 | + blob_append(&filename, "manifest", -1); | |
| 344 | 344 | zName = blob_str(&filename); |
| 345 | 345 | zip_add_folders(zName); |
| 346 | 346 | zip_add_file(zName, &file); |
| 347 | 347 | sha1sum_blob(&file, &hash); |
| 348 | 348 | blob_reset(&file); |
| 349 | 349 | blob_append(&hash, "\n", 1); |
| 350 | 350 | blob_resize(&filename, nPrefix); |
| 351 | - blob_append(&filename, db_manifestUuidName(), -1); | |
| 351 | + blob_append(&filename, "manifest.uuid", -1); | |
| 352 | 352 | zName = blob_str(&filename); |
| 353 | 353 | zip_add_file(zName, &hash); |
| 354 | 354 | blob_reset(&hash); |
| 355 | 355 | for(i=0; i<m.nFile; i++){ |
| 356 | 356 | int fid = uuid_to_rid(m.aFile[i].zUuid, 0); |
| 357 | 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, 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 |