Fossil SCM
When committing without parent-id (additional "initial" commits), make sure the branch-name is set to "trunk" when not provided otherwise.
Commit
0fd6cf166ce5d9c23d3148bb798b7f1039ebc0b40d3120b60657f760ad15e9aa
Parent
b0db865f200f610…
1 file changed
+11
-8
+11
-8
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -2122,10 +2122,21 @@ | ||
| 2122 | 2122 | noSign = db_get_boolean("omitsign", 0)|noSign; |
| 2123 | 2123 | if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; } |
| 2124 | 2124 | useCksum = db_get_boolean("repo-cksum", 1); |
| 2125 | 2125 | outputManifest = db_get_manifest_setting(); |
| 2126 | 2126 | verify_all_options(); |
| 2127 | + | |
| 2128 | + /* Get the ID of the parent manifest artifact */ | |
| 2129 | + vid = db_lget_int("checkout", 0); | |
| 2130 | + if( vid==0 ){ | |
| 2131 | + useCksum = 1; | |
| 2132 | + if( sCiInfo.zBranch==0 ) { | |
| 2133 | + sCiInfo.zBranch=db_get("main-branch", "trunk"); | |
| 2134 | + } | |
| 2135 | + }else if( content_is_private(vid) ){ | |
| 2136 | + g.markPrivate = 1; | |
| 2137 | + } | |
| 2127 | 2138 | |
| 2128 | 2139 | /* Do not allow the creation of a new branch using an existing open |
| 2129 | 2140 | ** branch name unless the --force flag is used */ |
| 2130 | 2141 | if( sCiInfo.zBranch!=0 |
| 2131 | 2142 | && !forceFlag |
| @@ -2151,18 +2162,10 @@ | ||
| 2151 | 2162 | */ |
| 2152 | 2163 | if( !forceDelta && !db_get_boolean("seen-delta-manifest",0) ){ |
| 2153 | 2164 | forceBaseline = 1; |
| 2154 | 2165 | } |
| 2155 | 2166 | |
| 2156 | - /* Get the ID of the parent manifest artifact */ | |
| 2157 | - vid = db_lget_int("checkout", 0); | |
| 2158 | - if( vid==0 ){ | |
| 2159 | - useCksum = 1; | |
| 2160 | - }else if( content_is_private(vid) ){ | |
| 2161 | - g.markPrivate = 1; | |
| 2162 | - } | |
| 2163 | - | |
| 2164 | 2167 | /* |
| 2165 | 2168 | ** Autosync if autosync is enabled and this is not a private check-in. |
| 2166 | 2169 | */ |
| 2167 | 2170 | if( !g.markPrivate ){ |
| 2168 | 2171 | int syncFlags = SYNC_PULL; |
| 2169 | 2172 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -2122,10 +2122,21 @@ | |
| 2122 | noSign = db_get_boolean("omitsign", 0)|noSign; |
| 2123 | if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; } |
| 2124 | useCksum = db_get_boolean("repo-cksum", 1); |
| 2125 | outputManifest = db_get_manifest_setting(); |
| 2126 | verify_all_options(); |
| 2127 | |
| 2128 | /* Do not allow the creation of a new branch using an existing open |
| 2129 | ** branch name unless the --force flag is used */ |
| 2130 | if( sCiInfo.zBranch!=0 |
| 2131 | && !forceFlag |
| @@ -2151,18 +2162,10 @@ | |
| 2151 | */ |
| 2152 | if( !forceDelta && !db_get_boolean("seen-delta-manifest",0) ){ |
| 2153 | forceBaseline = 1; |
| 2154 | } |
| 2155 | |
| 2156 | /* Get the ID of the parent manifest artifact */ |
| 2157 | vid = db_lget_int("checkout", 0); |
| 2158 | if( vid==0 ){ |
| 2159 | useCksum = 1; |
| 2160 | }else if( content_is_private(vid) ){ |
| 2161 | g.markPrivate = 1; |
| 2162 | } |
| 2163 | |
| 2164 | /* |
| 2165 | ** Autosync if autosync is enabled and this is not a private check-in. |
| 2166 | */ |
| 2167 | if( !g.markPrivate ){ |
| 2168 | int syncFlags = SYNC_PULL; |
| 2169 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -2122,10 +2122,21 @@ | |
| 2122 | noSign = db_get_boolean("omitsign", 0)|noSign; |
| 2123 | if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; } |
| 2124 | useCksum = db_get_boolean("repo-cksum", 1); |
| 2125 | outputManifest = db_get_manifest_setting(); |
| 2126 | verify_all_options(); |
| 2127 | |
| 2128 | /* Get the ID of the parent manifest artifact */ |
| 2129 | vid = db_lget_int("checkout", 0); |
| 2130 | if( vid==0 ){ |
| 2131 | useCksum = 1; |
| 2132 | if( sCiInfo.zBranch==0 ) { |
| 2133 | sCiInfo.zBranch=db_get("main-branch", "trunk"); |
| 2134 | } |
| 2135 | }else if( content_is_private(vid) ){ |
| 2136 | g.markPrivate = 1; |
| 2137 | } |
| 2138 | |
| 2139 | /* Do not allow the creation of a new branch using an existing open |
| 2140 | ** branch name unless the --force flag is used */ |
| 2141 | if( sCiInfo.zBranch!=0 |
| 2142 | && !forceFlag |
| @@ -2151,18 +2162,10 @@ | |
| 2162 | */ |
| 2163 | if( !forceDelta && !db_get_boolean("seen-delta-manifest",0) ){ |
| 2164 | forceBaseline = 1; |
| 2165 | } |
| 2166 | |
| 2167 | /* |
| 2168 | ** Autosync if autosync is enabled and this is not a private check-in. |
| 2169 | */ |
| 2170 | if( !g.markPrivate ){ |
| 2171 | int syncFlags = SYNC_PULL; |
| 2172 |