Fossil SCM

In import --svn, link a branch that is copied back to its own root from an earlier revision, as when a deleted branch is restored, to the check-in it is copied from, so that it is not made a new root.

dmestas 2026-11-20 21:36 UTC small-fixes
Commit c4761f82db6deefbf3d66088e53484b8a5ea65ba56475c7c277dea5207bf290c
1 file changed +1 -1
+1 -1
--- src/import.c
+++ src/import.c
@@ -1608,11 +1608,11 @@
16081608
if( srcRid>0 ){
16091609
db_bind_int(&addRev, ":branch", branchId);
16101610
db_step(&addRev);
16111611
db_reset(&addRev);
16121612
}
1613
- if( srcRid>0 && srcBranch!=branchId ){
1613
+ if( srcRid>0 && (srcBranch!=branchId || zFile[0]==0) ){
16141614
db_bind_int(&revSrc, ":parent", srcRid);
16151615
db_bind_int(&revSrc, ":rev", gsvn.rev);
16161616
db_bind_int(&revSrc, ":branch", branchId);
16171617
db_step(&revSrc);
16181618
db_reset(&revSrc);
16191619
--- src/import.c
+++ src/import.c
@@ -1608,11 +1608,11 @@
1608 if( srcRid>0 ){
1609 db_bind_int(&addRev, ":branch", branchId);
1610 db_step(&addRev);
1611 db_reset(&addRev);
1612 }
1613 if( srcRid>0 && srcBranch!=branchId ){
1614 db_bind_int(&revSrc, ":parent", srcRid);
1615 db_bind_int(&revSrc, ":rev", gsvn.rev);
1616 db_bind_int(&revSrc, ":branch", branchId);
1617 db_step(&revSrc);
1618 db_reset(&revSrc);
1619
--- src/import.c
+++ src/import.c
@@ -1608,11 +1608,11 @@
1608 if( srcRid>0 ){
1609 db_bind_int(&addRev, ":branch", branchId);
1610 db_step(&addRev);
1611 db_reset(&addRev);
1612 }
1613 if( srcRid>0 && (srcBranch!=branchId || zFile[0]==0) ){
1614 db_bind_int(&revSrc, ":parent", srcRid);
1615 db_bind_int(&revSrc, ":rev", gsvn.rev);
1616 db_bind_int(&revSrc, ":branch", branchId);
1617 db_step(&revSrc);
1618 db_reset(&revSrc);
1619

Keyboard Shortcuts

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