Fossil SCM

New --close option to "fossil [/help?cmd=commit|commit]", which immediately closes the branch being committed.

jan.nijtmans 2013-09-04 18:43 trunk merge
Commit abf727105daa183a1f8b66699faaeb1607bb69aa
--- src/checkin.c
+++ src/checkin.c
@@ -880,10 +880,11 @@
880880
*/
881881
struct CheckinInfo {
882882
Blob *pComment; /* Check-in comment text */
883883
const char *zMimetype; /* Mimetype of check-in command. May be NULL */
884884
int verifyDate; /* Verify that child is younger */
885
+ int closeFlag; /* Close the branch being committed */
885886
Blob *pCksum; /* Repository checksum. May be 0 */
886887
const char *zDateOvrd; /* Date override. If 0 then use 'now' */
887888
const char *zUserOvrd; /* User override. If 0 then use g.zLogin */
888889
const char *zBranch; /* Branch name. May be 0 */
889890
const char *zColor; /* One-time background color. May be 0 */
@@ -1059,10 +1060,13 @@
10591060
}
10601061
if( zColor && zColor[0] ){
10611062
/* One-time background color */
10621063
blob_appendf(pOut, "T +bgcolor * %F\n", zColor);
10631064
}
1065
+ if( p->closeFlag ){
1066
+ blob_appendf(pOut, "T +closed *\n");
1067
+ }
10641068
db_prepare(&q, "SELECT uuid,merge FROM vmerge JOIN blob ON merge=rid"
10651069
" WHERE id=-4 ORDER BY 1");
10661070
while( db_step(&q)==SQLITE_ROW ){
10671071
const char *zIntegrateUuid = db_column_text(&q, 0);
10681072
int rid = db_column_int(&q, 1);
@@ -1300,10 +1304,11 @@
13001304
** --allow-older allow a commit older than its ancestor
13011305
** --baseline use a baseline manifest in the commit process
13021306
** --bgcolor COLOR apply COLOR to this one check-in only
13031307
** --branch NEW-BRANCH-NAME check in to this new branch
13041308
** --branchcolor COLOR apply given COLOR to the branch
1309
+** --close close the branch being committed
13051310
** --delta use a delta manifest in the commit process
13061311
** -m|--comment COMMENT-TEXT use COMMENT-TEXT as commit comment
13071312
** -M|--message-file FILE read the commit comment from given file
13081313
** --mimetype MIMETYPE mimetype of check-in comment
13091314
** -n|--dry-run If given, display instead of run actions
@@ -1372,10 +1377,11 @@
13721377
allowOlder = find_option("allow-older",0,0)!=0;
13731378
noWarningFlag = find_option("no-warnings", 0, 0)!=0;
13741379
sCiInfo.zBranch = find_option("branch","b",1);
13751380
sCiInfo.zColor = find_option("bgcolor",0,1);
13761381
sCiInfo.zBrClr = find_option("branchcolor",0,1);
1382
+ sCiInfo.closeFlag = find_option("close",0,0)!=0;
13771383
sCiInfo.zMimetype = find_option("mimetype",0,1);
13781384
while( (zTag = find_option("tag",0,1))!=0 ){
13791385
if( zTag[0]==0 ) continue;
13801386
sCiInfo.azTag = fossil_realloc((void*)sCiInfo.azTag, sizeof(char*)*(nTag+2));
13811387
sCiInfo.azTag[nTag++] = zTag;
13821388
--- 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
--- www/changes.wiki
+++ www/changes.wiki
@@ -13,10 +13,12 @@
1313
to a specific year and calendar week number, e.g. [/timeline?yw=2013-01].
1414
* Fixed an obscure condition under which an assertion failure could overwrite
1515
part of a repository database file, corrupting it. This problem has only
1616
been seen once in the wild.
1717
* 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.
1820
1921
<h2>Changes For Version 1.26 (2013-06-18)</h2>
2022
* The argument to the --port option for the [/help?cmd=ui | fossil ui] and
2123
[/help?cmd=server | fossil server] commands can take an IP address in addition
2224
to the port number, causing Fossil to bind to just that one IP address.
2325
--- 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

Keyboard Shortcuts

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