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]).

danield 2024-04-16 12:01 trunk
Commit 3828746b57105d2e553f2347e16d0eb683fa302353b29e9cda9c7791917dff9f
1 file changed +3 -3
+3 -3
--- src/bundle.c
+++ src/bundle.c
@@ -146,11 +146,11 @@
146146
}
147147
148148
/*
149149
** Implement the "fossil bundle append BUNDLE FILE..." command. Add
150150
** the named files into the BUNDLE. Create the BUNDLE if it does not
151
-** alraedy exist.
151
+** already exist.
152152
*/
153153
static void bundle_append_cmd(void){
154154
Blob content, hash;
155155
int i;
156156
Stmt q;
@@ -539,11 +539,11 @@
539539
static void bundle_cat_cmd(void){
540540
int i;
541541
Blob x;
542542
verify_all_options();
543543
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);
545545
blob_zero(&x);
546546
for(i=4; i<g.argc; i++){
547547
int blobid = db_int(0,"SELECT blobid FROM bblob WHERE uuid LIKE '%q%%'",
548548
g.argv[i]);
549549
if( blobid==0 ){
@@ -569,11 +569,11 @@
569569
int forceFlag = find_option("force","f",0)!=0;
570570
int isPriv = find_option("publish",0,0)==0;
571571
char *zMissingDeltas;
572572
verify_all_options();
573573
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);
575575
576576
/* Only import a bundle that was generated from a repo with the same
577577
** project code, unless the --force flag is true */
578578
if( !forceFlag ){
579579
if( !db_exists("SELECT 1 FROM config, bconfig"
580580
--- 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

Keyboard Shortcuts

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