Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch experimental Excluding Merge-Ins
This is equivalent to a diff from 1f2eac618c to 591bc4434b
|
2014-06-24
| ||
| 00:40 | Merge updates from trunk. Leaf check-in: 591bc4434b user: mistachkin tags: experimental | |
|
2014-06-23
| ||
| 09:35 | Make daysOfWeek a const table. c/char const/const char/ check-in: 1d30672588 user: jan.nijtmans tags: trunk | |
|
2014-06-21
| ||
| 01:38 | Add --trimspace option to the 'test-comment-format' test command. check-in: 4e3f915c00 user: mistachkin tags: experimental | |
|
2014-06-20
| ||
| 20:56 | Merge updates from trunk. check-in: 265a48d3ec user: mistachkin tags: experimental | |
| 20:55 | Merge updates from trunk. Leaf check-in: 1f2eac618c user: mistachkin tags: respectformatting | |
| 20:54 | Make sure the --width option is honored by all calls into print_timeline(). check-in: e3df30f45c user: mistachkin tags: trunk | |
| 19:48 | Update comment tests. check-in: fcbfd8b5a1 user: mistachkin tags: respectformatting | |
Changes to src/bisect.c.
| ︙ | |||
388 389 390 391 392 393 394 | 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 | - + |
if( g.argc==3 ){
unsigned int i;
for(i=0; i<sizeof(aBisectOption)/sizeof(aBisectOption[0]); i++){
char *z = mprintf("bisect-%s", aBisectOption[i].zName);
fossil_print(" %-15s %-6s ", aBisectOption[i].zName,
db_lget(z, (char*)aBisectOption[i].zDefault));
fossil_free(z);
|
| ︙ |
Changes to src/comformat.c.
| ︙ | |||
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - + - - - - + + + + + + + + + + + - + - + - + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + - - - + - - + - - - + + - + + + + + + + + - + + + - + + |
#include <assert.h>
#ifdef _WIN32
# include <windows.h>
#else
# include <termios.h>
#endif
#if INTERFACE
#define COMMENT_PRINT_NONE ((u32)0x00000000) /* No flags. */
#define COMMENT_PRINT_LEGACY ((u32)0x00000001) /* Use legacy algorithm. */
#define COMMENT_PRINT_TRIM_SPACE ((u32)0x00000002) /* Trim leading/trailing. */
#define COMMENT_PRINT_WORD_BREAK ((u32)0x00000004) /* Break lines on words. */
#define COMMENT_PRINT_DEFAULT (COMMENT_PRINT_TRIM_SPACE) /* Defaults. */
#endif
/*
** This is the previous value used by most external callers when they
** needed to specify a default maximum line length to be used with the
** comment_print() function.
*/
#ifndef COMMENT_LEGACY_LINE_LENGTH
# define COMMENT_LEGACY_LINE_LENGTH (78)
#endif
/*
** This is the number of spaces to print when a tab character is seen.
*/
#ifndef COMMENT_TAB_WIDTH
# define COMMENT_TAB_WIDTH (8)
#endif
/*
** This function scans the specified comment line starting just after the
** initial index and returns the index of the next spacing character -OR-
** zero if such a character cannot be found. For the purposes of this
** algorithm, the NUL character is treated the same as a spacing character.
*/
static int comment_next_space(
const char *zLine, /* [in] The comment line being printed. */
int index /* [in] The current character index being handled. */
){
int nextIndex = index + 1;
for(;;){
char c = zLine[nextIndex];
if( c==0 || fossil_isspace(c) ){
return nextIndex;
}
nextIndex++;
}
return 0; /* NOT REACHED */
}
/*
** This function is called when printing a logical comment line to perform
** the necessary indenting.
*/
static void comment_print_indent(
const char *zLine, /* [in] The comment line being printed. */
int indent, /* [in] Number of spaces to indent, zero for none. */
int trimSpace, /* [in] Non-zero to trim leading/trailing spaces. */
int *piIndex /* [in/out] Pointer to first non-space character. */
){
if( indent>0 ){
fossil_print("%*s", indent, "");
if( trimSpace && zLine && piIndex ){
int index = *piIndex;
while( fossil_isspace(zLine[index]) ){ index++; }
*piIndex = index;
}
}
}
/*
** This function prints one logical line of a comment, stopping when it hits
** a new line -OR- runs out of space on the logical line.
*/
static void comment_print_line(
const char *zLine, /* [in] The comment line to print. */
int indent, /* [in] Number of spaces to indent, zero for none. */
int lineChars, /* [in] Maximum number of characters to print. */
int trimSpace, /* [in] Non-zero to trim leading/trailing spaces. */
int wordBreak, /* [in] Non-zero to try breaking on word boundaries. */
int *pLineCnt, /* [in/out] Pointer to the total line count. */
const char **pzLine /* [out] Pointer to the end of the logical line. */
){
int index = 0, charCnt = 0, lineCnt = 0, maxChars;
if( !zLine ) return;
if( lineChars<=0 ) return;
comment_print_indent(zLine, indent, trimSpace, &index);
maxChars = lineChars;
for(;;){
char c = zLine[index];
if( c==0 ){
break;
}else{
index++;
}
if( c=='\n' ){
charCnt = 0;
lineCnt++;
}else if( c=='\t' ){
int nextIndex = comment_next_space(zLine, index);
if( nextIndex<=0 || (nextIndex-index)>maxChars ){
break;
}
charCnt++;
if( maxChars<COMMENT_TAB_WIDTH ){
fossil_print(" ");
break;
}
maxChars -= COMMENT_TAB_WIDTH;
}else if( wordBreak && fossil_isspace(c) ){
int nextIndex = comment_next_space(zLine, index);
if( nextIndex<=0 || (nextIndex-index)>maxChars ){
break;
}
charCnt++;
maxChars--;
}else{
charCnt++;
maxChars--;
}
fossil_print("%c", c);
if( maxChars==0 ) break;
if( c=='\n' ) break;
}
if( charCnt>0 ){
fossil_print("\n");
lineCnt++;
}
if( pLineCnt ){
*pLineCnt += lineCnt;
}
if( pzLine ){
*pzLine = zLine + index;
}
}
/*
** This is the legacy comment printing algorithm. Currently, it is being
** retained primarily for testing and comparison purposes.
**
|
Changes to src/descendants.c.
| ︙ | |||
405 406 407 408 409 410 411 | 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | - + |
fossil_free(zLastBr);
zLastBr = fossil_strdup(zBr);
}
n++;
sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n);
fossil_print("%6s ", zLineNo);
z = mprintf("%s [%.10s] %s", zDate, zId, zCom);
|
| ︙ |
Changes to src/finfo.c.
| ︙ | |||
200 201 202 203 204 205 206 | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | - + - + |
char *zOut;
if( zBr==0 ) zBr = "trunk";
if( iBrief ){
fossil_print("%s ", zDate);
zOut = sqlite3_mprintf(
"[%.10s] %s (user: %s, artifact: [%.10s], branch: %s)",
zCiUuid, zCom, zUser, zFileUuid, zBr);
|
| ︙ |
Changes to src/info.c.
| ︙ | |||
130 131 132 133 134 135 136 | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | - + |
zTags = info_tags_of_checkin(rid, 0);
if( zTags && zTags[0] ){
fossil_print("tags: %s\n", zTags);
}
free(zTags);
if( zComment ){
fossil_print("comment: ");
|
| ︙ |
Changes to src/main.c.
| ︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | - + | #include <sys/stat.h> #include <stdlib.h> /* atexit() */ #if defined(_WIN32) # include <windows.h> #else # include <errno.h> /* errno global */ #endif |
| ︙ |
Changes to src/merge.c.
| ︙ | |||
45 46 47 48 49 50 51 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | - + |
}
fossil_print("%-*s [%S] by %s on %s\n%*s",
indent-1, zLabel,
db_column_text(&q, 3),
db_column_text(&q, 1),
db_column_text(&q, 0),
indent, "");
|
| ︙ | |||
208 209 210 211 212 213 214 | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | - + |
" WHERE event.objid=%d AND blob.rid=%d",
timeline_utc(), mid, mid
);
if( db_step(&q)==SQLITE_ROW ){
char *zCom = mprintf("Merging fork [%S] at %s by %s: \"%s\"",
db_column_text(&q, 0), db_column_text(&q, 1),
db_column_text(&q, 3), db_column_text(&q, 2));
|
| ︙ |
Changes to src/name.c.
| ︙ | |||
580 581 582 583 584 585 586 | 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 | - + |
case 't': zType = "Ticket-change"; break;
case 'g': zType = "Tag-change"; break;
default: zType = "Unknown"; break;
}
fossil_print("type: %s by %s on %s\n", zType, db_column_text(&q,2),
db_column_text(&q, 1));
fossil_print("comment: ");
|
| ︙ | |||
602 603 604 605 606 607 608 | 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 | - + |
while( db_step(&q)==SQLITE_ROW ){
fossil_print("file: %s\n", db_column_text(&q,0));
fossil_print(" part of [%.10s] by %s on %s\n",
db_column_text(&q, 1),
db_column_text(&q, 3),
db_column_text(&q, 2));
fossil_print(" ");
|
| ︙ | |||
637 638 639 640 641 642 643 | 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 | - + |
}else{
fossil_print(" via %s\n",
db_column_text(&q,7));
}
fossil_print(" by user %s on %s\n",
db_column_text(&q,2), db_column_text(&q,3));
fossil_print(" ");
|
| ︙ |
Changes to src/printf.c.
| ︙ | |||
860 861 862 863 864 865 866 | 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 | - - + + + + + + | fflush(toStdErr ? stderr : stdout); } /* ** Force the standard output cursor to move to the beginning ** of a line, if it is not there already. */ |
| ︙ |
Changes to src/rss.c.
| ︙ | |||
202 203 204 205 206 207 208 209 210 211 212 213 214 215 | 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | + + |
if( zFreeProjectName != 0 ){
free( zFreeProjectName );
}
}
/*
** COMMAND: rss
**
** Usage: %fossil rss ?OPTIONS?
**
** The CLI variant of the /timeline.rss page, this produces an RSS
** feed of the timeline to stdout. Options:
**
** -type|y FLAG
** may be: all (default), ci (show checkins only), t (show tickets only),
** w (show wiki only). LIMIT is the number of items to show.
|
| ︙ |
Changes to src/stash.c.
| ︙ | |||
550 551 552 553 554 555 556 | 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 | - + |
stashid,
db_column_text(&q, 1),
db_column_text(&q, 3)
);
zCom = db_column_text(&q, 2);
if( zCom && zCom[0] ){
fossil_print(" ");
|
| ︙ |
Changes to src/timeline.c.
| ︙ | |||
1608 1609 1610 1611 1612 1613 1614 | 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 | + - + |
n = strlen(zPrefix);
}
if( fossil_strcmp(zCurrentUuid,zId)==0 ){
sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*CURRENT* ");
n += strlen(zPrefix);
}
zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom);
/* record another X lines */
|
| ︙ | |||
1969 1970 1971 1972 1973 1974 1975 | 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 | - + - - + + | */ static int statsReportType = 0; /* ** Set by stats_report_init_view() to one of the y=XXXX values ** accepted by /timeline?y=XXXX. */ |
| ︙ | |||
2044 2045 2046 2047 2048 2049 2050 | 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 | - + | /* ** Returns a string suitable (for a given value of suitable) for ** use in a label with the header of the /reports pages, dependent ** on the 'type' flag. See stats_report_init_view(). ** The returned bytes are static. */ |
| ︙ | |||
2069 2070 2071 2072 2073 2074 2075 | 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 | - - + + | ** of links for the various type=XXX flags. zCurrentViewName must be ** the name/value of the 'view' parameter which is in effect at the ** time this is called. e.g. if called from the 'byuser' view then ** zCurrentViewName must be "byuser". Any URL parameters which need to ** be added to the generated URLs should be passed in zParam. The ** caller is expected to have already encoded any zParam in the %T or ** %t encoding. */ |
| ︙ | |||
2294 2295 2296 2297 2298 2299 2300 | 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 | - + |
@ <tr class='row%d(rowClass)'>
@ <td></td>
@ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td>
@</tr>
}
@ </tbody></table>
if(nEventTotal){
|
| ︙ | |||
2384 2385 2386 2387 2388 2389 2390 | 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 | - + - + |
int nRowNumber = 0; /* current TR number */
int nEventTotal = 0; /* Total event count */
int rowClass = 0; /* counter for alternating
row colors */
Blob sql = empty_blob; /* SQL */
int nMaxEvents = 1; /* max number of events for
all rows. */
|
| ︙ |
Changes to src/tkt.c.
| ︙ | |||
1262 1263 1264 1265 1266 1267 1268 | 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 | - + |
z++;
}else{
fossil_print(" Change ");
}
fossil_print("%h: ",z);
if( blob_size(&val)>50 || contains_newline(&val)) {
fossil_print("\n ",blob_str(&val));
|
| ︙ |
Changes to test/comment.test.
| ︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | - + - + - - - + + - - + + - - + - - + - - + - - - + - - + - + |
fossil test-comment-format --decode " " "this is a short comment." 26
test comment-4 {$RESULT eq " this is a short comment.\n(1 lines output)"}
###############################################################################
fossil test-comment-format "*PREFIX* " "this is a short comment." 26
|
| ︙ |