Fossil SCM

In import --svn, take the permission of a copied file from its source whenever the node gives no properties of its own, also when the copy is edited in the same revision, and give an ordinary file no permission field.

dmestas 2026-11-20 21:37 UTC small-fixes
Commit 19a209aa8bd717a6142c7c83752badf6fe2b9b422c97f7a728142e10d5198639
1 file changed +6 -6
+6 -6
--- src/import.c
+++ src/import.c
@@ -1658,10 +1658,16 @@
16581658
rid = db_int(0, "SELECT rid FROM blob WHERE uuid=("
16591659
" SELECT uuid FROM xfoci"
16601660
" WHERE checkinID=%d AND filename=%Q"
16611661
")",
16621662
srcRid, zSrcFile);
1663
+ if( zPerm==0 && svn_find_header(rec, "Prop-content-length")==0 ){
1664
+ zPerm = db_text(0, "SELECT perm FROM xfoci"
1665
+ " WHERE checkinID=%d AND filename=%Q"
1666
+ " AND perm<>''",
1667
+ srcRid, zSrcFile);
1668
+ }
16631669
}
16641670
if( deltaFlag ){
16651671
Blob deltaSrc;
16661672
Blob target;
16671673
if( rid!=0 ){
@@ -1673,16 +1679,10 @@
16731679
rid = svn_handle_symlinks(zPerm, &target);
16741680
blob_reset(&deltaSrc);
16751681
blob_reset(&target);
16761682
}else if( rec.contentFlag ){
16771683
rid = svn_handle_symlinks(zPerm, &rec.content);
1678
- }else if( zSrcPath ){
1679
- if ( zPerm==0 ){
1680
- zPerm = db_text(0, "SELECT perm FROM xfoci"
1681
- " WHERE checkinID=%d AND filename=%Q",
1682
- srcRid, zSrcFile);
1683
- }
16841684
}
16851685
if( rid==0 ){
16861686
fossil_fatal("svn file has no content and no source: %s", zFile);
16871687
}
16881688
db_bind_text(&addFile, ":path", zFile);
16891689
--- src/import.c
+++ src/import.c
@@ -1658,10 +1658,16 @@
1658 rid = db_int(0, "SELECT rid FROM blob WHERE uuid=("
1659 " SELECT uuid FROM xfoci"
1660 " WHERE checkinID=%d AND filename=%Q"
1661 ")",
1662 srcRid, zSrcFile);
 
 
 
 
 
 
1663 }
1664 if( deltaFlag ){
1665 Blob deltaSrc;
1666 Blob target;
1667 if( rid!=0 ){
@@ -1673,16 +1679,10 @@
1673 rid = svn_handle_symlinks(zPerm, &target);
1674 blob_reset(&deltaSrc);
1675 blob_reset(&target);
1676 }else if( rec.contentFlag ){
1677 rid = svn_handle_symlinks(zPerm, &rec.content);
1678 }else if( zSrcPath ){
1679 if ( zPerm==0 ){
1680 zPerm = db_text(0, "SELECT perm FROM xfoci"
1681 " WHERE checkinID=%d AND filename=%Q",
1682 srcRid, zSrcFile);
1683 }
1684 }
1685 if( rid==0 ){
1686 fossil_fatal("svn file has no content and no source: %s", zFile);
1687 }
1688 db_bind_text(&addFile, ":path", zFile);
1689
--- src/import.c
+++ src/import.c
@@ -1658,10 +1658,16 @@
1658 rid = db_int(0, "SELECT rid FROM blob WHERE uuid=("
1659 " SELECT uuid FROM xfoci"
1660 " WHERE checkinID=%d AND filename=%Q"
1661 ")",
1662 srcRid, zSrcFile);
1663 if( zPerm==0 && svn_find_header(rec, "Prop-content-length")==0 ){
1664 zPerm = db_text(0, "SELECT perm FROM xfoci"
1665 " WHERE checkinID=%d AND filename=%Q"
1666 " AND perm<>''",
1667 srcRid, zSrcFile);
1668 }
1669 }
1670 if( deltaFlag ){
1671 Blob deltaSrc;
1672 Blob target;
1673 if( rid!=0 ){
@@ -1673,16 +1679,10 @@
1679 rid = svn_handle_symlinks(zPerm, &target);
1680 blob_reset(&deltaSrc);
1681 blob_reset(&target);
1682 }else if( rec.contentFlag ){
1683 rid = svn_handle_symlinks(zPerm, &rec.content);
 
 
 
 
 
 
1684 }
1685 if( rid==0 ){
1686 fossil_fatal("svn file has no content and no source: %s", zFile);
1687 }
1688 db_bind_text(&addFile, ":path", zFile);
1689

Keyboard Shortcuts

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