144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
-
+
|
db_finalize(&q);
}
}
/*
** Implement the "fossil bundle append BUNDLE FILE..." command. Add
** the named files into the BUNDLE. Create the BUNDLE if it does not
** alraedy exist.
** already exist.
*/
static void bundle_append_cmd(void){
Blob content, hash;
int i;
Stmt q;
verify_all_options();
|
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
|
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
|
-
+
|
** Write elements of a bundle on standard output
*/
static void bundle_cat_cmd(void){
int i;
Blob x;
verify_all_options();
if( g.argc<5 ) usage("cat BUNDLE HASH...");
bundle_attach_file(g.argv[3], "b1", 1);
bundle_attach_file(g.argv[3], "b1", 0);
blob_zero(&x);
for(i=4; i<g.argc; i++){
int blobid = db_int(0,"SELECT blobid FROM bblob WHERE uuid LIKE '%q%%'",
g.argv[i]);
if( blobid==0 ){
fossil_fatal("no such artifact in bundle: %s", g.argv[i]);
}
|
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
|
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
|
-
+
|
*/
static void bundle_import_cmd(void){
int forceFlag = find_option("force","f",0)!=0;
int isPriv = find_option("publish",0,0)==0;
char *zMissingDeltas;
verify_all_options();
if ( g.argc!=4 ) usage("import BUNDLE ?OPTIONS?");
bundle_attach_file(g.argv[3], "b1", 1);
bundle_attach_file(g.argv[3], "b1", 0);
/* Only import a bundle that was generated from a repo with the same
** project code, unless the --force flag is true */
if( !forceFlag ){
if( !db_exists("SELECT 1 FROM config, bconfig"
" WHERE config.name='project-code'"
" AND bconfig.bcname='project-code'"
|