Fossil SCM
When committing a 'secondary' initial checkin with the same branch-name as the primary initial-checking, warn that this is in fact a fork.
Commit
26119c88daf7fb74a60a12f91cf235a6aa25fb09
Parent
71536a285116c64…
1 file changed
+4
+4
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -1809,10 +1809,14 @@ | ||
| 1809 | 1809 | ** or --force flags is used, or unless this is a private check-in. |
| 1810 | 1810 | ** The initial commit MUST have tags "trunk" and "sym-trunk". |
| 1811 | 1811 | */ |
| 1812 | 1812 | if( !vid ){ |
| 1813 | 1813 | if( sCiInfo.zBranch==0 ){ |
| 1814 | + if( allowFork==0 && forceFlag==0 && g.markPrivate==0 | |
| 1815 | + && db_exists("SELECT 1 from event where type='ci'") ){ | |
| 1816 | + fossil_fatal("would fork. \"update\" first or use --allow-fork."); | |
| 1817 | + } | |
| 1814 | 1818 | sCiInfo.zBranch = db_get("main-branch", "trunk"); |
| 1815 | 1819 | } |
| 1816 | 1820 | }else if( sCiInfo.zBranch==0 && allowFork==0 && forceFlag==0 |
| 1817 | 1821 | && g.markPrivate==0 && !is_a_leaf(vid) |
| 1818 | 1822 | ){ |
| 1819 | 1823 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -1809,10 +1809,14 @@ | |
| 1809 | ** or --force flags is used, or unless this is a private check-in. |
| 1810 | ** The initial commit MUST have tags "trunk" and "sym-trunk". |
| 1811 | */ |
| 1812 | if( !vid ){ |
| 1813 | if( sCiInfo.zBranch==0 ){ |
| 1814 | sCiInfo.zBranch = db_get("main-branch", "trunk"); |
| 1815 | } |
| 1816 | }else if( sCiInfo.zBranch==0 && allowFork==0 && forceFlag==0 |
| 1817 | && g.markPrivate==0 && !is_a_leaf(vid) |
| 1818 | ){ |
| 1819 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -1809,10 +1809,14 @@ | |
| 1809 | ** or --force flags is used, or unless this is a private check-in. |
| 1810 | ** The initial commit MUST have tags "trunk" and "sym-trunk". |
| 1811 | */ |
| 1812 | if( !vid ){ |
| 1813 | if( sCiInfo.zBranch==0 ){ |
| 1814 | if( allowFork==0 && forceFlag==0 && g.markPrivate==0 |
| 1815 | && db_exists("SELECT 1 from event where type='ci'") ){ |
| 1816 | fossil_fatal("would fork. \"update\" first or use --allow-fork."); |
| 1817 | } |
| 1818 | sCiInfo.zBranch = db_get("main-branch", "trunk"); |
| 1819 | } |
| 1820 | }else if( sCiInfo.zBranch==0 && allowFork==0 && forceFlag==0 |
| 1821 | && g.markPrivate==0 && !is_a_leaf(vid) |
| 1822 | ){ |
| 1823 |