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.

dmestas 2026-11-20 21:26 UTC small-fixes
Commit b954faed1f902c82098d2f14a4a8f2581ceceb7291782afa5267419f1edaed1c
1 file changed +6 -1
+6 -1
--- src/import.c
+++ src/import.c
@@ -1539,11 +1539,16 @@
15391539
continue;
15401540
}
15411541
if( zAction==0 ){
15421542
fossil_fatal("svn-dump data format broken");
15431543
}
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) ){
15451550
fossil_fatal("svn path is not a valid file name: %s", zFile);
15461551
}
15471552
if( (zTemp = svn_find_header(rec, "Text-delta")) ){
15481553
deltaFlag = strncmp(zTemp, "true", 4)==0;
15491554
}
15501555
--- 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

Keyboard Shortcuts

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