489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
|
*/
void export_cmd(void){
Stmt q, q2, q3;
Bag blobs, vers;
unsigned int unused_mark = 1;
const char *markfile_in;
const char *markfile_out;
char *zMainBranch = db_get("main-branch", 0);
bag_init(&blobs);
bag_init(&vers);
find_option("git", 0, 0); /* Ignore the --git option for now */
markfile_in = find_option("import-marks", 0, 1);
markfile_out = find_option("export-marks", 0, 1);
|
|
|
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
|
*/
void export_cmd(void){
Stmt q, q2, q3;
Bag blobs, vers;
unsigned int unused_mark = 1;
const char *markfile_in;
const char *markfile_out;
const char *zMainBranch = db_main_branch();
bag_init(&blobs);
bag_init(&vers);
find_option("git", 0, 0); /* Ignore the --git option for now */
markfile_in = find_option("import-marks", 0, 1);
markfile_out = find_option("export-marks", 0, 1);
|
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
|
Blob comment; /* The comment text for the check-in */
int nErr = 0; /* Number of errors */
int bPhantomOk; /* True if phantom files should be ignored */
char buf[24];
char *zEmail; /* Contact info for Git committer field */
int fManifest; /* Should the manifest files be included? */
int fPManifest = 0; /* OR of the manifest files for all parents */
char *zMainBranch;
pMan = manifest_get(rid, CFTYPE_MANIFEST, 0);
if( pMan==0 ){
/* Must be a phantom. Return without doing anything, and in particular
** without creating a mark for this check-in. */
gitmirror_message(VERB_NORMAL, "missing check-in: %s\n", zUuid);
return 0;
|
|
|
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
|
Blob comment; /* The comment text for the check-in */
int nErr = 0; /* Number of errors */
int bPhantomOk; /* True if phantom files should be ignored */
char buf[24];
char *zEmail; /* Contact info for Git committer field */
int fManifest; /* Should the manifest files be included? */
int fPManifest = 0; /* OR of the manifest files for all parents */
const char *zMainBranch;
pMan = manifest_get(rid, CFTYPE_MANIFEST, 0);
if( pMan==0 ){
/* Must be a phantom. Return without doing anything, and in particular
** without creating a mark for this check-in. */
gitmirror_message(VERB_NORMAL, "missing check-in: %s\n", zUuid);
return 0;
|
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
|
}
/* Figure out which branch this check-in is a member of */
zBranch = db_text(0,
"SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0 AND rid=%d",
TAG_BRANCH, rid
);
zMainBranch = db_get("main-branch", 0);
if( fossil_strcmp(zBranch, zMainBranch)==0 ){
assert( gitmirror_mainbranch!=0 );
fossil_free(zBranch);
zBranch = fossil_strdup(gitmirror_mainbranch);
}else if( zBranch==0 ){
zBranch = mprintf("unknown");
}else{
|
|
|
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
|
}
/* Figure out which branch this check-in is a member of */
zBranch = db_text(0,
"SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0 AND rid=%d",
TAG_BRANCH, rid
);
zMainBranch = db_main_branch();
if( fossil_strcmp(zBranch, zMainBranch)==0 ){
assert( gitmirror_mainbranch!=0 );
fossil_free(zBranch);
zBranch = fossil_strdup(gitmirror_mainbranch);
}else if( zBranch==0 ){
zBranch = mprintf("unknown");
}else{
|