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.
Commit
3f3fe8af0073c001489cbb7d01cd1cabc8c86a46ca40554dc1f240281106701a
Parent
0c4b612f4e63b41…
1 file changed
+3
-3
+3
-3
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -1673,13 +1673,13 @@ | ||
| 1673 | 1673 | blob_reset(&target); |
| 1674 | 1674 | }else if( rec.contentFlag ){ |
| 1675 | 1675 | rid = svn_handle_symlinks(zPerm, &rec.content); |
| 1676 | 1676 | }else if( zSrcPath ){ |
| 1677 | 1677 | 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); | |
| 1681 | 1681 | } |
| 1682 | 1682 | } |
| 1683 | 1683 | if( rid==0 ){ |
| 1684 | 1684 | fossil_fatal("svn file has no content and no source: %s", zFile); |
| 1685 | 1685 | } |
| 1686 | 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 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 |