Fossil SCM
Add the global --comment-format command-line option and the "comment-format" setting for controlling the display of the command-line timeline.
Commit
2476b8121e5dde5e0777368faf326a3a088305738c9aafa685bce54766a08c21
Parent
357d5e82ad4bc2a…
15 files changed
+1
-1
+30
-1
+1
+23
+1
-1
+1
+2
-2
+1
-1
+6
-2
+2
-2
+3
-3
+1
-1
+1
-1
+1
-1
+2
-1
+1
-1
| --- src/bisect.c | ||
| +++ src/bisect.c | ||
| @@ -477,11 +477,11 @@ | ||
| 477 | 477 | for(i=0; i<count(aBisectOption); i++){ |
| 478 | 478 | char *z = mprintf("bisect-%s", aBisectOption[i].zName); |
| 479 | 479 | fossil_print(" %-15s %-6s ", aBisectOption[i].zName, |
| 480 | 480 | db_lget(z, (char*)aBisectOption[i].zDefault)); |
| 481 | 481 | fossil_free(z); |
| 482 | - comment_print(aBisectOption[i].zDesc, 0, 27, -1, g.comFmtFlags); | |
| 482 | + comment_print(aBisectOption[i].zDesc, 0, 27, -1, get_comment_format()); | |
| 483 | 483 | } |
| 484 | 484 | }else if( g.argc==4 || g.argc==5 ){ |
| 485 | 485 | unsigned int i; |
| 486 | 486 | n = strlen(g.argv[3]); |
| 487 | 487 | for(i=0; i<count(aBisectOption); i++){ |
| 488 | 488 |
| --- src/bisect.c | |
| +++ src/bisect.c | |
| @@ -477,11 +477,11 @@ | |
| 477 | for(i=0; i<count(aBisectOption); i++){ |
| 478 | char *z = mprintf("bisect-%s", aBisectOption[i].zName); |
| 479 | fossil_print(" %-15s %-6s ", aBisectOption[i].zName, |
| 480 | db_lget(z, (char*)aBisectOption[i].zDefault)); |
| 481 | fossil_free(z); |
| 482 | comment_print(aBisectOption[i].zDesc, 0, 27, -1, g.comFmtFlags); |
| 483 | } |
| 484 | }else if( g.argc==4 || g.argc==5 ){ |
| 485 | unsigned int i; |
| 486 | n = strlen(g.argv[3]); |
| 487 | for(i=0; i<count(aBisectOption); i++){ |
| 488 |
| --- src/bisect.c | |
| +++ src/bisect.c | |
| @@ -477,11 +477,11 @@ | |
| 477 | for(i=0; i<count(aBisectOption); i++){ |
| 478 | char *z = mprintf("bisect-%s", aBisectOption[i].zName); |
| 479 | fossil_print(" %-15s %-6s ", aBisectOption[i].zName, |
| 480 | db_lget(z, (char*)aBisectOption[i].zDefault)); |
| 481 | fossil_free(z); |
| 482 | comment_print(aBisectOption[i].zDesc, 0, 27, -1, get_comment_format()); |
| 483 | } |
| 484 | }else if( g.argc==4 || g.argc==5 ){ |
| 485 | unsigned int i; |
| 486 | n = strlen(g.argv[3]); |
| 487 | for(i=0; i<count(aBisectOption); i++){ |
| 488 |
+30
-1
| --- src/comformat.c | ||
| +++ src/comformat.c | ||
| @@ -27,17 +27,18 @@ | ||
| 27 | 27 | # include <termios.h> |
| 28 | 28 | # include <sys/ioctl.h> |
| 29 | 29 | #endif |
| 30 | 30 | |
| 31 | 31 | #if INTERFACE |
| 32 | -#define COMMENT_PRINT_NONE ((u32)0x00000000) /* No flags. */ | |
| 32 | +#define COMMENT_PRINT_NONE ((u32)0x00000000) /* No flags = non-legacy. */ | |
| 33 | 33 | #define COMMENT_PRINT_LEGACY ((u32)0x00000001) /* Use legacy algorithm. */ |
| 34 | 34 | #define COMMENT_PRINT_TRIM_CRLF ((u32)0x00000002) /* Trim leading CR/LF. */ |
| 35 | 35 | #define COMMENT_PRINT_TRIM_SPACE ((u32)0x00000004) /* Trim leading/trailing. */ |
| 36 | 36 | #define COMMENT_PRINT_WORD_BREAK ((u32)0x00000008) /* Break lines on words. */ |
| 37 | 37 | #define COMMENT_PRINT_ORIG_BREAK ((u32)0x00000010) /* Break before original. */ |
| 38 | 38 | #define COMMENT_PRINT_DEFAULT (COMMENT_PRINT_LEGACY) /* Defaults. */ |
| 39 | +#define COMMENT_PRINT_UNSET (-1) /* Not initialized. */ | |
| 39 | 40 | #endif |
| 40 | 41 | |
| 41 | 42 | /* |
| 42 | 43 | ** This is the previous value used by most external callers when they |
| 43 | 44 | ** needed to specify a default maximum line length to be used with the |
| @@ -514,10 +515,38 @@ | ||
| 514 | 515 | &lineCnt, &zLine); |
| 515 | 516 | if( !zLine || !zLine[0] ) break; |
| 516 | 517 | } |
| 517 | 518 | return lineCnt; |
| 518 | 519 | } |
| 520 | + | |
| 521 | +/* | |
| 522 | +** Return the "COMMENT_PRINT_*" flags specified by the following sources, | |
| 523 | +** evaluated in the following cascading order: | |
| 524 | +** | |
| 525 | +** 1. The global --comfmtflags (alias --comment-format) command-line option. | |
| 526 | +** 2. The local (per-repository) "comment-format" setting. | |
| 527 | +** 3. The global (all-repositories) "comment-format" setting. | |
| 528 | +** 4. The default value COMMENT_PRINT_DEFAULT. | |
| 529 | +*/ | |
| 530 | +int get_comment_format(){ | |
| 531 | + int comFmtFlags; | |
| 532 | + /* The global command-line option is present, or the value has been cached. */ | |
| 533 | + if( g.comFmtFlags!=COMMENT_PRINT_UNSET ){ | |
| 534 | + comFmtFlags = g.comFmtFlags; | |
| 535 | + return comFmtFlags; | |
| 536 | + } | |
| 537 | + /* Load the local (per-repository) or global (all-repositories) value, and use | |
| 538 | + ** g.comFmtFlags as a cache. */ | |
| 539 | + comFmtFlags = db_get_int("comment-format", COMMENT_PRINT_UNSET); | |
| 540 | + if( comFmtFlags!=COMMENT_PRINT_UNSET ){ | |
| 541 | + g.comFmtFlags = comFmtFlags; | |
| 542 | + return comFmtFlags; | |
| 543 | + } | |
| 544 | + /* Fallback to the default value. */ | |
| 545 | + comFmtFlags = COMMENT_PRINT_DEFAULT; | |
| 546 | + return comFmtFlags; | |
| 547 | +} | |
| 519 | 548 | |
| 520 | 549 | /* |
| 521 | 550 | ** |
| 522 | 551 | ** COMMAND: test-comment-format |
| 523 | 552 | ** |
| 524 | 553 |
| --- src/comformat.c | |
| +++ src/comformat.c | |
| @@ -27,17 +27,18 @@ | |
| 27 | # include <termios.h> |
| 28 | # include <sys/ioctl.h> |
| 29 | #endif |
| 30 | |
| 31 | #if INTERFACE |
| 32 | #define COMMENT_PRINT_NONE ((u32)0x00000000) /* No flags. */ |
| 33 | #define COMMENT_PRINT_LEGACY ((u32)0x00000001) /* Use legacy algorithm. */ |
| 34 | #define COMMENT_PRINT_TRIM_CRLF ((u32)0x00000002) /* Trim leading CR/LF. */ |
| 35 | #define COMMENT_PRINT_TRIM_SPACE ((u32)0x00000004) /* Trim leading/trailing. */ |
| 36 | #define COMMENT_PRINT_WORD_BREAK ((u32)0x00000008) /* Break lines on words. */ |
| 37 | #define COMMENT_PRINT_ORIG_BREAK ((u32)0x00000010) /* Break before original. */ |
| 38 | #define COMMENT_PRINT_DEFAULT (COMMENT_PRINT_LEGACY) /* Defaults. */ |
| 39 | #endif |
| 40 | |
| 41 | /* |
| 42 | ** This is the previous value used by most external callers when they |
| 43 | ** needed to specify a default maximum line length to be used with the |
| @@ -514,10 +515,38 @@ | |
| 514 | &lineCnt, &zLine); |
| 515 | if( !zLine || !zLine[0] ) break; |
| 516 | } |
| 517 | return lineCnt; |
| 518 | } |
| 519 | |
| 520 | /* |
| 521 | ** |
| 522 | ** COMMAND: test-comment-format |
| 523 | ** |
| 524 |
| --- src/comformat.c | |
| +++ src/comformat.c | |
| @@ -27,17 +27,18 @@ | |
| 27 | # include <termios.h> |
| 28 | # include <sys/ioctl.h> |
| 29 | #endif |
| 30 | |
| 31 | #if INTERFACE |
| 32 | #define COMMENT_PRINT_NONE ((u32)0x00000000) /* No flags = non-legacy. */ |
| 33 | #define COMMENT_PRINT_LEGACY ((u32)0x00000001) /* Use legacy algorithm. */ |
| 34 | #define COMMENT_PRINT_TRIM_CRLF ((u32)0x00000002) /* Trim leading CR/LF. */ |
| 35 | #define COMMENT_PRINT_TRIM_SPACE ((u32)0x00000004) /* Trim leading/trailing. */ |
| 36 | #define COMMENT_PRINT_WORD_BREAK ((u32)0x00000008) /* Break lines on words. */ |
| 37 | #define COMMENT_PRINT_ORIG_BREAK ((u32)0x00000010) /* Break before original. */ |
| 38 | #define COMMENT_PRINT_DEFAULT (COMMENT_PRINT_LEGACY) /* Defaults. */ |
| 39 | #define COMMENT_PRINT_UNSET (-1) /* Not initialized. */ |
| 40 | #endif |
| 41 | |
| 42 | /* |
| 43 | ** This is the previous value used by most external callers when they |
| 44 | ** needed to specify a default maximum line length to be used with the |
| @@ -514,10 +515,38 @@ | |
| 515 | &lineCnt, &zLine); |
| 516 | if( !zLine || !zLine[0] ) break; |
| 517 | } |
| 518 | return lineCnt; |
| 519 | } |
| 520 | |
| 521 | /* |
| 522 | ** Return the "COMMENT_PRINT_*" flags specified by the following sources, |
| 523 | ** evaluated in the following cascading order: |
| 524 | ** |
| 525 | ** 1. The global --comfmtflags (alias --comment-format) command-line option. |
| 526 | ** 2. The local (per-repository) "comment-format" setting. |
| 527 | ** 3. The global (all-repositories) "comment-format" setting. |
| 528 | ** 4. The default value COMMENT_PRINT_DEFAULT. |
| 529 | */ |
| 530 | int get_comment_format(){ |
| 531 | int comFmtFlags; |
| 532 | /* The global command-line option is present, or the value has been cached. */ |
| 533 | if( g.comFmtFlags!=COMMENT_PRINT_UNSET ){ |
| 534 | comFmtFlags = g.comFmtFlags; |
| 535 | return comFmtFlags; |
| 536 | } |
| 537 | /* Load the local (per-repository) or global (all-repositories) value, and use |
| 538 | ** g.comFmtFlags as a cache. */ |
| 539 | comFmtFlags = db_get_int("comment-format", COMMENT_PRINT_UNSET); |
| 540 | if( comFmtFlags!=COMMENT_PRINT_UNSET ){ |
| 541 | g.comFmtFlags = comFmtFlags; |
| 542 | return comFmtFlags; |
| 543 | } |
| 544 | /* Fallback to the default value. */ |
| 545 | comFmtFlags = COMMENT_PRINT_DEFAULT; |
| 546 | return comFmtFlags; |
| 547 | } |
| 548 | |
| 549 | /* |
| 550 | ** |
| 551 | ** COMMAND: test-comment-format |
| 552 | ** |
| 553 |
+1
| --- src/configure.c | ||
| +++ src/configure.c | ||
| @@ -136,10 +136,11 @@ | ||
| 136 | 136 | { "allow-symlinks", CONFIGSET_PROJ }, |
| 137 | 137 | { "dotfiles", CONFIGSET_PROJ }, |
| 138 | 138 | { "parent-project-code", CONFIGSET_PROJ }, |
| 139 | 139 | { "parent-project-name", CONFIGSET_PROJ }, |
| 140 | 140 | { "hash-policy", CONFIGSET_PROJ }, |
| 141 | + { "comment-format", CONFIGSET_PROJ }, | |
| 141 | 142 | |
| 142 | 143 | #ifdef FOSSIL_ENABLE_LEGACY_MV_RM |
| 143 | 144 | { "mv-rm-files", CONFIGSET_PROJ }, |
| 144 | 145 | #endif |
| 145 | 146 | |
| 146 | 147 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -136,10 +136,11 @@ | |
| 136 | { "allow-symlinks", CONFIGSET_PROJ }, |
| 137 | { "dotfiles", CONFIGSET_PROJ }, |
| 138 | { "parent-project-code", CONFIGSET_PROJ }, |
| 139 | { "parent-project-name", CONFIGSET_PROJ }, |
| 140 | { "hash-policy", CONFIGSET_PROJ }, |
| 141 | |
| 142 | #ifdef FOSSIL_ENABLE_LEGACY_MV_RM |
| 143 | { "mv-rm-files", CONFIGSET_PROJ }, |
| 144 | #endif |
| 145 | |
| 146 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -136,10 +136,11 @@ | |
| 136 | { "allow-symlinks", CONFIGSET_PROJ }, |
| 137 | { "dotfiles", CONFIGSET_PROJ }, |
| 138 | { "parent-project-code", CONFIGSET_PROJ }, |
| 139 | { "parent-project-name", CONFIGSET_PROJ }, |
| 140 | { "hash-policy", CONFIGSET_PROJ }, |
| 141 | { "comment-format", CONFIGSET_PROJ }, |
| 142 | |
| 143 | #ifdef FOSSIL_ENABLE_LEGACY_MV_RM |
| 144 | { "mv-rm-files", CONFIGSET_PROJ }, |
| 145 | #endif |
| 146 | |
| 147 |
M
src/db.c
+23
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -3169,10 +3169,33 @@ | ||
| 3169 | 3169 | /* |
| 3170 | 3170 | ** SETTING: clearsign boolean default=off |
| 3171 | 3171 | ** When enabled, fossil will attempt to sign all commits |
| 3172 | 3172 | ** with gpg. When disabled, commits will be unsigned. |
| 3173 | 3173 | */ |
| 3174 | +/* | |
| 3175 | +** SETTING: comment-format width=16 default=1 | |
| 3176 | +** Set the default options for printing timeline comments to the console. | |
| 3177 | +** | |
| 3178 | +** The global --comfmtflags command-line option (or alias --comment-format) | |
| 3179 | +** overrides this setting. | |
| 3180 | +** | |
| 3181 | +** Possible values are: | |
| 3182 | +** 1 Activate the legacy comment printing format (default). | |
| 3183 | +** | |
| 3184 | +** Or a bitwise combination of the following flags: | |
| 3185 | +** 0 Activate the newer (non-legacy) comment printing format. | |
| 3186 | +** 2 Trim leading and trailing CR and LF characters. | |
| 3187 | +** 4 Trim leading and trailing white space characters. | |
| 3188 | +** 8 Attempt to break lines on word boundaries. | |
| 3189 | +** 16 Break lines before the original comment embedded in other text. | |
| 3190 | +** | |
| 3191 | +** Note: To preserve line breaks, activate the newer (non-legacy) comment | |
| 3192 | +** printing format (i.e. set to "0", or a combination not including "1"). | |
| 3193 | +** | |
| 3194 | +** Note: The options for timeline comments displayed on the web UI can be | |
| 3195 | +** configured through the /setup_timeline web page. | |
| 3196 | +*/ | |
| 3174 | 3197 | /* |
| 3175 | 3198 | ** SETTING: crlf-glob width=40 versionable block-text |
| 3176 | 3199 | ** The value is a comma or newline-separated list of GLOB patterns for |
| 3177 | 3200 | ** text files in which it is ok to have CR, CR+LF or mixed |
| 3178 | 3201 | ** line endings. Set to "*" to disable CR+LF checking. |
| 3179 | 3202 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -3169,10 +3169,33 @@ | |
| 3169 | /* |
| 3170 | ** SETTING: clearsign boolean default=off |
| 3171 | ** When enabled, fossil will attempt to sign all commits |
| 3172 | ** with gpg. When disabled, commits will be unsigned. |
| 3173 | */ |
| 3174 | /* |
| 3175 | ** SETTING: crlf-glob width=40 versionable block-text |
| 3176 | ** The value is a comma or newline-separated list of GLOB patterns for |
| 3177 | ** text files in which it is ok to have CR, CR+LF or mixed |
| 3178 | ** line endings. Set to "*" to disable CR+LF checking. |
| 3179 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -3169,10 +3169,33 @@ | |
| 3169 | /* |
| 3170 | ** SETTING: clearsign boolean default=off |
| 3171 | ** When enabled, fossil will attempt to sign all commits |
| 3172 | ** with gpg. When disabled, commits will be unsigned. |
| 3173 | */ |
| 3174 | /* |
| 3175 | ** SETTING: comment-format width=16 default=1 |
| 3176 | ** Set the default options for printing timeline comments to the console. |
| 3177 | ** |
| 3178 | ** The global --comfmtflags command-line option (or alias --comment-format) |
| 3179 | ** overrides this setting. |
| 3180 | ** |
| 3181 | ** Possible values are: |
| 3182 | ** 1 Activate the legacy comment printing format (default). |
| 3183 | ** |
| 3184 | ** Or a bitwise combination of the following flags: |
| 3185 | ** 0 Activate the newer (non-legacy) comment printing format. |
| 3186 | ** 2 Trim leading and trailing CR and LF characters. |
| 3187 | ** 4 Trim leading and trailing white space characters. |
| 3188 | ** 8 Attempt to break lines on word boundaries. |
| 3189 | ** 16 Break lines before the original comment embedded in other text. |
| 3190 | ** |
| 3191 | ** Note: To preserve line breaks, activate the newer (non-legacy) comment |
| 3192 | ** printing format (i.e. set to "0", or a combination not including "1"). |
| 3193 | ** |
| 3194 | ** Note: The options for timeline comments displayed on the web UI can be |
| 3195 | ** configured through the /setup_timeline web page. |
| 3196 | */ |
| 3197 | /* |
| 3198 | ** SETTING: crlf-glob width=40 versionable block-text |
| 3199 | ** The value is a comma or newline-separated list of GLOB patterns for |
| 3200 | ** text files in which it is ok to have CR, CR+LF or mixed |
| 3201 | ** line endings. Set to "*" to disable CR+LF checking. |
| 3202 |
+1
-1
| --- src/descendants.c | ||
| +++ src/descendants.c | ||
| @@ -433,11 +433,11 @@ | ||
| 433 | 433 | } |
| 434 | 434 | n++; |
| 435 | 435 | sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n); |
| 436 | 436 | fossil_print("%6s ", zLineNo); |
| 437 | 437 | z = mprintf("%s [%S] %s", zDate, zId, zCom); |
| 438 | - comment_print(z, zCom, 7, width, g.comFmtFlags); | |
| 438 | + comment_print(z, zCom, 7, width, get_comment_format()); | |
| 439 | 439 | fossil_free(z); |
| 440 | 440 | } |
| 441 | 441 | fossil_free(zLastBr); |
| 442 | 442 | db_finalize(&q); |
| 443 | 443 | } |
| 444 | 444 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -433,11 +433,11 @@ | |
| 433 | } |
| 434 | n++; |
| 435 | sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n); |
| 436 | fossil_print("%6s ", zLineNo); |
| 437 | z = mprintf("%s [%S] %s", zDate, zId, zCom); |
| 438 | comment_print(z, zCom, 7, width, g.comFmtFlags); |
| 439 | fossil_free(z); |
| 440 | } |
| 441 | fossil_free(zLastBr); |
| 442 | db_finalize(&q); |
| 443 | } |
| 444 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -433,11 +433,11 @@ | |
| 433 | } |
| 434 | n++; |
| 435 | sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n); |
| 436 | fossil_print("%6s ", zLineNo); |
| 437 | z = mprintf("%s [%S] %s", zDate, zId, zCom); |
| 438 | comment_print(z, zCom, 7, width, get_comment_format()); |
| 439 | fossil_free(z); |
| 440 | } |
| 441 | fossil_free(zLastBr); |
| 442 | db_finalize(&q); |
| 443 | } |
| 444 |
+1
| --- src/dispatch.c | ||
| +++ src/dispatch.c | ||
| @@ -501,10 +501,11 @@ | ||
| 501 | 501 | @ Command-line options common to all commands: |
| 502 | 502 | @ |
| 503 | 503 | @ --args FILENAME Read additional arguments and options from FILENAME |
| 504 | 504 | @ --cgitrace Active CGI tracing |
| 505 | 505 | @ --comfmtflags VALUE Set comment formatting flags to VALUE |
| 506 | +@ --comment-format VALUE Alias for --comfmtflags | |
| 506 | 507 | @ --errorlog FILENAME Log errors to FILENAME |
| 507 | 508 | @ --help Show help on the command rather than running it |
| 508 | 509 | @ --httptrace Trace outbound HTTP requests |
| 509 | 510 | @ --localtime Display times using the local timezone |
| 510 | 511 | @ --no-th-hook Do not run TH1 hooks |
| 511 | 512 |
| --- src/dispatch.c | |
| +++ src/dispatch.c | |
| @@ -501,10 +501,11 @@ | |
| 501 | @ Command-line options common to all commands: |
| 502 | @ |
| 503 | @ --args FILENAME Read additional arguments and options from FILENAME |
| 504 | @ --cgitrace Active CGI tracing |
| 505 | @ --comfmtflags VALUE Set comment formatting flags to VALUE |
| 506 | @ --errorlog FILENAME Log errors to FILENAME |
| 507 | @ --help Show help on the command rather than running it |
| 508 | @ --httptrace Trace outbound HTTP requests |
| 509 | @ --localtime Display times using the local timezone |
| 510 | @ --no-th-hook Do not run TH1 hooks |
| 511 |
| --- src/dispatch.c | |
| +++ src/dispatch.c | |
| @@ -501,10 +501,11 @@ | |
| 501 | @ Command-line options common to all commands: |
| 502 | @ |
| 503 | @ --args FILENAME Read additional arguments and options from FILENAME |
| 504 | @ --cgitrace Active CGI tracing |
| 505 | @ --comfmtflags VALUE Set comment formatting flags to VALUE |
| 506 | @ --comment-format VALUE Alias for --comfmtflags |
| 507 | @ --errorlog FILENAME Log errors to FILENAME |
| 508 | @ --help Show help on the command rather than running it |
| 509 | @ --httptrace Trace outbound HTTP requests |
| 510 | @ --localtime Display times using the local timezone |
| 511 | @ --no-th-hook Do not run TH1 hooks |
| 512 |
+2
-2
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -215,20 +215,20 @@ | ||
| 215 | 215 | if( iBrief ){ |
| 216 | 216 | fossil_print("%s ", zDate); |
| 217 | 217 | zOut = mprintf( |
| 218 | 218 | "[%S] %s (user: %s, artifact: [%S], branch: %s)", |
| 219 | 219 | zCiUuid, zCom, zUser, zFileUuid, zBr); |
| 220 | - comment_print(zOut, zCom, 11, iWidth, g.comFmtFlags); | |
| 220 | + comment_print(zOut, zCom, 11, iWidth, get_comment_format()); | |
| 221 | 221 | fossil_free(zOut); |
| 222 | 222 | }else{ |
| 223 | 223 | blob_reset(&line); |
| 224 | 224 | blob_appendf(&line, "%S ", zCiUuid); |
| 225 | 225 | blob_appendf(&line, "%.10s ", zDate); |
| 226 | 226 | blob_appendf(&line, "%8.8s ", zUser); |
| 227 | 227 | blob_appendf(&line, "%8.8s ", zBr); |
| 228 | 228 | blob_appendf(&line,"%-39.39s", zCom ); |
| 229 | - comment_print(blob_str(&line), zCom, 0, iWidth, g.comFmtFlags); | |
| 229 | + comment_print(blob_str(&line), zCom, 0, iWidth, get_comment_format()); | |
| 230 | 230 | } |
| 231 | 231 | } |
| 232 | 232 | db_finalize(&q); |
| 233 | 233 | blob_reset(&fname); |
| 234 | 234 | } |
| 235 | 235 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -215,20 +215,20 @@ | |
| 215 | if( iBrief ){ |
| 216 | fossil_print("%s ", zDate); |
| 217 | zOut = mprintf( |
| 218 | "[%S] %s (user: %s, artifact: [%S], branch: %s)", |
| 219 | zCiUuid, zCom, zUser, zFileUuid, zBr); |
| 220 | comment_print(zOut, zCom, 11, iWidth, g.comFmtFlags); |
| 221 | fossil_free(zOut); |
| 222 | }else{ |
| 223 | blob_reset(&line); |
| 224 | blob_appendf(&line, "%S ", zCiUuid); |
| 225 | blob_appendf(&line, "%.10s ", zDate); |
| 226 | blob_appendf(&line, "%8.8s ", zUser); |
| 227 | blob_appendf(&line, "%8.8s ", zBr); |
| 228 | blob_appendf(&line,"%-39.39s", zCom ); |
| 229 | comment_print(blob_str(&line), zCom, 0, iWidth, g.comFmtFlags); |
| 230 | } |
| 231 | } |
| 232 | db_finalize(&q); |
| 233 | blob_reset(&fname); |
| 234 | } |
| 235 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -215,20 +215,20 @@ | |
| 215 | if( iBrief ){ |
| 216 | fossil_print("%s ", zDate); |
| 217 | zOut = mprintf( |
| 218 | "[%S] %s (user: %s, artifact: [%S], branch: %s)", |
| 219 | zCiUuid, zCom, zUser, zFileUuid, zBr); |
| 220 | comment_print(zOut, zCom, 11, iWidth, get_comment_format()); |
| 221 | fossil_free(zOut); |
| 222 | }else{ |
| 223 | blob_reset(&line); |
| 224 | blob_appendf(&line, "%S ", zCiUuid); |
| 225 | blob_appendf(&line, "%.10s ", zDate); |
| 226 | blob_appendf(&line, "%8.8s ", zUser); |
| 227 | blob_appendf(&line, "%8.8s ", zBr); |
| 228 | blob_appendf(&line,"%-39.39s", zCom ); |
| 229 | comment_print(blob_str(&line), zCom, 0, iWidth, get_comment_format()); |
| 230 | } |
| 231 | } |
| 232 | db_finalize(&q); |
| 233 | blob_reset(&fname); |
| 234 | } |
| 235 |
+1
-1
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -117,11 +117,11 @@ | ||
| 117 | 117 | fossil_print("tags: %s\n", zTags); |
| 118 | 118 | } |
| 119 | 119 | free(zTags); |
| 120 | 120 | if( zComment ){ |
| 121 | 121 | fossil_print("comment: "); |
| 122 | - comment_print(zComment, 0, 14, -1, g.comFmtFlags); | |
| 122 | + comment_print(zComment, 0, 14, -1, get_comment_format()); | |
| 123 | 123 | free(zComment); |
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | /* |
| 128 | 128 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -117,11 +117,11 @@ | |
| 117 | fossil_print("tags: %s\n", zTags); |
| 118 | } |
| 119 | free(zTags); |
| 120 | if( zComment ){ |
| 121 | fossil_print("comment: "); |
| 122 | comment_print(zComment, 0, 14, -1, g.comFmtFlags); |
| 123 | free(zComment); |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | /* |
| 128 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -117,11 +117,11 @@ | |
| 117 | fossil_print("tags: %s\n", zTags); |
| 118 | } |
| 119 | free(zTags); |
| 120 | if( zComment ){ |
| 121 | fossil_print("comment: "); |
| 122 | comment_print(zComment, 0, 14, -1, get_comment_format()); |
| 123 | free(zComment); |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | /* |
| 128 |
+6
-2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -203,11 +203,12 @@ | ||
| 203 | 203 | ** SSL client identity */ |
| 204 | 204 | int useLocalauth; /* No login required if from 127.0.0.1 */ |
| 205 | 205 | int noPswd; /* Logged in without password (on 127.0.0.1) */ |
| 206 | 206 | int userUid; /* Integer user id */ |
| 207 | 207 | int isHuman; /* True if access by a human, not a spider or bot */ |
| 208 | - int comFmtFlags; /* Zero or more "COMMENT_PRINT_*" bit flags */ | |
| 208 | + int comFmtFlags; /* Zero or more "COMMENT_PRINT_*" bit flags, should be | |
| 209 | + ** accessed through get_comment_format(). */ | |
| 209 | 210 | |
| 210 | 211 | /* Information used to populate the RCVFROM table */ |
| 211 | 212 | int rcvid; /* The rcvid. 0 if not yet defined. */ |
| 212 | 213 | char *zIpAddr; /* The remote IP address */ |
| 213 | 214 | char *zNonce; /* The nonce used for login */ |
| @@ -575,14 +576,17 @@ | ||
| 575 | 576 | ** this function executes, all global variables (i.e. in the "g" struct) |
| 576 | 577 | ** containing option-settable bitwise flag fields must be initialized. |
| 577 | 578 | */ |
| 578 | 579 | static void fossil_init_flags_from_options(void){ |
| 579 | 580 | const char *zValue = find_option("comfmtflags", 0, 1); |
| 581 | + if( zValue==0 ){ | |
| 582 | + zValue = find_option("comment-format", 0, 1); | |
| 583 | + } | |
| 580 | 584 | if( zValue ){ |
| 581 | 585 | g.comFmtFlags = atoi(zValue); |
| 582 | 586 | }else{ |
| 583 | - g.comFmtFlags = COMMENT_PRINT_DEFAULT; | |
| 587 | + g.comFmtFlags = COMMENT_PRINT_UNSET; /* Command-line option not found. */ | |
| 584 | 588 | } |
| 585 | 589 | } |
| 586 | 590 | |
| 587 | 591 | /* |
| 588 | 592 | ** Check to see if the Fossil binary contains an appended repository |
| 589 | 593 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -203,11 +203,12 @@ | |
| 203 | ** SSL client identity */ |
| 204 | int useLocalauth; /* No login required if from 127.0.0.1 */ |
| 205 | int noPswd; /* Logged in without password (on 127.0.0.1) */ |
| 206 | int userUid; /* Integer user id */ |
| 207 | int isHuman; /* True if access by a human, not a spider or bot */ |
| 208 | int comFmtFlags; /* Zero or more "COMMENT_PRINT_*" bit flags */ |
| 209 | |
| 210 | /* Information used to populate the RCVFROM table */ |
| 211 | int rcvid; /* The rcvid. 0 if not yet defined. */ |
| 212 | char *zIpAddr; /* The remote IP address */ |
| 213 | char *zNonce; /* The nonce used for login */ |
| @@ -575,14 +576,17 @@ | |
| 575 | ** this function executes, all global variables (i.e. in the "g" struct) |
| 576 | ** containing option-settable bitwise flag fields must be initialized. |
| 577 | */ |
| 578 | static void fossil_init_flags_from_options(void){ |
| 579 | const char *zValue = find_option("comfmtflags", 0, 1); |
| 580 | if( zValue ){ |
| 581 | g.comFmtFlags = atoi(zValue); |
| 582 | }else{ |
| 583 | g.comFmtFlags = COMMENT_PRINT_DEFAULT; |
| 584 | } |
| 585 | } |
| 586 | |
| 587 | /* |
| 588 | ** Check to see if the Fossil binary contains an appended repository |
| 589 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -203,11 +203,12 @@ | |
| 203 | ** SSL client identity */ |
| 204 | int useLocalauth; /* No login required if from 127.0.0.1 */ |
| 205 | int noPswd; /* Logged in without password (on 127.0.0.1) */ |
| 206 | int userUid; /* Integer user id */ |
| 207 | int isHuman; /* True if access by a human, not a spider or bot */ |
| 208 | int comFmtFlags; /* Zero or more "COMMENT_PRINT_*" bit flags, should be |
| 209 | ** accessed through get_comment_format(). */ |
| 210 | |
| 211 | /* Information used to populate the RCVFROM table */ |
| 212 | int rcvid; /* The rcvid. 0 if not yet defined. */ |
| 213 | char *zIpAddr; /* The remote IP address */ |
| 214 | char *zNonce; /* The nonce used for login */ |
| @@ -575,14 +576,17 @@ | |
| 576 | ** this function executes, all global variables (i.e. in the "g" struct) |
| 577 | ** containing option-settable bitwise flag fields must be initialized. |
| 578 | */ |
| 579 | static void fossil_init_flags_from_options(void){ |
| 580 | const char *zValue = find_option("comfmtflags", 0, 1); |
| 581 | if( zValue==0 ){ |
| 582 | zValue = find_option("comment-format", 0, 1); |
| 583 | } |
| 584 | if( zValue ){ |
| 585 | g.comFmtFlags = atoi(zValue); |
| 586 | }else{ |
| 587 | g.comFmtFlags = COMMENT_PRINT_UNSET; /* Command-line option not found. */ |
| 588 | } |
| 589 | } |
| 590 | |
| 591 | /* |
| 592 | ** Check to see if the Fossil binary contains an appended repository |
| 593 |
+2
-2
| --- src/merge.c | ||
| +++ src/merge.c | ||
| @@ -47,11 +47,11 @@ | ||
| 47 | 47 | indent-1, zLabel, |
| 48 | 48 | db_column_text(&q, 3), |
| 49 | 49 | db_column_text(&q, 1), |
| 50 | 50 | db_column_text(&q, 0), |
| 51 | 51 | indent, ""); |
| 52 | - comment_print(zCom, db_column_text(&q,2), indent, -1, g.comFmtFlags); | |
| 52 | + comment_print(zCom, db_column_text(&q,2), indent, -1, get_comment_format()); | |
| 53 | 53 | fossil_free(zCom); |
| 54 | 54 | } |
| 55 | 55 | db_finalize(&q); |
| 56 | 56 | } |
| 57 | 57 | |
| @@ -321,11 +321,11 @@ | ||
| 321 | 321 | ); |
| 322 | 322 | if( db_step(&q)==SQLITE_ROW ){ |
| 323 | 323 | char *zCom = mprintf("Merging fork [%S] at %s by %s: \"%s\"", |
| 324 | 324 | db_column_text(&q, 0), db_column_text(&q, 1), |
| 325 | 325 | db_column_text(&q, 3), db_column_text(&q, 2)); |
| 326 | - comment_print(zCom, db_column_text(&q,2), 0, -1, g.comFmtFlags); | |
| 326 | + comment_print(zCom, db_column_text(&q,2), 0, -1, get_comment_format()); | |
| 327 | 327 | fossil_free(zCom); |
| 328 | 328 | } |
| 329 | 329 | db_finalize(&q); |
| 330 | 330 | }else{ |
| 331 | 331 | usage("?OPTIONS? ?VERSION?"); |
| 332 | 332 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -47,11 +47,11 @@ | |
| 47 | indent-1, zLabel, |
| 48 | db_column_text(&q, 3), |
| 49 | db_column_text(&q, 1), |
| 50 | db_column_text(&q, 0), |
| 51 | indent, ""); |
| 52 | comment_print(zCom, db_column_text(&q,2), indent, -1, g.comFmtFlags); |
| 53 | fossil_free(zCom); |
| 54 | } |
| 55 | db_finalize(&q); |
| 56 | } |
| 57 | |
| @@ -321,11 +321,11 @@ | |
| 321 | ); |
| 322 | if( db_step(&q)==SQLITE_ROW ){ |
| 323 | char *zCom = mprintf("Merging fork [%S] at %s by %s: \"%s\"", |
| 324 | db_column_text(&q, 0), db_column_text(&q, 1), |
| 325 | db_column_text(&q, 3), db_column_text(&q, 2)); |
| 326 | comment_print(zCom, db_column_text(&q,2), 0, -1, g.comFmtFlags); |
| 327 | fossil_free(zCom); |
| 328 | } |
| 329 | db_finalize(&q); |
| 330 | }else{ |
| 331 | usage("?OPTIONS? ?VERSION?"); |
| 332 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -47,11 +47,11 @@ | |
| 47 | indent-1, zLabel, |
| 48 | db_column_text(&q, 3), |
| 49 | db_column_text(&q, 1), |
| 50 | db_column_text(&q, 0), |
| 51 | indent, ""); |
| 52 | comment_print(zCom, db_column_text(&q,2), indent, -1, get_comment_format()); |
| 53 | fossil_free(zCom); |
| 54 | } |
| 55 | db_finalize(&q); |
| 56 | } |
| 57 | |
| @@ -321,11 +321,11 @@ | |
| 321 | ); |
| 322 | if( db_step(&q)==SQLITE_ROW ){ |
| 323 | char *zCom = mprintf("Merging fork [%S] at %s by %s: \"%s\"", |
| 324 | db_column_text(&q, 0), db_column_text(&q, 1), |
| 325 | db_column_text(&q, 3), db_column_text(&q, 2)); |
| 326 | comment_print(zCom, db_column_text(&q,2), 0, -1, get_comment_format()); |
| 327 | fossil_free(zCom); |
| 328 | } |
| 329 | db_finalize(&q); |
| 330 | }else{ |
| 331 | usage("?OPTIONS? ?VERSION?"); |
| 332 |
+3
-3
| --- src/name.c | ||
| +++ src/name.c | ||
| @@ -612,11 +612,11 @@ | ||
| 612 | 612 | default: zType = "Unknown"; break; |
| 613 | 613 | } |
| 614 | 614 | fossil_print("type: %s by %s on %s\n", zType, db_column_text(&q,2), |
| 615 | 615 | db_column_text(&q, 1)); |
| 616 | 616 | fossil_print("comment: "); |
| 617 | - comment_print(db_column_text(&q,3), 0, 12, -1, g.comFmtFlags); | |
| 617 | + comment_print(db_column_text(&q,3), 0, 12, -1, get_comment_format()); | |
| 618 | 618 | } |
| 619 | 619 | db_finalize(&q); |
| 620 | 620 | |
| 621 | 621 | /* Check to see if this object is used as a file in a check-in */ |
| 622 | 622 | db_prepare(&q, |
| @@ -634,11 +634,11 @@ | ||
| 634 | 634 | fossil_print(" part of [%S] by %s on %s\n", |
| 635 | 635 | db_column_text(&q, 1), |
| 636 | 636 | db_column_text(&q, 3), |
| 637 | 637 | db_column_text(&q, 2)); |
| 638 | 638 | fossil_print(" "); |
| 639 | - comment_print(db_column_text(&q,4), 0, 12, -1, g.comFmtFlags); | |
| 639 | + comment_print(db_column_text(&q,4), 0, 12, -1, get_comment_format()); | |
| 640 | 640 | } |
| 641 | 641 | db_finalize(&q); |
| 642 | 642 | |
| 643 | 643 | /* Check to see if this object is used as an attachment */ |
| 644 | 644 | db_prepare(&q, |
| @@ -669,11 +669,11 @@ | ||
| 669 | 669 | db_column_text(&q,7)); |
| 670 | 670 | } |
| 671 | 671 | fossil_print(" by user %s on %s\n", |
| 672 | 672 | db_column_text(&q,2), db_column_text(&q,3)); |
| 673 | 673 | fossil_print(" "); |
| 674 | - comment_print(db_column_text(&q,1), 0, 12, -1, g.comFmtFlags); | |
| 674 | + comment_print(db_column_text(&q,1), 0, 12, -1, get_comment_format()); | |
| 675 | 675 | } |
| 676 | 676 | db_finalize(&q); |
| 677 | 677 | } |
| 678 | 678 | |
| 679 | 679 | /* |
| 680 | 680 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -612,11 +612,11 @@ | |
| 612 | default: zType = "Unknown"; break; |
| 613 | } |
| 614 | fossil_print("type: %s by %s on %s\n", zType, db_column_text(&q,2), |
| 615 | db_column_text(&q, 1)); |
| 616 | fossil_print("comment: "); |
| 617 | comment_print(db_column_text(&q,3), 0, 12, -1, g.comFmtFlags); |
| 618 | } |
| 619 | db_finalize(&q); |
| 620 | |
| 621 | /* Check to see if this object is used as a file in a check-in */ |
| 622 | db_prepare(&q, |
| @@ -634,11 +634,11 @@ | |
| 634 | fossil_print(" part of [%S] by %s on %s\n", |
| 635 | db_column_text(&q, 1), |
| 636 | db_column_text(&q, 3), |
| 637 | db_column_text(&q, 2)); |
| 638 | fossil_print(" "); |
| 639 | comment_print(db_column_text(&q,4), 0, 12, -1, g.comFmtFlags); |
| 640 | } |
| 641 | db_finalize(&q); |
| 642 | |
| 643 | /* Check to see if this object is used as an attachment */ |
| 644 | db_prepare(&q, |
| @@ -669,11 +669,11 @@ | |
| 669 | db_column_text(&q,7)); |
| 670 | } |
| 671 | fossil_print(" by user %s on %s\n", |
| 672 | db_column_text(&q,2), db_column_text(&q,3)); |
| 673 | fossil_print(" "); |
| 674 | comment_print(db_column_text(&q,1), 0, 12, -1, g.comFmtFlags); |
| 675 | } |
| 676 | db_finalize(&q); |
| 677 | } |
| 678 | |
| 679 | /* |
| 680 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -612,11 +612,11 @@ | |
| 612 | default: zType = "Unknown"; break; |
| 613 | } |
| 614 | fossil_print("type: %s by %s on %s\n", zType, db_column_text(&q,2), |
| 615 | db_column_text(&q, 1)); |
| 616 | fossil_print("comment: "); |
| 617 | comment_print(db_column_text(&q,3), 0, 12, -1, get_comment_format()); |
| 618 | } |
| 619 | db_finalize(&q); |
| 620 | |
| 621 | /* Check to see if this object is used as a file in a check-in */ |
| 622 | db_prepare(&q, |
| @@ -634,11 +634,11 @@ | |
| 634 | fossil_print(" part of [%S] by %s on %s\n", |
| 635 | db_column_text(&q, 1), |
| 636 | db_column_text(&q, 3), |
| 637 | db_column_text(&q, 2)); |
| 638 | fossil_print(" "); |
| 639 | comment_print(db_column_text(&q,4), 0, 12, -1, get_comment_format()); |
| 640 | } |
| 641 | db_finalize(&q); |
| 642 | |
| 643 | /* Check to see if this object is used as an attachment */ |
| 644 | db_prepare(&q, |
| @@ -669,11 +669,11 @@ | |
| 669 | db_column_text(&q,7)); |
| 670 | } |
| 671 | fossil_print(" by user %s on %s\n", |
| 672 | db_column_text(&q,2), db_column_text(&q,3)); |
| 673 | fossil_print(" "); |
| 674 | comment_print(db_column_text(&q,1), 0, 12, -1, get_comment_format()); |
| 675 | } |
| 676 | db_finalize(&q); |
| 677 | } |
| 678 | |
| 679 | /* |
| 680 |
+1
-1
| --- src/stash.c | ||
| +++ src/stash.c | ||
| @@ -652,11 +652,11 @@ | ||
| 652 | 652 | db_column_text(&q, 3) |
| 653 | 653 | ); |
| 654 | 654 | zCom = db_column_text(&q, 2); |
| 655 | 655 | if( zCom && zCom[0] ){ |
| 656 | 656 | fossil_print(" "); |
| 657 | - comment_print(zCom, 0, 7, width, g.comFmtFlags); | |
| 657 | + comment_print(zCom, 0, 7, width, get_comment_format()); | |
| 658 | 658 | } |
| 659 | 659 | if( verboseFlag ){ |
| 660 | 660 | db_bind_int(&q2, "$id", stashid); |
| 661 | 661 | while( db_step(&q2)==SQLITE_ROW ){ |
| 662 | 662 | int isAdded = db_column_int(&q2, 0); |
| 663 | 663 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -652,11 +652,11 @@ | |
| 652 | db_column_text(&q, 3) |
| 653 | ); |
| 654 | zCom = db_column_text(&q, 2); |
| 655 | if( zCom && zCom[0] ){ |
| 656 | fossil_print(" "); |
| 657 | comment_print(zCom, 0, 7, width, g.comFmtFlags); |
| 658 | } |
| 659 | if( verboseFlag ){ |
| 660 | db_bind_int(&q2, "$id", stashid); |
| 661 | while( db_step(&q2)==SQLITE_ROW ){ |
| 662 | int isAdded = db_column_int(&q2, 0); |
| 663 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -652,11 +652,11 @@ | |
| 652 | db_column_text(&q, 3) |
| 653 | ); |
| 654 | zCom = db_column_text(&q, 2); |
| 655 | if( zCom && zCom[0] ){ |
| 656 | fossil_print(" "); |
| 657 | comment_print(zCom, 0, 7, width, get_comment_format()); |
| 658 | } |
| 659 | if( verboseFlag ){ |
| 660 | db_bind_int(&q2, "$id", stashid); |
| 661 | while( db_step(&q2)==SQLITE_ROW ){ |
| 662 | int isAdded = db_column_int(&q2, 0); |
| 663 |
+1
-1
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -2407,11 +2407,11 @@ | ||
| 2407 | 2407 | sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*UNPUBLISHED* "); |
| 2408 | 2408 | n += strlen(zPrefix+n); |
| 2409 | 2409 | } |
| 2410 | 2410 | zFree = mprintf("[%S] %s%s", zId, zPrefix, zCom); |
| 2411 | 2411 | /* record another X lines */ |
| 2412 | - nLine += comment_print(zFree, zCom, 9, width, g.comFmtFlags); | |
| 2412 | + nLine += comment_print(zFree, zCom, 9, width, get_comment_format()); | |
| 2413 | 2413 | fossil_free(zFree); |
| 2414 | 2414 | |
| 2415 | 2415 | if(verboseFlag){ |
| 2416 | 2416 | if( !fchngQueryInit ){ |
| 2417 | 2417 | db_prepare(&fchngQuery, |
| 2418 | 2418 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -2407,11 +2407,11 @@ | |
| 2407 | sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*UNPUBLISHED* "); |
| 2408 | n += strlen(zPrefix+n); |
| 2409 | } |
| 2410 | zFree = mprintf("[%S] %s%s", zId, zPrefix, zCom); |
| 2411 | /* record another X lines */ |
| 2412 | nLine += comment_print(zFree, zCom, 9, width, g.comFmtFlags); |
| 2413 | fossil_free(zFree); |
| 2414 | |
| 2415 | if(verboseFlag){ |
| 2416 | if( !fchngQueryInit ){ |
| 2417 | db_prepare(&fchngQuery, |
| 2418 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -2407,11 +2407,11 @@ | |
| 2407 | sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*UNPUBLISHED* "); |
| 2408 | n += strlen(zPrefix+n); |
| 2409 | } |
| 2410 | zFree = mprintf("[%S] %s%s", zId, zPrefix, zCom); |
| 2411 | /* record another X lines */ |
| 2412 | nLine += comment_print(zFree, zCom, 9, width, get_comment_format()); |
| 2413 | fossil_free(zFree); |
| 2414 | |
| 2415 | if(verboseFlag){ |
| 2416 | if( !fchngQueryInit ){ |
| 2417 | db_prepare(&fchngQuery, |
| 2418 |
+1
-1
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -1297,11 +1297,11 @@ | ||
| 1297 | 1297 | fossil_print(" Change "); |
| 1298 | 1298 | } |
| 1299 | 1299 | fossil_print("%h: ",z); |
| 1300 | 1300 | if( blob_size(&val)>50 || contains_newline(&val)) { |
| 1301 | 1301 | fossil_print("\n "); |
| 1302 | - comment_print(blob_str(&val),0,4,-1,g.comFmtFlags); | |
| 1302 | + comment_print(blob_str(&val),0,4,-1,get_comment_format()); | |
| 1303 | 1303 | }else{ |
| 1304 | 1304 | fossil_print("%s\n",blob_str(&val)); |
| 1305 | 1305 | } |
| 1306 | 1306 | blob_reset(&val); |
| 1307 | 1307 | } |
| 1308 | 1308 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -1297,11 +1297,11 @@ | |
| 1297 | fossil_print(" Change "); |
| 1298 | } |
| 1299 | fossil_print("%h: ",z); |
| 1300 | if( blob_size(&val)>50 || contains_newline(&val)) { |
| 1301 | fossil_print("\n "); |
| 1302 | comment_print(blob_str(&val),0,4,-1,g.comFmtFlags); |
| 1303 | }else{ |
| 1304 | fossil_print("%s\n",blob_str(&val)); |
| 1305 | } |
| 1306 | blob_reset(&val); |
| 1307 | } |
| 1308 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -1297,11 +1297,11 @@ | |
| 1297 | fossil_print(" Change "); |
| 1298 | } |
| 1299 | fossil_print("%h: ",z); |
| 1300 | if( blob_size(&val)>50 || contains_newline(&val)) { |
| 1301 | fossil_print("\n "); |
| 1302 | comment_print(blob_str(&val),0,4,-1,get_comment_format()); |
| 1303 | }else{ |
| 1304 | fossil_print("%s\n",blob_str(&val)); |
| 1305 | } |
| 1306 | blob_reset(&val); |
| 1307 | } |
| 1308 |
+2
-1
| --- www/env-opts.md | ||
| +++ www/env-opts.md | ||
| @@ -31,11 +31,12 @@ | ||
| 31 | 31 | |
| 32 | 32 | `--chdir DIRECTORY`: Change to the named directory before processing |
| 33 | 33 | any commands. |
| 34 | 34 | |
| 35 | 35 | |
| 36 | -`--comfmtflags NUMBER`: Specify flags that control how check-in comments | |
| 36 | +`--comfmtflags NUMBER` | |
| 37 | +`--comment-format NUMBER`: Specify flags that control how check-in comments | |
| 37 | 38 | and certain other text outputs are formatted for display. The flags are |
| 38 | 39 | individual bits in `NUMBER`, which must be specified in base 10: |
| 39 | 40 | |
| 40 | 41 | * _0_ — Uses the revised algorithm with no special handling. |
| 41 | 42 | |
| 42 | 43 |
| --- www/env-opts.md | |
| +++ www/env-opts.md | |
| @@ -31,11 +31,12 @@ | |
| 31 | |
| 32 | `--chdir DIRECTORY`: Change to the named directory before processing |
| 33 | any commands. |
| 34 | |
| 35 | |
| 36 | `--comfmtflags NUMBER`: Specify flags that control how check-in comments |
| 37 | and certain other text outputs are formatted for display. The flags are |
| 38 | individual bits in `NUMBER`, which must be specified in base 10: |
| 39 | |
| 40 | * _0_ — Uses the revised algorithm with no special handling. |
| 41 | |
| 42 |
| --- www/env-opts.md | |
| +++ www/env-opts.md | |
| @@ -31,11 +31,12 @@ | |
| 31 | |
| 32 | `--chdir DIRECTORY`: Change to the named directory before processing |
| 33 | any commands. |
| 34 | |
| 35 | |
| 36 | `--comfmtflags NUMBER` |
| 37 | `--comment-format NUMBER`: Specify flags that control how check-in comments |
| 38 | and certain other text outputs are formatted for display. The flags are |
| 39 | individual bits in `NUMBER`, which must be specified in base 10: |
| 40 | |
| 41 | * _0_ — Uses the revised algorithm with no special handling. |
| 42 | |
| 43 |