Fossil SCM

In import --svn, take the permission of a copied file from the file in the check-in it is copied from. The lookup used the full source path and the target branch, so an executable or a symlink lost its permission when copied, except with --flat and no --base.

dmestas 2026-11-20 21:26 UTC small-fixes
Commit 3f3fe8af0073c001489cbb7d01cd1cabc8c86a46ca40554dc1f240281106701a
1 file changed +3 -3
+3 -3
--- src/import.c
+++ src/import.c
@@ -1673,13 +1673,13 @@
16731673
blob_reset(&target);
16741674
}else if( rec.contentFlag ){
16751675
rid = svn_handle_symlinks(zPerm, &rec.content);
16761676
}else if( zSrcPath ){
16771677
if ( zPerm==0 ){
1678
- zPerm = db_text(0, "SELECT tperm FROM xfiles"
1679
- " WHERE tpath=%Q AND tbranch=%d"
1680
- "", zSrcPath, branchId);
1678
+ zPerm = db_text(0, "SELECT perm FROM xfoci"
1679
+ " WHERE checkinID=%d AND filename=%Q",
1680
+ srcRid, zSrcFile);
16811681
}
16821682
}
16831683
if( rid==0 ){
16841684
fossil_fatal("svn file has no content and no source: %s", zFile);
16851685
}
16861686
--- src/import.c
+++ src/import.c
@@ -1673,13 +1673,13 @@
1673 blob_reset(&target);
1674 }else if( rec.contentFlag ){
1675 rid = svn_handle_symlinks(zPerm, &rec.content);
1676 }else if( zSrcPath ){
1677 if ( zPerm==0 ){
1678 zPerm = db_text(0, "SELECT tperm FROM xfiles"
1679 " WHERE tpath=%Q AND tbranch=%d"
1680 "", zSrcPath, branchId);
1681 }
1682 }
1683 if( rid==0 ){
1684 fossil_fatal("svn file has no content and no source: %s", zFile);
1685 }
1686
--- src/import.c
+++ src/import.c
@@ -1673,13 +1673,13 @@
1673 blob_reset(&target);
1674 }else if( rec.contentFlag ){
1675 rid = svn_handle_symlinks(zPerm, &rec.content);
1676 }else if( zSrcPath ){
1677 if ( zPerm==0 ){
1678 zPerm = db_text(0, "SELECT perm FROM xfoci"
1679 " WHERE checkinID=%d AND filename=%Q",
1680 srcRid, zSrcFile);
1681 }
1682 }
1683 if( rid==0 ){
1684 fossil_fatal("svn file has no content and no source: %s", zFile);
1685 }
1686

Keyboard Shortcuts

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