Fossil SCM

In svn_parse_path(), compare a path with the branches and tags folders only when they are set. With --flat --base DIR they are not, and every path outside DIR became a branch named by its first component; such paths are now passed over.

dmestas 2026-11-20 21:26 UTC small-fixes
Commit 69e96640342131f6a862c14d7676a85ee683e37286c5ebdc8fdeb3829c1f0840
1 file changed +3 -2
+3 -2
--- src/import.c
+++ src/import.c
@@ -1386,15 +1386,16 @@
13861386
}else{
13871387
zBranch = 0;
13881388
*type = SVN_UNKNOWN;
13891389
}
13901390
}else{
1391
- if( strncmp(zPath, gsvn.zBranches, gsvn.lenBranches)==0 ){
1391
+ if( gsvn.lenBranches>0
1392
+ && strncmp(zPath, gsvn.zBranches, gsvn.lenBranches)==0 ){
13921393
*zFile = zBranch = zPath+gsvn.lenBranches;
13931394
*type = SVN_BRANCH;
13941395
}else
1395
- if( strncmp(zPath, gsvn.zTags, gsvn.lenTags)==0 ){
1396
+ if( gsvn.lenTags>0 && strncmp(zPath, gsvn.zTags, gsvn.lenTags)==0 ){
13961397
*zFile = zBranch = zPath+gsvn.lenTags;
13971398
*type = SVN_TAG;
13981399
}else{ /* Not a branch, tag or trunk */
13991400
return 0;
14001401
}
14011402
--- src/import.c
+++ src/import.c
@@ -1386,15 +1386,16 @@
1386 }else{
1387 zBranch = 0;
1388 *type = SVN_UNKNOWN;
1389 }
1390 }else{
1391 if( strncmp(zPath, gsvn.zBranches, gsvn.lenBranches)==0 ){
 
1392 *zFile = zBranch = zPath+gsvn.lenBranches;
1393 *type = SVN_BRANCH;
1394 }else
1395 if( strncmp(zPath, gsvn.zTags, gsvn.lenTags)==0 ){
1396 *zFile = zBranch = zPath+gsvn.lenTags;
1397 *type = SVN_TAG;
1398 }else{ /* Not a branch, tag or trunk */
1399 return 0;
1400 }
1401
--- src/import.c
+++ src/import.c
@@ -1386,15 +1386,16 @@
1386 }else{
1387 zBranch = 0;
1388 *type = SVN_UNKNOWN;
1389 }
1390 }else{
1391 if( gsvn.lenBranches>0
1392 && strncmp(zPath, gsvn.zBranches, gsvn.lenBranches)==0 ){
1393 *zFile = zBranch = zPath+gsvn.lenBranches;
1394 *type = SVN_BRANCH;
1395 }else
1396 if( gsvn.lenTags>0 && strncmp(zPath, gsvn.zTags, gsvn.lenTags)==0 ){
1397 *zFile = zBranch = zPath+gsvn.lenTags;
1398 *type = SVN_TAG;
1399 }else{ /* Not a branch, tag or trunk */
1400 return 0;
1401 }
1402

Keyboard Shortcuts

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