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.
Commit
707fbb82b4ababdf48dcfe2865728ac9494796c53fc04f64a963d6b3c7a05ac7
Parent
b954faed1f902c8…
1 file changed
+3
+3
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -1666,10 +1666,13 @@ | ||
| 1666 | 1666 | zPerm = db_text(0, "SELECT tperm FROM xfiles" |
| 1667 | 1667 | " WHERE tpath=%Q AND tbranch=%d" |
| 1668 | 1668 | "", zSrcPath, branchId); |
| 1669 | 1669 | } |
| 1670 | 1670 | } |
| 1671 | + if( rid==0 ){ | |
| 1672 | + fossil_fatal("svn file has no content and no source: %s", zFile); | |
| 1673 | + } | |
| 1671 | 1674 | db_bind_text(&addFile, ":path", zFile); |
| 1672 | 1675 | db_bind_int(&addFile, ":branch", branchId); |
| 1673 | 1676 | db_bind_int(&addFile, ":rid", rid); |
| 1674 | 1677 | db_bind_text(&addFile, ":perm", zPerm); |
| 1675 | 1678 | db_step(&addFile); |
| 1676 | 1679 |
| --- 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 |