Fossil SCM
Both push and pull demonstrated, linux-to-linux.
Commit
e60389b0d6d5ece39060c5127d2b695a43927faf24ec4fc194beaba69a98c819
Parent
ccfdc89c962ddc7…
1 file changed
+7
-3
+7
-3
| --- src/patch.c | ||
| +++ src/patch.c | ||
| @@ -224,15 +224,18 @@ | ||
| 224 | 224 | } |
| 225 | 225 | if( zIn==0 ){ |
| 226 | 226 | Blob buf; |
| 227 | 227 | int rc; |
| 228 | 228 | int sz; |
| 229 | - const unsigned char *pData; | |
| 229 | + unsigned char *pData; | |
| 230 | 230 | blob_init(&buf, 0, 0); |
| 231 | 231 | sz = blob_read_from_channel(&buf, in, -1); |
| 232 | - pData = (const unsigned char*)blob_buffer(&buf); | |
| 232 | + pData = (unsigned char*)blob_buffer(&buf); | |
| 233 | 233 | db_multi_exec("ATTACH ':memory:' AS patch"); |
| 234 | + if( g.fSqlTrace ){ | |
| 235 | + fossil_trace("-- deserialize(\"patch\", pData, %lld);\n", sz); | |
| 236 | + } | |
| 234 | 237 | rc = sqlite3_deserialize(g.db, "patch", pData, sz, sz, 0); |
| 235 | 238 | if( rc ){ |
| 236 | 239 | fossil_fatal("cannot open patch database: %s", sqlite3_errmsg(g.db)); |
| 237 | 240 | } |
| 238 | 241 | }else if( !file_isfile(zIn, ExtFILE) ){ |
| @@ -520,11 +523,12 @@ | ||
| 520 | 523 | const char *zDir = 0; |
| 521 | 524 | const char *zBaseName; |
| 522 | 525 | char *zToFree = 0; |
| 523 | 526 | char *zPatchFile = 0; |
| 524 | 527 | if( zDir64 ){ |
| 525 | - zToFree = decode64(zDir64, 0); | |
| 528 | + int n = 0; | |
| 529 | + zToFree = decode64(zDir64, &n); | |
| 526 | 530 | zDir = zToFree; |
| 527 | 531 | } |
| 528 | 532 | verify_all_options(); |
| 529 | 533 | if( g.argc!=4 && g.argc!=5 ){ |
| 530 | 534 | usage(mprintf("%s [DIRECTORY] FILENAME", zCmdName)); |
| 531 | 535 |
| --- src/patch.c | |
| +++ src/patch.c | |
| @@ -224,15 +224,18 @@ | |
| 224 | } |
| 225 | if( zIn==0 ){ |
| 226 | Blob buf; |
| 227 | int rc; |
| 228 | int sz; |
| 229 | const unsigned char *pData; |
| 230 | blob_init(&buf, 0, 0); |
| 231 | sz = blob_read_from_channel(&buf, in, -1); |
| 232 | pData = (const unsigned char*)blob_buffer(&buf); |
| 233 | db_multi_exec("ATTACH ':memory:' AS patch"); |
| 234 | rc = sqlite3_deserialize(g.db, "patch", pData, sz, sz, 0); |
| 235 | if( rc ){ |
| 236 | fossil_fatal("cannot open patch database: %s", sqlite3_errmsg(g.db)); |
| 237 | } |
| 238 | }else if( !file_isfile(zIn, ExtFILE) ){ |
| @@ -520,11 +523,12 @@ | |
| 520 | const char *zDir = 0; |
| 521 | const char *zBaseName; |
| 522 | char *zToFree = 0; |
| 523 | char *zPatchFile = 0; |
| 524 | if( zDir64 ){ |
| 525 | zToFree = decode64(zDir64, 0); |
| 526 | zDir = zToFree; |
| 527 | } |
| 528 | verify_all_options(); |
| 529 | if( g.argc!=4 && g.argc!=5 ){ |
| 530 | usage(mprintf("%s [DIRECTORY] FILENAME", zCmdName)); |
| 531 |
| --- src/patch.c | |
| +++ src/patch.c | |
| @@ -224,15 +224,18 @@ | |
| 224 | } |
| 225 | if( zIn==0 ){ |
| 226 | Blob buf; |
| 227 | int rc; |
| 228 | int sz; |
| 229 | unsigned char *pData; |
| 230 | blob_init(&buf, 0, 0); |
| 231 | sz = blob_read_from_channel(&buf, in, -1); |
| 232 | pData = (unsigned char*)blob_buffer(&buf); |
| 233 | db_multi_exec("ATTACH ':memory:' AS patch"); |
| 234 | if( g.fSqlTrace ){ |
| 235 | fossil_trace("-- deserialize(\"patch\", pData, %lld);\n", sz); |
| 236 | } |
| 237 | rc = sqlite3_deserialize(g.db, "patch", pData, sz, sz, 0); |
| 238 | if( rc ){ |
| 239 | fossil_fatal("cannot open patch database: %s", sqlite3_errmsg(g.db)); |
| 240 | } |
| 241 | }else if( !file_isfile(zIn, ExtFILE) ){ |
| @@ -520,11 +523,12 @@ | |
| 523 | const char *zDir = 0; |
| 524 | const char *zBaseName; |
| 525 | char *zToFree = 0; |
| 526 | char *zPatchFile = 0; |
| 527 | if( zDir64 ){ |
| 528 | int n = 0; |
| 529 | zToFree = decode64(zDir64, &n); |
| 530 | zDir = zToFree; |
| 531 | } |
| 532 | verify_all_options(); |
| 533 | if( g.argc!=4 && g.argc!=5 ){ |
| 534 | usage(mprintf("%s [DIRECTORY] FILENAME", zCmdName)); |
| 535 |