Fossil SCM
In import --svn, pass over a file node that sits where a branch directory is expected, such as a file directly inside branches/. It was imported as a file with an empty name on a branch of its own, in a manifest that could not be parsed.
Commit
b954faed1f902c82098d2f14a4a8f2581ceceb7291782afa5267419f1edaed1c
Parent
f36b1348e0d6c59…
1 file changed
+6
-1
+6
-1
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -1539,11 +1539,16 @@ | ||
| 1539 | 1539 | continue; |
| 1540 | 1540 | } |
| 1541 | 1541 | if( zAction==0 ){ |
| 1542 | 1542 | fossil_fatal("svn-dump data format broken"); |
| 1543 | 1543 | } |
| 1544 | - if( zFile[0]!=0 && !file_is_simple_pathname_nonstrict(zFile) ){ | |
| 1544 | + if( zFile[0]==0 ){ | |
| 1545 | + if( zKind!=0 && strncmp(zKind, "dir", 3)!=0 ){ | |
| 1546 | + svn_free_rec(&rec); | |
| 1547 | + continue; | |
| 1548 | + } | |
| 1549 | + }else if( !file_is_simple_pathname_nonstrict(zFile) ){ | |
| 1545 | 1550 | fossil_fatal("svn path is not a valid file name: %s", zFile); |
| 1546 | 1551 | } |
| 1547 | 1552 | if( (zTemp = svn_find_header(rec, "Text-delta")) ){ |
| 1548 | 1553 | deltaFlag = strncmp(zTemp, "true", 4)==0; |
| 1549 | 1554 | } |
| 1550 | 1555 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -1539,11 +1539,16 @@ | |
| 1539 | continue; |
| 1540 | } |
| 1541 | if( zAction==0 ){ |
| 1542 | fossil_fatal("svn-dump data format broken"); |
| 1543 | } |
| 1544 | if( zFile[0]!=0 && !file_is_simple_pathname_nonstrict(zFile) ){ |
| 1545 | fossil_fatal("svn path is not a valid file name: %s", zFile); |
| 1546 | } |
| 1547 | if( (zTemp = svn_find_header(rec, "Text-delta")) ){ |
| 1548 | deltaFlag = strncmp(zTemp, "true", 4)==0; |
| 1549 | } |
| 1550 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -1539,11 +1539,16 @@ | |
| 1539 | continue; |
| 1540 | } |
| 1541 | if( zAction==0 ){ |
| 1542 | fossil_fatal("svn-dump data format broken"); |
| 1543 | } |
| 1544 | if( zFile[0]==0 ){ |
| 1545 | if( zKind!=0 && strncmp(zKind, "dir", 3)!=0 ){ |
| 1546 | svn_free_rec(&rec); |
| 1547 | continue; |
| 1548 | } |
| 1549 | }else if( !file_is_simple_pathname_nonstrict(zFile) ){ |
| 1550 | fossil_fatal("svn path is not a valid file name: %s", zFile); |
| 1551 | } |
| 1552 | if( (zTemp = svn_find_header(rec, "Text-delta")) ){ |
| 1553 | deltaFlag = strncmp(zTemp, "true", 4)==0; |
| 1554 | } |
| 1555 |