Fossil SCM
For 'fossil bundle import' and 'cat' subcommands, do not create a bundle file if it does not exist (reported in [forum:8a26dd5610|forum post 8a26dd5610]).
Commit
3828746b57105d2e553f2347e16d0eb683fa302353b29e9cda9c7791917dff9f
Parent
586dc75f498f231…
1 file changed
+3
-3
+3
-3
| --- src/bundle.c | ||
| +++ src/bundle.c | ||
| @@ -146,11 +146,11 @@ | ||
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | /* |
| 149 | 149 | ** Implement the "fossil bundle append BUNDLE FILE..." command. Add |
| 150 | 150 | ** the named files into the BUNDLE. Create the BUNDLE if it does not |
| 151 | -** alraedy exist. | |
| 151 | +** already exist. | |
| 152 | 152 | */ |
| 153 | 153 | static void bundle_append_cmd(void){ |
| 154 | 154 | Blob content, hash; |
| 155 | 155 | int i; |
| 156 | 156 | Stmt q; |
| @@ -539,11 +539,11 @@ | ||
| 539 | 539 | static void bundle_cat_cmd(void){ |
| 540 | 540 | int i; |
| 541 | 541 | Blob x; |
| 542 | 542 | verify_all_options(); |
| 543 | 543 | if( g.argc<5 ) usage("cat BUNDLE HASH..."); |
| 544 | - bundle_attach_file(g.argv[3], "b1", 1); | |
| 544 | + bundle_attach_file(g.argv[3], "b1", 0); | |
| 545 | 545 | blob_zero(&x); |
| 546 | 546 | for(i=4; i<g.argc; i++){ |
| 547 | 547 | int blobid = db_int(0,"SELECT blobid FROM bblob WHERE uuid LIKE '%q%%'", |
| 548 | 548 | g.argv[i]); |
| 549 | 549 | if( blobid==0 ){ |
| @@ -569,11 +569,11 @@ | ||
| 569 | 569 | int forceFlag = find_option("force","f",0)!=0; |
| 570 | 570 | int isPriv = find_option("publish",0,0)==0; |
| 571 | 571 | char *zMissingDeltas; |
| 572 | 572 | verify_all_options(); |
| 573 | 573 | if ( g.argc!=4 ) usage("import BUNDLE ?OPTIONS?"); |
| 574 | - bundle_attach_file(g.argv[3], "b1", 1); | |
| 574 | + bundle_attach_file(g.argv[3], "b1", 0); | |
| 575 | 575 | |
| 576 | 576 | /* Only import a bundle that was generated from a repo with the same |
| 577 | 577 | ** project code, unless the --force flag is true */ |
| 578 | 578 | if( !forceFlag ){ |
| 579 | 579 | if( !db_exists("SELECT 1 FROM config, bconfig" |
| 580 | 580 |
| --- src/bundle.c | |
| +++ src/bundle.c | |
| @@ -146,11 +146,11 @@ | |
| 146 | } |
| 147 | |
| 148 | /* |
| 149 | ** Implement the "fossil bundle append BUNDLE FILE..." command. Add |
| 150 | ** the named files into the BUNDLE. Create the BUNDLE if it does not |
| 151 | ** alraedy exist. |
| 152 | */ |
| 153 | static void bundle_append_cmd(void){ |
| 154 | Blob content, hash; |
| 155 | int i; |
| 156 | Stmt q; |
| @@ -539,11 +539,11 @@ | |
| 539 | static void bundle_cat_cmd(void){ |
| 540 | int i; |
| 541 | Blob x; |
| 542 | verify_all_options(); |
| 543 | if( g.argc<5 ) usage("cat BUNDLE HASH..."); |
| 544 | bundle_attach_file(g.argv[3], "b1", 1); |
| 545 | blob_zero(&x); |
| 546 | for(i=4; i<g.argc; i++){ |
| 547 | int blobid = db_int(0,"SELECT blobid FROM bblob WHERE uuid LIKE '%q%%'", |
| 548 | g.argv[i]); |
| 549 | if( blobid==0 ){ |
| @@ -569,11 +569,11 @@ | |
| 569 | int forceFlag = find_option("force","f",0)!=0; |
| 570 | int isPriv = find_option("publish",0,0)==0; |
| 571 | char *zMissingDeltas; |
| 572 | verify_all_options(); |
| 573 | if ( g.argc!=4 ) usage("import BUNDLE ?OPTIONS?"); |
| 574 | bundle_attach_file(g.argv[3], "b1", 1); |
| 575 | |
| 576 | /* Only import a bundle that was generated from a repo with the same |
| 577 | ** project code, unless the --force flag is true */ |
| 578 | if( !forceFlag ){ |
| 579 | if( !db_exists("SELECT 1 FROM config, bconfig" |
| 580 |
| --- src/bundle.c | |
| +++ src/bundle.c | |
| @@ -146,11 +146,11 @@ | |
| 146 | } |
| 147 | |
| 148 | /* |
| 149 | ** Implement the "fossil bundle append BUNDLE FILE..." command. Add |
| 150 | ** the named files into the BUNDLE. Create the BUNDLE if it does not |
| 151 | ** already exist. |
| 152 | */ |
| 153 | static void bundle_append_cmd(void){ |
| 154 | Blob content, hash; |
| 155 | int i; |
| 156 | Stmt q; |
| @@ -539,11 +539,11 @@ | |
| 539 | static void bundle_cat_cmd(void){ |
| 540 | int i; |
| 541 | Blob x; |
| 542 | verify_all_options(); |
| 543 | if( g.argc<5 ) usage("cat BUNDLE HASH..."); |
| 544 | bundle_attach_file(g.argv[3], "b1", 0); |
| 545 | blob_zero(&x); |
| 546 | for(i=4; i<g.argc; i++){ |
| 547 | int blobid = db_int(0,"SELECT blobid FROM bblob WHERE uuid LIKE '%q%%'", |
| 548 | g.argv[i]); |
| 549 | if( blobid==0 ){ |
| @@ -569,11 +569,11 @@ | |
| 569 | int forceFlag = find_option("force","f",0)!=0; |
| 570 | int isPriv = find_option("publish",0,0)==0; |
| 571 | char *zMissingDeltas; |
| 572 | verify_all_options(); |
| 573 | if ( g.argc!=4 ) usage("import BUNDLE ?OPTIONS?"); |
| 574 | bundle_attach_file(g.argv[3], "b1", 0); |
| 575 | |
| 576 | /* Only import a bundle that was generated from a repo with the same |
| 577 | ** project code, unless the --force flag is true */ |
| 578 | if( !forceFlag ){ |
| 579 | if( !db_exists("SELECT 1 FROM config, bconfig" |
| 580 |