Fossil SCM

In import --svn, stop with an error when an added file has neither content nor a copy source that exists, which includes a Node-copyfrom-rev at which the source is absent. Such a file got an F card with no hash and the revision was lost without a message.

dmestas 2026-11-20 21:26 UTC small-fixes
Commit 707fbb82b4ababdf48dcfe2865728ac9494796c53fc04f64a963d6b3c7a05ac7
1 file changed +3
--- src/import.c
+++ src/import.c
@@ -1666,10 +1666,13 @@
16661666
zPerm = db_text(0, "SELECT tperm FROM xfiles"
16671667
" WHERE tpath=%Q AND tbranch=%d"
16681668
"", zSrcPath, branchId);
16691669
}
16701670
}
1671
+ if( rid==0 ){
1672
+ fossil_fatal("svn file has no content and no source: %s", zFile);
1673
+ }
16711674
db_bind_text(&addFile, ":path", zFile);
16721675
db_bind_int(&addFile, ":branch", branchId);
16731676
db_bind_int(&addFile, ":rid", rid);
16741677
db_bind_text(&addFile, ":perm", zPerm);
16751678
db_step(&addFile);
16761679
--- src/import.c
+++ src/import.c
@@ -1666,10 +1666,13 @@
1666 zPerm = db_text(0, "SELECT tperm FROM xfiles"
1667 " WHERE tpath=%Q AND tbranch=%d"
1668 "", zSrcPath, branchId);
1669 }
1670 }
 
 
 
1671 db_bind_text(&addFile, ":path", zFile);
1672 db_bind_int(&addFile, ":branch", branchId);
1673 db_bind_int(&addFile, ":rid", rid);
1674 db_bind_text(&addFile, ":perm", zPerm);
1675 db_step(&addFile);
1676
--- src/import.c
+++ src/import.c
@@ -1666,10 +1666,13 @@
1666 zPerm = db_text(0, "SELECT tperm FROM xfiles"
1667 " WHERE tpath=%Q AND tbranch=%d"
1668 "", zSrcPath, branchId);
1669 }
1670 }
1671 if( rid==0 ){
1672 fossil_fatal("svn file has no content and no source: %s", zFile);
1673 }
1674 db_bind_text(&addFile, ":path", zFile);
1675 db_bind_int(&addFile, ":branch", branchId);
1676 db_bind_int(&addFile, ":rid", rid);
1677 db_bind_text(&addFile, ":perm", zPerm);
1678 db_step(&addFile);
1679

Keyboard Shortcuts

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