Fossil SCM

Fix for new branch detection and handling

baruch 2015-01-15 16:17 svn-import
Commit 7673518b9b84703a996670d6cc2ff53e6c793f59
1 file changed +4 -4
+4 -4
--- src/import.c
+++ src/import.c
@@ -1220,13 +1220,10 @@
12201220
continue;
12211221
}
12221222
if( (zTemp = svn_find_header(rec, "Text-delta")) ){
12231223
deltaFlag = strncmp(zTemp, "true", 4)==0;
12241224
}
1225
- if( zFile[0]==0 ){
1226
- bag_insert(&gsvn.newBranches, branchId);
1227
- }
12281225
if( strncmp(zAction, "delete", 6)==0
12291226
|| strncmp(zAction, "replace", 7)==0 )
12301227
{
12311228
//TODO delete root
12321229
db_bind_text(&delPath, ":path", zFile);
@@ -1278,11 +1275,11 @@
12781275
if( zKind==0 ){
12791276
fossil_fatal("Missing Node-kind");
12801277
}else if( strncmp(zKind, "dir", 3)==0 ){
12811278
if( zSrcPath && branchType!=SVN_TAG ){
12821279
if( srcRid>0 ){
1283
- if( zFile[0]==0 ){
1280
+ if( zSrcFile[0]==0 ){
12841281
db_bind_text(&cpyRoot, ":path", zFile);
12851282
db_bind_int(&cpyRoot, ":branch", branchId);
12861283
db_bind_int(&cpyRoot, ":rid", srcRid);
12871284
db_step(&cpyRoot);
12881285
db_reset(&cpyRoot);
@@ -1294,10 +1291,13 @@
12941291
db_step(&cpyPath);
12951292
db_reset(&cpyPath);
12961293
}
12971294
}
12981295
}
1296
+ if( zFile[0]==0 ){
1297
+ bag_insert(&gsvn.newBranches, branchId);
1298
+ }
12991299
}else{
13001300
int rid = 0;
13011301
if( zSrcPath ){
13021302
rid = db_int(0, "SELECT rid FROM blob WHERE uuid=("
13031303
" SELECT uuid FROM xfoci"
13041304
--- src/import.c
+++ src/import.c
@@ -1220,13 +1220,10 @@
1220 continue;
1221 }
1222 if( (zTemp = svn_find_header(rec, "Text-delta")) ){
1223 deltaFlag = strncmp(zTemp, "true", 4)==0;
1224 }
1225 if( zFile[0]==0 ){
1226 bag_insert(&gsvn.newBranches, branchId);
1227 }
1228 if( strncmp(zAction, "delete", 6)==0
1229 || strncmp(zAction, "replace", 7)==0 )
1230 {
1231 //TODO delete root
1232 db_bind_text(&delPath, ":path", zFile);
@@ -1278,11 +1275,11 @@
1278 if( zKind==0 ){
1279 fossil_fatal("Missing Node-kind");
1280 }else if( strncmp(zKind, "dir", 3)==0 ){
1281 if( zSrcPath && branchType!=SVN_TAG ){
1282 if( srcRid>0 ){
1283 if( zFile[0]==0 ){
1284 db_bind_text(&cpyRoot, ":path", zFile);
1285 db_bind_int(&cpyRoot, ":branch", branchId);
1286 db_bind_int(&cpyRoot, ":rid", srcRid);
1287 db_step(&cpyRoot);
1288 db_reset(&cpyRoot);
@@ -1294,10 +1291,13 @@
1294 db_step(&cpyPath);
1295 db_reset(&cpyPath);
1296 }
1297 }
1298 }
 
 
 
1299 }else{
1300 int rid = 0;
1301 if( zSrcPath ){
1302 rid = db_int(0, "SELECT rid FROM blob WHERE uuid=("
1303 " SELECT uuid FROM xfoci"
1304
--- src/import.c
+++ src/import.c
@@ -1220,13 +1220,10 @@
1220 continue;
1221 }
1222 if( (zTemp = svn_find_header(rec, "Text-delta")) ){
1223 deltaFlag = strncmp(zTemp, "true", 4)==0;
1224 }
 
 
 
1225 if( strncmp(zAction, "delete", 6)==0
1226 || strncmp(zAction, "replace", 7)==0 )
1227 {
1228 //TODO delete root
1229 db_bind_text(&delPath, ":path", zFile);
@@ -1278,11 +1275,11 @@
1275 if( zKind==0 ){
1276 fossil_fatal("Missing Node-kind");
1277 }else if( strncmp(zKind, "dir", 3)==0 ){
1278 if( zSrcPath && branchType!=SVN_TAG ){
1279 if( srcRid>0 ){
1280 if( zSrcFile[0]==0 ){
1281 db_bind_text(&cpyRoot, ":path", zFile);
1282 db_bind_int(&cpyRoot, ":branch", branchId);
1283 db_bind_int(&cpyRoot, ":rid", srcRid);
1284 db_step(&cpyRoot);
1285 db_reset(&cpyRoot);
@@ -1294,10 +1291,13 @@
1291 db_step(&cpyPath);
1292 db_reset(&cpyPath);
1293 }
1294 }
1295 }
1296 if( zFile[0]==0 ){
1297 bag_insert(&gsvn.newBranches, branchId);
1298 }
1299 }else{
1300 int rid = 0;
1301 if( zSrcPath ){
1302 rid = db_int(0, "SELECT rid FROM blob WHERE uuid=("
1303 " SELECT uuid FROM xfoci"
1304

Keyboard Shortcuts

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