538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
|
** Read text generated by the git-fast-export command and use it to
** construct a new Fossil repository named by the NEW-REPOSITORY
** argument. The get-fast-export text is read from standard input.
*/
void git_import_cmd(void){
char *zPassword;
FILE *pIn;
if( g.argc!=3 && g.argc!=4 ){
usage("REPOSITORY-NAME");
}
if( g.argc==4 ){
pIn = fopen(g.argv[3], "rb");
}else{
pIn = stdin;
}
db_create_repository(g.argv[2]);
db_open_repository(g.argv[2]);
db_open_config(0);
db_multi_exec(
"ATTACH ':memory:' AS mem1;"
"CREATE TABLE mem1.xtag(tname TEXT UNIQUE, trid INT, tuuid TEXT);"
);
|
>
>
|
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
|
** Read text generated by the git-fast-export command and use it to
** construct a new Fossil repository named by the NEW-REPOSITORY
** argument. The get-fast-export text is read from standard input.
*/
void git_import_cmd(void){
char *zPassword;
FILE *pIn;
int forceFlag = find_option("force", "f", 0)!=0;
if( g.argc!=3 && g.argc!=4 ){
usage("REPOSITORY-NAME");
}
if( g.argc==4 ){
pIn = fopen(g.argv[3], "rb");
}else{
pIn = stdin;
}
if( forceFlag ) unlink(g.argv[2]);
db_create_repository(g.argv[2]);
db_open_repository(g.argv[2]);
db_open_config(0);
db_multi_exec(
"ATTACH ':memory:' AS mem1;"
"CREATE TABLE mem1.xtag(tname TEXT UNIQUE, trid INT, tuuid TEXT);"
);
|