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.
Commit
69e96640342131f6a862c14d7676a85ee683e37286c5ebdc8fdeb3829c1f0840
Parent
3f3fe8af0073c00…
1 file changed
+3
-2
+3
-2
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -1386,15 +1386,16 @@ | ||
| 1386 | 1386 | }else{ |
| 1387 | 1387 | zBranch = 0; |
| 1388 | 1388 | *type = SVN_UNKNOWN; |
| 1389 | 1389 | } |
| 1390 | 1390 | }else{ |
| 1391 | - if( strncmp(zPath, gsvn.zBranches, gsvn.lenBranches)==0 ){ | |
| 1391 | + if( gsvn.lenBranches>0 | |
| 1392 | + && strncmp(zPath, gsvn.zBranches, gsvn.lenBranches)==0 ){ | |
| 1392 | 1393 | *zFile = zBranch = zPath+gsvn.lenBranches; |
| 1393 | 1394 | *type = SVN_BRANCH; |
| 1394 | 1395 | }else |
| 1395 | - if( strncmp(zPath, gsvn.zTags, gsvn.lenTags)==0 ){ | |
| 1396 | + if( gsvn.lenTags>0 && strncmp(zPath, gsvn.zTags, gsvn.lenTags)==0 ){ | |
| 1396 | 1397 | *zFile = zBranch = zPath+gsvn.lenTags; |
| 1397 | 1398 | *type = SVN_TAG; |
| 1398 | 1399 | }else{ /* Not a branch, tag or trunk */ |
| 1399 | 1400 | return 0; |
| 1400 | 1401 | } |
| 1401 | 1402 |
| --- 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 |