Fossil SCM
Merge in changes from trunk.
Commit
5246eac0c871425e01359245bcf8ae88355781c3
Parent
fbf3a5dd87d55c2…
4 files changed
+1
+2
-2
+3
-3
+4
+1
| --- src/blob.c | ||
| +++ src/blob.c | ||
| @@ -271,10 +271,11 @@ | ||
| 271 | 271 | |
| 272 | 272 | /* |
| 273 | 273 | ** Append text or data to the end of a blob. |
| 274 | 274 | */ |
| 275 | 275 | void blob_append(Blob *pBlob, const char *aData, int nData){ |
| 276 | + assert( aData!=0 ); | |
| 276 | 277 | blob_is_init(pBlob); |
| 277 | 278 | if( nData<0 ) nData = strlen(aData); |
| 278 | 279 | if( nData==0 ) return; |
| 279 | 280 | if( pBlob->nUsed + nData >= pBlob->nAlloc ){ |
| 280 | 281 | pBlob->xRealloc(pBlob, pBlob->nUsed + nData + pBlob->nAlloc + 100); |
| 281 | 282 |
| --- src/blob.c | |
| +++ src/blob.c | |
| @@ -271,10 +271,11 @@ | |
| 271 | |
| 272 | /* |
| 273 | ** Append text or data to the end of a blob. |
| 274 | */ |
| 275 | void blob_append(Blob *pBlob, const char *aData, int nData){ |
| 276 | blob_is_init(pBlob); |
| 277 | if( nData<0 ) nData = strlen(aData); |
| 278 | if( nData==0 ) return; |
| 279 | if( pBlob->nUsed + nData >= pBlob->nAlloc ){ |
| 280 | pBlob->xRealloc(pBlob, pBlob->nUsed + nData + pBlob->nAlloc + 100); |
| 281 |
| --- src/blob.c | |
| +++ src/blob.c | |
| @@ -271,10 +271,11 @@ | |
| 271 | |
| 272 | /* |
| 273 | ** Append text or data to the end of a blob. |
| 274 | */ |
| 275 | void blob_append(Blob *pBlob, const char *aData, int nData){ |
| 276 | assert( aData!=0 ); |
| 277 | blob_is_init(pBlob); |
| 278 | if( nData<0 ) nData = strlen(aData); |
| 279 | if( nData==0 ) return; |
| 280 | if( pBlob->nUsed + nData >= pBlob->nAlloc ){ |
| 281 | pBlob->xRealloc(pBlob, pBlob->nUsed + nData + pBlob->nAlloc + 100); |
| 282 |
+2
-2
| --- src/undo.c | ||
| +++ src/undo.c | ||
| @@ -75,13 +75,13 @@ | ||
| 75 | 75 | if( old_exists ){ |
| 76 | 76 | db_ephemeral_blob(&q, 0, &new); |
| 77 | 77 | } |
| 78 | 78 | if( old_exists ){ |
| 79 | 79 | if( new_exists ){ |
| 80 | - fossil_print("%s %s\n", redoFlag ? "REDO" : "UNDO", zPathname); | |
| 80 | + fossil_print("%s %s\n", redoFlag ? "REDO" : "UNDO", zPathname); | |
| 81 | 81 | }else{ |
| 82 | - fossil_print("NEW %s\n", zPathname); | |
| 82 | + fossil_print("NEW %s\n", zPathname); | |
| 83 | 83 | } |
| 84 | 84 | if( new_exists && (new_link || old_link) ){ |
| 85 | 85 | file_delete(zFullname); |
| 86 | 86 | } |
| 87 | 87 | if( old_link ){ |
| 88 | 88 |
| --- src/undo.c | |
| +++ src/undo.c | |
| @@ -75,13 +75,13 @@ | |
| 75 | if( old_exists ){ |
| 76 | db_ephemeral_blob(&q, 0, &new); |
| 77 | } |
| 78 | if( old_exists ){ |
| 79 | if( new_exists ){ |
| 80 | fossil_print("%s %s\n", redoFlag ? "REDO" : "UNDO", zPathname); |
| 81 | }else{ |
| 82 | fossil_print("NEW %s\n", zPathname); |
| 83 | } |
| 84 | if( new_exists && (new_link || old_link) ){ |
| 85 | file_delete(zFullname); |
| 86 | } |
| 87 | if( old_link ){ |
| 88 |
| --- src/undo.c | |
| +++ src/undo.c | |
| @@ -75,13 +75,13 @@ | |
| 75 | if( old_exists ){ |
| 76 | db_ephemeral_blob(&q, 0, &new); |
| 77 | } |
| 78 | if( old_exists ){ |
| 79 | if( new_exists ){ |
| 80 | fossil_print("%s %s\n", redoFlag ? "REDO" : "UNDO", zPathname); |
| 81 | }else{ |
| 82 | fossil_print("NEW %s\n", zPathname); |
| 83 | } |
| 84 | if( new_exists && (new_link || old_link) ){ |
| 85 | file_delete(zFullname); |
| 86 | } |
| 87 | if( old_link ){ |
| 88 |
+3
-3
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -785,15 +785,15 @@ | ||
| 785 | 785 | errCode = historical_version_of_file(zRevision, zFile, &record, |
| 786 | 786 | &isLink, &isExe, 0, 2); |
| 787 | 787 | if( errCode==2 ){ |
| 788 | 788 | if( db_int(0, "SELECT rid FROM vfile WHERE pathname=%Q OR origname=%Q", |
| 789 | 789 | zFile, zFile)==0 ){ |
| 790 | - fossil_print("UNMANAGE: %s\n", zFile); | |
| 790 | + fossil_print("UNMANAGE %s\n", zFile); | |
| 791 | 791 | }else{ |
| 792 | 792 | undo_save(zFile); |
| 793 | 793 | file_delete(zFull); |
| 794 | - fossil_print("DELETE: %s\n", zFile); | |
| 794 | + fossil_print("DELETE %s\n", zFile); | |
| 795 | 795 | } |
| 796 | 796 | db_multi_exec( |
| 797 | 797 | "UPDATE OR REPLACE vfile" |
| 798 | 798 | " SET pathname=origname, origname=NULL" |
| 799 | 799 | " WHERE pathname=%Q AND origname!=pathname;" |
| @@ -810,11 +810,11 @@ | ||
| 810 | 810 | symlink_create(blob_str(&record), zFull); |
| 811 | 811 | }else{ |
| 812 | 812 | blob_write_to_file(&record, zFull); |
| 813 | 813 | } |
| 814 | 814 | file_wd_setexe(zFull, isExe); |
| 815 | - fossil_print("REVERTED: %s\n", zFile); | |
| 815 | + fossil_print("REVERT %s\n", zFile); | |
| 816 | 816 | mtime = file_wd_mtime(zFull); |
| 817 | 817 | db_multi_exec( |
| 818 | 818 | "UPDATE vfile" |
| 819 | 819 | " SET mtime=%lld, chnged=0, deleted=0, isexe=%d, islink=%d,mrid=rid" |
| 820 | 820 | " WHERE pathname=%Q OR origname=%Q", |
| 821 | 821 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -785,15 +785,15 @@ | |
| 785 | errCode = historical_version_of_file(zRevision, zFile, &record, |
| 786 | &isLink, &isExe, 0, 2); |
| 787 | if( errCode==2 ){ |
| 788 | if( db_int(0, "SELECT rid FROM vfile WHERE pathname=%Q OR origname=%Q", |
| 789 | zFile, zFile)==0 ){ |
| 790 | fossil_print("UNMANAGE: %s\n", zFile); |
| 791 | }else{ |
| 792 | undo_save(zFile); |
| 793 | file_delete(zFull); |
| 794 | fossil_print("DELETE: %s\n", zFile); |
| 795 | } |
| 796 | db_multi_exec( |
| 797 | "UPDATE OR REPLACE vfile" |
| 798 | " SET pathname=origname, origname=NULL" |
| 799 | " WHERE pathname=%Q AND origname!=pathname;" |
| @@ -810,11 +810,11 @@ | |
| 810 | symlink_create(blob_str(&record), zFull); |
| 811 | }else{ |
| 812 | blob_write_to_file(&record, zFull); |
| 813 | } |
| 814 | file_wd_setexe(zFull, isExe); |
| 815 | fossil_print("REVERTED: %s\n", zFile); |
| 816 | mtime = file_wd_mtime(zFull); |
| 817 | db_multi_exec( |
| 818 | "UPDATE vfile" |
| 819 | " SET mtime=%lld, chnged=0, deleted=0, isexe=%d, islink=%d,mrid=rid" |
| 820 | " WHERE pathname=%Q OR origname=%Q", |
| 821 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -785,15 +785,15 @@ | |
| 785 | errCode = historical_version_of_file(zRevision, zFile, &record, |
| 786 | &isLink, &isExe, 0, 2); |
| 787 | if( errCode==2 ){ |
| 788 | if( db_int(0, "SELECT rid FROM vfile WHERE pathname=%Q OR origname=%Q", |
| 789 | zFile, zFile)==0 ){ |
| 790 | fossil_print("UNMANAGE %s\n", zFile); |
| 791 | }else{ |
| 792 | undo_save(zFile); |
| 793 | file_delete(zFull); |
| 794 | fossil_print("DELETE %s\n", zFile); |
| 795 | } |
| 796 | db_multi_exec( |
| 797 | "UPDATE OR REPLACE vfile" |
| 798 | " SET pathname=origname, origname=NULL" |
| 799 | " WHERE pathname=%Q AND origname!=pathname;" |
| @@ -810,11 +810,11 @@ | |
| 810 | symlink_create(blob_str(&record), zFull); |
| 811 | }else{ |
| 812 | blob_write_to_file(&record, zFull); |
| 813 | } |
| 814 | file_wd_setexe(zFull, isExe); |
| 815 | fossil_print("REVERT %s\n", zFile); |
| 816 | mtime = file_wd_mtime(zFull); |
| 817 | db_multi_exec( |
| 818 | "UPDATE vfile" |
| 819 | " SET mtime=%lld, chnged=0, deleted=0, isexe=%d, islink=%d,mrid=rid" |
| 820 | " WHERE pathname=%Q OR origname=%Q", |
| 821 |
+4
| --- www/server.wiki | ||
| +++ www/server.wiki | ||
| @@ -179,10 +179,14 @@ | ||
| 179 | 179 | script itself must be executable for the user under which it will run (which often differs |
| 180 | 180 | from the one running the web server - consult your site's documentation or administrator).</li> |
| 181 | 181 | <li>The repository file AND the directory containing it must be writable by the same account |
| 182 | 182 | which executes the Fossil binary (again, this might differ from the WWW user). The directory |
| 183 | 183 | needs to be writable so that sqlite can write its journal files.</li> |
| 184 | +<li>Fossil must be able to create temporary files, the default directory | |
| 185 | +for which depends on the OS. When the CGI process is operating within | |
| 186 | +a chroot, ensure that this directory exists and is readable/writeable | |
| 187 | +by the user who executes the Fossil binary.</li> | |
| 184 | 188 | </ul> |
| 185 | 189 | </p> |
| 186 | 190 | |
| 187 | 191 | <p> |
| 188 | 192 | Once the script is set up correctly, and assuming your server is also set |
| 189 | 193 |
| --- www/server.wiki | |
| +++ www/server.wiki | |
| @@ -179,10 +179,14 @@ | |
| 179 | script itself must be executable for the user under which it will run (which often differs |
| 180 | from the one running the web server - consult your site's documentation or administrator).</li> |
| 181 | <li>The repository file AND the directory containing it must be writable by the same account |
| 182 | which executes the Fossil binary (again, this might differ from the WWW user). The directory |
| 183 | needs to be writable so that sqlite can write its journal files.</li> |
| 184 | </ul> |
| 185 | </p> |
| 186 | |
| 187 | <p> |
| 188 | Once the script is set up correctly, and assuming your server is also set |
| 189 |
| --- www/server.wiki | |
| +++ www/server.wiki | |
| @@ -179,10 +179,14 @@ | |
| 179 | script itself must be executable for the user under which it will run (which often differs |
| 180 | from the one running the web server - consult your site's documentation or administrator).</li> |
| 181 | <li>The repository file AND the directory containing it must be writable by the same account |
| 182 | which executes the Fossil binary (again, this might differ from the WWW user). The directory |
| 183 | needs to be writable so that sqlite can write its journal files.</li> |
| 184 | <li>Fossil must be able to create temporary files, the default directory |
| 185 | for which depends on the OS. When the CGI process is operating within |
| 186 | a chroot, ensure that this directory exists and is readable/writeable |
| 187 | by the user who executes the Fossil binary.</li> |
| 188 | </ul> |
| 189 | </p> |
| 190 | |
| 191 | <p> |
| 192 | Once the script is set up correctly, and assuming your server is also set |
| 193 |