Fossil SCM
New --close option to "fossil [/help?cmd=commit|commit]", which immediately closes the branch being committed.
Commit
abf727105daa183a1f8b66699faaeb1607bb69aa
Parent
9aae838b8b4a18e…
2 files changed
+6
+2
+6
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -880,10 +880,11 @@ | ||
| 880 | 880 | */ |
| 881 | 881 | struct CheckinInfo { |
| 882 | 882 | Blob *pComment; /* Check-in comment text */ |
| 883 | 883 | const char *zMimetype; /* Mimetype of check-in command. May be NULL */ |
| 884 | 884 | int verifyDate; /* Verify that child is younger */ |
| 885 | + int closeFlag; /* Close the branch being committed */ | |
| 885 | 886 | Blob *pCksum; /* Repository checksum. May be 0 */ |
| 886 | 887 | const char *zDateOvrd; /* Date override. If 0 then use 'now' */ |
| 887 | 888 | const char *zUserOvrd; /* User override. If 0 then use g.zLogin */ |
| 888 | 889 | const char *zBranch; /* Branch name. May be 0 */ |
| 889 | 890 | const char *zColor; /* One-time background color. May be 0 */ |
| @@ -1059,10 +1060,13 @@ | ||
| 1059 | 1060 | } |
| 1060 | 1061 | if( zColor && zColor[0] ){ |
| 1061 | 1062 | /* One-time background color */ |
| 1062 | 1063 | blob_appendf(pOut, "T +bgcolor * %F\n", zColor); |
| 1063 | 1064 | } |
| 1065 | + if( p->closeFlag ){ | |
| 1066 | + blob_appendf(pOut, "T +closed *\n"); | |
| 1067 | + } | |
| 1064 | 1068 | db_prepare(&q, "SELECT uuid,merge FROM vmerge JOIN blob ON merge=rid" |
| 1065 | 1069 | " WHERE id=-4 ORDER BY 1"); |
| 1066 | 1070 | while( db_step(&q)==SQLITE_ROW ){ |
| 1067 | 1071 | const char *zIntegrateUuid = db_column_text(&q, 0); |
| 1068 | 1072 | int rid = db_column_int(&q, 1); |
| @@ -1300,10 +1304,11 @@ | ||
| 1300 | 1304 | ** --allow-older allow a commit older than its ancestor |
| 1301 | 1305 | ** --baseline use a baseline manifest in the commit process |
| 1302 | 1306 | ** --bgcolor COLOR apply COLOR to this one check-in only |
| 1303 | 1307 | ** --branch NEW-BRANCH-NAME check in to this new branch |
| 1304 | 1308 | ** --branchcolor COLOR apply given COLOR to the branch |
| 1309 | +** --close close the branch being committed | |
| 1305 | 1310 | ** --delta use a delta manifest in the commit process |
| 1306 | 1311 | ** -m|--comment COMMENT-TEXT use COMMENT-TEXT as commit comment |
| 1307 | 1312 | ** -M|--message-file FILE read the commit comment from given file |
| 1308 | 1313 | ** --mimetype MIMETYPE mimetype of check-in comment |
| 1309 | 1314 | ** -n|--dry-run If given, display instead of run actions |
| @@ -1372,10 +1377,11 @@ | ||
| 1372 | 1377 | allowOlder = find_option("allow-older",0,0)!=0; |
| 1373 | 1378 | noWarningFlag = find_option("no-warnings", 0, 0)!=0; |
| 1374 | 1379 | sCiInfo.zBranch = find_option("branch","b",1); |
| 1375 | 1380 | sCiInfo.zColor = find_option("bgcolor",0,1); |
| 1376 | 1381 | sCiInfo.zBrClr = find_option("branchcolor",0,1); |
| 1382 | + sCiInfo.closeFlag = find_option("close",0,0)!=0; | |
| 1377 | 1383 | sCiInfo.zMimetype = find_option("mimetype",0,1); |
| 1378 | 1384 | while( (zTag = find_option("tag",0,1))!=0 ){ |
| 1379 | 1385 | if( zTag[0]==0 ) continue; |
| 1380 | 1386 | sCiInfo.azTag = fossil_realloc((void*)sCiInfo.azTag, sizeof(char*)*(nTag+2)); |
| 1381 | 1387 | sCiInfo.azTag[nTag++] = zTag; |
| 1382 | 1388 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -880,10 +880,11 @@ | |
| 880 | */ |
| 881 | struct CheckinInfo { |
| 882 | Blob *pComment; /* Check-in comment text */ |
| 883 | const char *zMimetype; /* Mimetype of check-in command. May be NULL */ |
| 884 | int verifyDate; /* Verify that child is younger */ |
| 885 | Blob *pCksum; /* Repository checksum. May be 0 */ |
| 886 | const char *zDateOvrd; /* Date override. If 0 then use 'now' */ |
| 887 | const char *zUserOvrd; /* User override. If 0 then use g.zLogin */ |
| 888 | const char *zBranch; /* Branch name. May be 0 */ |
| 889 | const char *zColor; /* One-time background color. May be 0 */ |
| @@ -1059,10 +1060,13 @@ | |
| 1059 | } |
| 1060 | if( zColor && zColor[0] ){ |
| 1061 | /* One-time background color */ |
| 1062 | blob_appendf(pOut, "T +bgcolor * %F\n", zColor); |
| 1063 | } |
| 1064 | db_prepare(&q, "SELECT uuid,merge FROM vmerge JOIN blob ON merge=rid" |
| 1065 | " WHERE id=-4 ORDER BY 1"); |
| 1066 | while( db_step(&q)==SQLITE_ROW ){ |
| 1067 | const char *zIntegrateUuid = db_column_text(&q, 0); |
| 1068 | int rid = db_column_int(&q, 1); |
| @@ -1300,10 +1304,11 @@ | |
| 1300 | ** --allow-older allow a commit older than its ancestor |
| 1301 | ** --baseline use a baseline manifest in the commit process |
| 1302 | ** --bgcolor COLOR apply COLOR to this one check-in only |
| 1303 | ** --branch NEW-BRANCH-NAME check in to this new branch |
| 1304 | ** --branchcolor COLOR apply given COLOR to the branch |
| 1305 | ** --delta use a delta manifest in the commit process |
| 1306 | ** -m|--comment COMMENT-TEXT use COMMENT-TEXT as commit comment |
| 1307 | ** -M|--message-file FILE read the commit comment from given file |
| 1308 | ** --mimetype MIMETYPE mimetype of check-in comment |
| 1309 | ** -n|--dry-run If given, display instead of run actions |
| @@ -1372,10 +1377,11 @@ | |
| 1372 | allowOlder = find_option("allow-older",0,0)!=0; |
| 1373 | noWarningFlag = find_option("no-warnings", 0, 0)!=0; |
| 1374 | sCiInfo.zBranch = find_option("branch","b",1); |
| 1375 | sCiInfo.zColor = find_option("bgcolor",0,1); |
| 1376 | sCiInfo.zBrClr = find_option("branchcolor",0,1); |
| 1377 | sCiInfo.zMimetype = find_option("mimetype",0,1); |
| 1378 | while( (zTag = find_option("tag",0,1))!=0 ){ |
| 1379 | if( zTag[0]==0 ) continue; |
| 1380 | sCiInfo.azTag = fossil_realloc((void*)sCiInfo.azTag, sizeof(char*)*(nTag+2)); |
| 1381 | sCiInfo.azTag[nTag++] = zTag; |
| 1382 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -880,10 +880,11 @@ | |
| 880 | */ |
| 881 | struct CheckinInfo { |
| 882 | Blob *pComment; /* Check-in comment text */ |
| 883 | const char *zMimetype; /* Mimetype of check-in command. May be NULL */ |
| 884 | int verifyDate; /* Verify that child is younger */ |
| 885 | int closeFlag; /* Close the branch being committed */ |
| 886 | Blob *pCksum; /* Repository checksum. May be 0 */ |
| 887 | const char *zDateOvrd; /* Date override. If 0 then use 'now' */ |
| 888 | const char *zUserOvrd; /* User override. If 0 then use g.zLogin */ |
| 889 | const char *zBranch; /* Branch name. May be 0 */ |
| 890 | const char *zColor; /* One-time background color. May be 0 */ |
| @@ -1059,10 +1060,13 @@ | |
| 1060 | } |
| 1061 | if( zColor && zColor[0] ){ |
| 1062 | /* One-time background color */ |
| 1063 | blob_appendf(pOut, "T +bgcolor * %F\n", zColor); |
| 1064 | } |
| 1065 | if( p->closeFlag ){ |
| 1066 | blob_appendf(pOut, "T +closed *\n"); |
| 1067 | } |
| 1068 | db_prepare(&q, "SELECT uuid,merge FROM vmerge JOIN blob ON merge=rid" |
| 1069 | " WHERE id=-4 ORDER BY 1"); |
| 1070 | while( db_step(&q)==SQLITE_ROW ){ |
| 1071 | const char *zIntegrateUuid = db_column_text(&q, 0); |
| 1072 | int rid = db_column_int(&q, 1); |
| @@ -1300,10 +1304,11 @@ | |
| 1304 | ** --allow-older allow a commit older than its ancestor |
| 1305 | ** --baseline use a baseline manifest in the commit process |
| 1306 | ** --bgcolor COLOR apply COLOR to this one check-in only |
| 1307 | ** --branch NEW-BRANCH-NAME check in to this new branch |
| 1308 | ** --branchcolor COLOR apply given COLOR to the branch |
| 1309 | ** --close close the branch being committed |
| 1310 | ** --delta use a delta manifest in the commit process |
| 1311 | ** -m|--comment COMMENT-TEXT use COMMENT-TEXT as commit comment |
| 1312 | ** -M|--message-file FILE read the commit comment from given file |
| 1313 | ** --mimetype MIMETYPE mimetype of check-in comment |
| 1314 | ** -n|--dry-run If given, display instead of run actions |
| @@ -1372,10 +1377,11 @@ | |
| 1377 | allowOlder = find_option("allow-older",0,0)!=0; |
| 1378 | noWarningFlag = find_option("no-warnings", 0, 0)!=0; |
| 1379 | sCiInfo.zBranch = find_option("branch","b",1); |
| 1380 | sCiInfo.zColor = find_option("bgcolor",0,1); |
| 1381 | sCiInfo.zBrClr = find_option("branchcolor",0,1); |
| 1382 | sCiInfo.closeFlag = find_option("close",0,0)!=0; |
| 1383 | sCiInfo.zMimetype = find_option("mimetype",0,1); |
| 1384 | while( (zTag = find_option("tag",0,1))!=0 ){ |
| 1385 | if( zTag[0]==0 ) continue; |
| 1386 | sCiInfo.azTag = fossil_realloc((void*)sCiInfo.azTag, sizeof(char*)*(nTag+2)); |
| 1387 | sCiInfo.azTag[nTag++] = zTag; |
| 1388 |
+2
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -13,10 +13,12 @@ | ||
| 13 | 13 | to a specific year and calendar week number, e.g. [/timeline?yw=2013-01]. |
| 14 | 14 | * Fixed an obscure condition under which an assertion failure could overwrite |
| 15 | 15 | part of a repository database file, corrupting it. This problem has only |
| 16 | 16 | been seen once in the wild. |
| 17 | 17 | * Added support for unlimited line lengths in side-by-side diffs. |
| 18 | + * New --close option to [/help?cmd=commit | fossil commit], which | |
| 19 | + immediately closes the branch being committed. | |
| 18 | 20 | |
| 19 | 21 | <h2>Changes For Version 1.26 (2013-06-18)</h2> |
| 20 | 22 | * The argument to the --port option for the [/help?cmd=ui | fossil ui] and |
| 21 | 23 | [/help?cmd=server | fossil server] commands can take an IP address in addition |
| 22 | 24 | to the port number, causing Fossil to bind to just that one IP address. |
| 23 | 25 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -13,10 +13,12 @@ | |
| 13 | to a specific year and calendar week number, e.g. [/timeline?yw=2013-01]. |
| 14 | * Fixed an obscure condition under which an assertion failure could overwrite |
| 15 | part of a repository database file, corrupting it. This problem has only |
| 16 | been seen once in the wild. |
| 17 | * Added support for unlimited line lengths in side-by-side diffs. |
| 18 | |
| 19 | <h2>Changes For Version 1.26 (2013-06-18)</h2> |
| 20 | * The argument to the --port option for the [/help?cmd=ui | fossil ui] and |
| 21 | [/help?cmd=server | fossil server] commands can take an IP address in addition |
| 22 | to the port number, causing Fossil to bind to just that one IP address. |
| 23 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -13,10 +13,12 @@ | |
| 13 | to a specific year and calendar week number, e.g. [/timeline?yw=2013-01]. |
| 14 | * Fixed an obscure condition under which an assertion failure could overwrite |
| 15 | part of a repository database file, corrupting it. This problem has only |
| 16 | been seen once in the wild. |
| 17 | * Added support for unlimited line lengths in side-by-side diffs. |
| 18 | * New --close option to [/help?cmd=commit | fossil commit], which |
| 19 | immediately closes the branch being committed. |
| 20 | |
| 21 | <h2>Changes For Version 1.26 (2013-06-18)</h2> |
| 22 | * The argument to the --port option for the [/help?cmd=ui | fossil ui] and |
| 23 | [/help?cmd=server | fossil server] commands can take an IP address in addition |
| 24 | to the port number, causing Fossil to bind to just that one IP address. |
| 25 |