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.

jan.nijtmans 2015-03-23 08:56 trunk
Commit 26119c88daf7fb74a60a12f91cf235a6aa25fb09
1 file changed +4
--- src/checkin.c
+++ src/checkin.c
@@ -1809,10 +1809,14 @@
18091809
** or --force flags is used, or unless this is a private check-in.
18101810
** The initial commit MUST have tags "trunk" and "sym-trunk".
18111811
*/
18121812
if( !vid ){
18131813
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
+ }
18141818
sCiInfo.zBranch = db_get("main-branch", "trunk");
18151819
}
18161820
}else if( sCiInfo.zBranch==0 && allowFork==0 && forceFlag==0
18171821
&& g.markPrivate==0 && !is_a_leaf(vid)
18181822
){
18191823
--- 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

Keyboard Shortcuts

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