Fossil SCM

merge trunk<p>Don't try to convert binary files.

jan.nijtmans 2012-11-06 09:36 convert_before_commit merge
Commit 4fa4972104e07e01a48565c05d7d2b6ffa3342ed
+3 -6
--- src/checkin.c
+++ src/checkin.c
@@ -928,14 +928,15 @@
928928
}else if( eType==0 ){
929929
if( binOk ){
930930
return 0; /* We don't want binary warnings for this file. */
931931
}
932932
zWarning = "binary data";
933
+ c = ""; /* We cannot automatically convert binary files */
933934
}else{
934935
zWarning = "Unicode";
935936
#ifndef _WIN32
936
- c = ""; /* On UNIX, we cannot convert unicode files */
937
+ c = ""; /* On UNIX, we cannot automatically convert unicode files */
937938
#endif
938939
}
939940
file_relative_name(zFilename, &fname, 0);
940941
blob_zero(&ans);
941942
zMsg = mprintf(
@@ -944,15 +945,11 @@
944945
prompt_user(zMsg, &ans);
945946
fossil_free(zMsg);
946947
cReply = blob_str(&ans)[0];
947948
if( cReply=='a' || cReply=='A' ){
948949
allOk = 1;
949
- }else if( (cReply=='c' || cReply=='C')
950
-#ifndef _WIN32
951
- && fUnicode
952
-#endif
953
- ){
950
+ }else if( (c[0] != 0) && (cReply=='c' || cReply=='C') ){
954951
char *zOrig = file_newname(zFilename, "original", 1);
955952
FILE *f;
956953
blob_write_to_file(p, zOrig);
957954
fossil_free(zOrig);
958955
f = fossil_fopen(zFilename, "wb");
959956
--- src/checkin.c
+++ src/checkin.c
@@ -928,14 +928,15 @@
928 }else if( eType==0 ){
929 if( binOk ){
930 return 0; /* We don't want binary warnings for this file. */
931 }
932 zWarning = "binary data";
 
933 }else{
934 zWarning = "Unicode";
935 #ifndef _WIN32
936 c = ""; /* On UNIX, we cannot convert unicode files */
937 #endif
938 }
939 file_relative_name(zFilename, &fname, 0);
940 blob_zero(&ans);
941 zMsg = mprintf(
@@ -944,15 +945,11 @@
944 prompt_user(zMsg, &ans);
945 fossil_free(zMsg);
946 cReply = blob_str(&ans)[0];
947 if( cReply=='a' || cReply=='A' ){
948 allOk = 1;
949 }else if( (cReply=='c' || cReply=='C')
950 #ifndef _WIN32
951 && fUnicode
952 #endif
953 ){
954 char *zOrig = file_newname(zFilename, "original", 1);
955 FILE *f;
956 blob_write_to_file(p, zOrig);
957 fossil_free(zOrig);
958 f = fossil_fopen(zFilename, "wb");
959
--- src/checkin.c
+++ src/checkin.c
@@ -928,14 +928,15 @@
928 }else if( eType==0 ){
929 if( binOk ){
930 return 0; /* We don't want binary warnings for this file. */
931 }
932 zWarning = "binary data";
933 c = ""; /* We cannot automatically convert binary files */
934 }else{
935 zWarning = "Unicode";
936 #ifndef _WIN32
937 c = ""; /* On UNIX, we cannot automatically convert unicode files */
938 #endif
939 }
940 file_relative_name(zFilename, &fname, 0);
941 blob_zero(&ans);
942 zMsg = mprintf(
@@ -944,15 +945,11 @@
945 prompt_user(zMsg, &ans);
946 fossil_free(zMsg);
947 cReply = blob_str(&ans)[0];
948 if( cReply=='a' || cReply=='A' ){
949 allOk = 1;
950 }else if( (c[0] != 0) && (cReply=='c' || cReply=='C') ){
 
 
 
 
951 char *zOrig = file_newname(zFilename, "original", 1);
952 FILE *f;
953 blob_write_to_file(p, zOrig);
954 fossil_free(zOrig);
955 f = fossil_fopen(zFilename, "wb");
956
+3 -6
--- src/checkin.c
+++ src/checkin.c
@@ -928,14 +928,15 @@
928928
}else if( eType==0 ){
929929
if( binOk ){
930930
return 0; /* We don't want binary warnings for this file. */
931931
}
932932
zWarning = "binary data";
933
+ c = ""; /* We cannot automatically convert binary files */
933934
}else{
934935
zWarning = "Unicode";
935936
#ifndef _WIN32
936
- c = ""; /* On UNIX, we cannot convert unicode files */
937
+ c = ""; /* On UNIX, we cannot automatically convert unicode files */
937938
#endif
938939
}
939940
file_relative_name(zFilename, &fname, 0);
940941
blob_zero(&ans);
941942
zMsg = mprintf(
@@ -944,15 +945,11 @@
944945
prompt_user(zMsg, &ans);
945946
fossil_free(zMsg);
946947
cReply = blob_str(&ans)[0];
947948
if( cReply=='a' || cReply=='A' ){
948949
allOk = 1;
949
- }else if( (cReply=='c' || cReply=='C')
950
-#ifndef _WIN32
951
- && fUnicode
952
-#endif
953
- ){
950
+ }else if( (c[0] != 0) && (cReply=='c' || cReply=='C') ){
954951
char *zOrig = file_newname(zFilename, "original", 1);
955952
FILE *f;
956953
blob_write_to_file(p, zOrig);
957954
fossil_free(zOrig);
958955
f = fossil_fopen(zFilename, "wb");
959956
--- src/checkin.c
+++ src/checkin.c
@@ -928,14 +928,15 @@
928 }else if( eType==0 ){
929 if( binOk ){
930 return 0; /* We don't want binary warnings for this file. */
931 }
932 zWarning = "binary data";
 
933 }else{
934 zWarning = "Unicode";
935 #ifndef _WIN32
936 c = ""; /* On UNIX, we cannot convert unicode files */
937 #endif
938 }
939 file_relative_name(zFilename, &fname, 0);
940 blob_zero(&ans);
941 zMsg = mprintf(
@@ -944,15 +945,11 @@
944 prompt_user(zMsg, &ans);
945 fossil_free(zMsg);
946 cReply = blob_str(&ans)[0];
947 if( cReply=='a' || cReply=='A' ){
948 allOk = 1;
949 }else if( (cReply=='c' || cReply=='C')
950 #ifndef _WIN32
951 && fUnicode
952 #endif
953 ){
954 char *zOrig = file_newname(zFilename, "original", 1);
955 FILE *f;
956 blob_write_to_file(p, zOrig);
957 fossil_free(zOrig);
958 f = fossil_fopen(zFilename, "wb");
959
--- src/checkin.c
+++ src/checkin.c
@@ -928,14 +928,15 @@
928 }else if( eType==0 ){
929 if( binOk ){
930 return 0; /* We don't want binary warnings for this file. */
931 }
932 zWarning = "binary data";
933 c = ""; /* We cannot automatically convert binary files */
934 }else{
935 zWarning = "Unicode";
936 #ifndef _WIN32
937 c = ""; /* On UNIX, we cannot automatically convert unicode files */
938 #endif
939 }
940 file_relative_name(zFilename, &fname, 0);
941 blob_zero(&ans);
942 zMsg = mprintf(
@@ -944,15 +945,11 @@
945 prompt_user(zMsg, &ans);
946 fossil_free(zMsg);
947 cReply = blob_str(&ans)[0];
948 if( cReply=='a' || cReply=='A' ){
949 allOk = 1;
950 }else if( (c[0] != 0) && (cReply=='c' || cReply=='C') ){
 
 
 
 
951 char *zOrig = file_newname(zFilename, "original", 1);
952 FILE *f;
953 blob_write_to_file(p, zOrig);
954 fossil_free(zOrig);
955 f = fossil_fopen(zFilename, "wb");
956
+12 -9
--- src/merge.c
+++ src/merge.c
@@ -457,11 +457,12 @@
457457
content_get(ridm, &m);
458458
if( isBinary ){
459459
rc = -1;
460460
blob_zero(&r);
461461
}else{
462
- rc = merge_3way(&p, zFullPath, &m, &r);
462
+ unsigned mergeFlags = nochangeFlag ? MERGE_DRYRUN : 0;
463
+ rc = merge_3way(&p, zFullPath, &m, &r, mergeFlags);
463464
}
464465
if( rc>=0 ){
465466
if( !nochangeFlag ){
466467
blob_write_to_file(&r, zFullPath);
467468
file_wd_setexe(zFullPath, isExe);
@@ -549,18 +550,20 @@
549550
db_finalize(&q);
550551
551552
552553
/* Report on conflicts
553554
*/
554
- if( !nochangeFlag ){
555
- if( nConflict ){
556
- fossil_print("WARNING: %d merge conflicts", nConflict);
557
- }
558
- if( nOverwrite ){
559
- fossil_warning("WARNING: %d unmanaged files were overwritten",
560
- nOverwrite);
561
- }
555
+ if( nConflict ){
556
+ fossil_warning("WARNING: %d merge conflicts", nConflict);
557
+ }
558
+ if( nOverwrite ){
559
+ fossil_warning("WARNING: %d unmanaged files were overwritten",
560
+ nOverwrite);
561
+ }
562
+ if( nochangeFlag ){
563
+ fossil_warning("REMINDER: this was a dry run -"
564
+ " no file were actually changed.");
562565
}
563566
564567
/*
565568
** Clean up the mid and pid VFILE entries. Then commit the changes.
566569
*/
567570
--- src/merge.c
+++ src/merge.c
@@ -457,11 +457,12 @@
457 content_get(ridm, &m);
458 if( isBinary ){
459 rc = -1;
460 blob_zero(&r);
461 }else{
462 rc = merge_3way(&p, zFullPath, &m, &r);
 
463 }
464 if( rc>=0 ){
465 if( !nochangeFlag ){
466 blob_write_to_file(&r, zFullPath);
467 file_wd_setexe(zFullPath, isExe);
@@ -549,18 +550,20 @@
549 db_finalize(&q);
550
551
552 /* Report on conflicts
553 */
554 if( !nochangeFlag ){
555 if( nConflict ){
556 fossil_print("WARNING: %d merge conflicts", nConflict);
557 }
558 if( nOverwrite ){
559 fossil_warning("WARNING: %d unmanaged files were overwritten",
560 nOverwrite);
561 }
 
 
562 }
563
564 /*
565 ** Clean up the mid and pid VFILE entries. Then commit the changes.
566 */
567
--- src/merge.c
+++ src/merge.c
@@ -457,11 +457,12 @@
457 content_get(ridm, &m);
458 if( isBinary ){
459 rc = -1;
460 blob_zero(&r);
461 }else{
462 unsigned mergeFlags = nochangeFlag ? MERGE_DRYRUN : 0;
463 rc = merge_3way(&p, zFullPath, &m, &r, mergeFlags);
464 }
465 if( rc>=0 ){
466 if( !nochangeFlag ){
467 blob_write_to_file(&r, zFullPath);
468 file_wd_setexe(zFullPath, isExe);
@@ -549,18 +550,20 @@
550 db_finalize(&q);
551
552
553 /* Report on conflicts
554 */
555 if( nConflict ){
556 fossil_warning("WARNING: %d merge conflicts", nConflict);
557 }
558 if( nOverwrite ){
559 fossil_warning("WARNING: %d unmanaged files were overwritten",
560 nOverwrite);
561 }
562 if( nochangeFlag ){
563 fossil_warning("REMINDER: this was a dry run -"
564 " no file were actually changed.");
565 }
566
567 /*
568 ** Clean up the mid and pid VFILE entries. Then commit the changes.
569 */
570
+12 -4
--- src/merge3.c
+++ src/merge3.c
@@ -406,10 +406,17 @@
406406
}
407407
}
408408
return blob_str(&x);
409409
}
410410
411
+#if INTERFACE
412
+/*
413
+** Flags to the 3-way merger
414
+*/
415
+#define MERGE_DRYRUN 0x0001
416
+#endif
417
+
411418
412419
/*
413420
** This routine is a wrapper around blob_merge() with the following
414421
** enhancements:
415422
**
@@ -428,29 +435,30 @@
428435
*/
429436
int merge_3way(
430437
Blob *pPivot, /* Common ancestor (older) */
431438
const char *zV1, /* Name of file for version merging into (mine) */
432439
Blob *pV2, /* Version merging from (yours) */
433
- Blob *pOut /* Output written here */
440
+ Blob *pOut, /* Output written here */
441
+ unsigned mergeFlags /* Flags that control operation */
434442
){
435443
Blob v1; /* Content of zV1 */
436444
int rc; /* Return code of subroutines and this routine */
437445
char *zPivot; /* Name of the pivot file */
438446
char *zOrig; /* Name of the original content file */
439447
char *zOther; /* Name of the merge file */
440448
441449
blob_read_from_file(&v1, zV1);
442450
rc = blob_merge(pPivot, &v1, pV2, pOut);
443
- if( rc!=0 ){
451
+ if( rc!=0 && (mergeFlags & MERGE_DRYRUN)==0 ){
444452
zPivot = file_newname(zV1, "baseline", 1);
445453
blob_write_to_file(pPivot, zPivot);
446454
zOrig = file_newname(zV1, "original", 1);
447455
blob_write_to_file(&v1, zOrig);
448456
zOther = file_newname(zV1, "merge", 1);
449457
blob_write_to_file(pV2, zOther);
450458
}
451
- if( rc>0 ){
459
+ if( rc>0 && (mergeFlags & MERGE_DRYRUN)==0 ){
452460
const char *zGMerge; /* Name of the gmerge command */
453461
454462
zGMerge = db_get("gmerge-command", 0);
455463
if( zGMerge && zGMerge[0] ){
456464
char *zOut; /* Temporary output file */
@@ -474,13 +482,13 @@
474482
}
475483
fossil_free(zCmd);
476484
fossil_free(zOut);
477485
}
478486
}
479
- if( rc!=0 ){
487
+ if( rc!=0 && (mergeFlags & MERGE_DRYRUN)==0 ){
480488
fossil_free(zPivot);
481489
fossil_free(zOrig);
482490
fossil_free(zOther);
483491
}
484492
blob_reset(&v1);
485493
return rc;
486494
}
487495
--- src/merge3.c
+++ src/merge3.c
@@ -406,10 +406,17 @@
406 }
407 }
408 return blob_str(&x);
409 }
410
 
 
 
 
 
 
 
411
412 /*
413 ** This routine is a wrapper around blob_merge() with the following
414 ** enhancements:
415 **
@@ -428,29 +435,30 @@
428 */
429 int merge_3way(
430 Blob *pPivot, /* Common ancestor (older) */
431 const char *zV1, /* Name of file for version merging into (mine) */
432 Blob *pV2, /* Version merging from (yours) */
433 Blob *pOut /* Output written here */
 
434 ){
435 Blob v1; /* Content of zV1 */
436 int rc; /* Return code of subroutines and this routine */
437 char *zPivot; /* Name of the pivot file */
438 char *zOrig; /* Name of the original content file */
439 char *zOther; /* Name of the merge file */
440
441 blob_read_from_file(&v1, zV1);
442 rc = blob_merge(pPivot, &v1, pV2, pOut);
443 if( rc!=0 ){
444 zPivot = file_newname(zV1, "baseline", 1);
445 blob_write_to_file(pPivot, zPivot);
446 zOrig = file_newname(zV1, "original", 1);
447 blob_write_to_file(&v1, zOrig);
448 zOther = file_newname(zV1, "merge", 1);
449 blob_write_to_file(pV2, zOther);
450 }
451 if( rc>0 ){
452 const char *zGMerge; /* Name of the gmerge command */
453
454 zGMerge = db_get("gmerge-command", 0);
455 if( zGMerge && zGMerge[0] ){
456 char *zOut; /* Temporary output file */
@@ -474,13 +482,13 @@
474 }
475 fossil_free(zCmd);
476 fossil_free(zOut);
477 }
478 }
479 if( rc!=0 ){
480 fossil_free(zPivot);
481 fossil_free(zOrig);
482 fossil_free(zOther);
483 }
484 blob_reset(&v1);
485 return rc;
486 }
487
--- src/merge3.c
+++ src/merge3.c
@@ -406,10 +406,17 @@
406 }
407 }
408 return blob_str(&x);
409 }
410
411 #if INTERFACE
412 /*
413 ** Flags to the 3-way merger
414 */
415 #define MERGE_DRYRUN 0x0001
416 #endif
417
418
419 /*
420 ** This routine is a wrapper around blob_merge() with the following
421 ** enhancements:
422 **
@@ -428,29 +435,30 @@
435 */
436 int merge_3way(
437 Blob *pPivot, /* Common ancestor (older) */
438 const char *zV1, /* Name of file for version merging into (mine) */
439 Blob *pV2, /* Version merging from (yours) */
440 Blob *pOut, /* Output written here */
441 unsigned mergeFlags /* Flags that control operation */
442 ){
443 Blob v1; /* Content of zV1 */
444 int rc; /* Return code of subroutines and this routine */
445 char *zPivot; /* Name of the pivot file */
446 char *zOrig; /* Name of the original content file */
447 char *zOther; /* Name of the merge file */
448
449 blob_read_from_file(&v1, zV1);
450 rc = blob_merge(pPivot, &v1, pV2, pOut);
451 if( rc!=0 && (mergeFlags & MERGE_DRYRUN)==0 ){
452 zPivot = file_newname(zV1, "baseline", 1);
453 blob_write_to_file(pPivot, zPivot);
454 zOrig = file_newname(zV1, "original", 1);
455 blob_write_to_file(&v1, zOrig);
456 zOther = file_newname(zV1, "merge", 1);
457 blob_write_to_file(pV2, zOther);
458 }
459 if( rc>0 && (mergeFlags & MERGE_DRYRUN)==0 ){
460 const char *zGMerge; /* Name of the gmerge command */
461
462 zGMerge = db_get("gmerge-command", 0);
463 if( zGMerge && zGMerge[0] ){
464 char *zOut; /* Temporary output file */
@@ -474,13 +482,13 @@
482 }
483 fossil_free(zCmd);
484 fossil_free(zOut);
485 }
486 }
487 if( rc!=0 && (mergeFlags & MERGE_DRYRUN)==0 ){
488 fossil_free(zPivot);
489 fossil_free(zOrig);
490 fossil_free(zOther);
491 }
492 blob_reset(&v1);
493 return rc;
494 }
495
--- src/setup.c
+++ src/setup.c
@@ -1098,10 +1098,16 @@
10981098
onoff_attribute("Allow block-markup in timeline",
10991099
"timeline-block-markup", "tbm", 0);
11001100
@ <p>In timeline displays, check-in comments can be displayed with or
11011101
@ without block markup (paragraphs, tables, etc.)</p>
11021102
1103
+ @ <hr />
1104
+ onoff_attribute("Plaintext comments on timelines",
1105
+ "timeline-plaintext", "tpt", 0);
1106
+ @ <p>In timeline displays, check-in comments are displayed literally,
1107
+ @ without any wiki or HTML interpretation.</p>
1108
+
11031109
@ <hr />
11041110
onoff_attribute("Use Universal Coordinated Time (UTC)",
11051111
"timeline-utc", "utc", 1);
11061112
@ <p>Show times as UTC (also sometimes called Greenwich Mean Time (GMT) or
11071113
@ Zulu) instead of in local time. On this server, local time is currently
11081114
--- src/setup.c
+++ src/setup.c
@@ -1098,10 +1098,16 @@
1098 onoff_attribute("Allow block-markup in timeline",
1099 "timeline-block-markup", "tbm", 0);
1100 @ <p>In timeline displays, check-in comments can be displayed with or
1101 @ without block markup (paragraphs, tables, etc.)</p>
1102
 
 
 
 
 
 
1103 @ <hr />
1104 onoff_attribute("Use Universal Coordinated Time (UTC)",
1105 "timeline-utc", "utc", 1);
1106 @ <p>Show times as UTC (also sometimes called Greenwich Mean Time (GMT) or
1107 @ Zulu) instead of in local time. On this server, local time is currently
1108
--- src/setup.c
+++ src/setup.c
@@ -1098,10 +1098,16 @@
1098 onoff_attribute("Allow block-markup in timeline",
1099 "timeline-block-markup", "tbm", 0);
1100 @ <p>In timeline displays, check-in comments can be displayed with or
1101 @ without block markup (paragraphs, tables, etc.)</p>
1102
1103 @ <hr />
1104 onoff_attribute("Plaintext comments on timelines",
1105 "timeline-plaintext", "tpt", 0);
1106 @ <p>In timeline displays, check-in comments are displayed literally,
1107 @ without any wiki or HTML interpretation.</p>
1108
1109 @ <hr />
1110 onoff_attribute("Use Universal Coordinated Time (UTC)",
1111 "timeline-utc", "utc", 1);
1112 @ <p>Show times as UTC (also sometimes called Greenwich Mean Time (GMT) or
1113 @ Zulu) instead of in local time. On this server, local time is currently
1114
+1 -1
--- src/stash.c
+++ src/stash.c
@@ -253,11 +253,11 @@
253253
if( isLink || isNewLink ){
254254
rc = -1;
255255
blob_zero(&b); /* because we reset it later */
256256
fossil_print("***** Cannot merge symlink %s\n", zNew);
257257
}else{
258
- rc = merge_3way(&a, zOPath, &b, &out);
258
+ rc = merge_3way(&a, zOPath, &b, &out, 0);
259259
blob_write_to_file(&out, zNPath);
260260
blob_reset(&out);
261261
file_wd_setexe(zNPath, isExec);
262262
}
263263
if( rc ){
264264
--- src/stash.c
+++ src/stash.c
@@ -253,11 +253,11 @@
253 if( isLink || isNewLink ){
254 rc = -1;
255 blob_zero(&b); /* because we reset it later */
256 fossil_print("***** Cannot merge symlink %s\n", zNew);
257 }else{
258 rc = merge_3way(&a, zOPath, &b, &out);
259 blob_write_to_file(&out, zNPath);
260 blob_reset(&out);
261 file_wd_setexe(zNPath, isExec);
262 }
263 if( rc ){
264
--- src/stash.c
+++ src/stash.c
@@ -253,11 +253,11 @@
253 if( isLink || isNewLink ){
254 rc = -1;
255 blob_zero(&b); /* because we reset it later */
256 fossil_print("***** Cannot merge symlink %s\n", zNew);
257 }else{
258 rc = merge_3way(&a, zOPath, &b, &out, 0);
259 blob_write_to_file(&out, zNPath);
260 blob_reset(&out);
261 file_wd_setexe(zNPath, isExec);
262 }
263 if( rc ){
264
+25 -17
--- src/timeline.c
+++ src/timeline.c
@@ -192,10 +192,11 @@
192192
const char *zThisUser, /* Suppress links to this user */
193193
const char *zThisTag, /* Suppress links to this tag */
194194
void (*xExtra)(int) /* Routine to call on each line of display */
195195
){
196196
int wikiFlags;
197
+ int plainText;
197198
int mxWikiLen;
198199
Blob comment;
199200
int prevTagid = 0;
200201
int suppressCnt = 0;
201202
char zPrevDate[20];
@@ -205,10 +206,11 @@
205206
Stmt fchngQuery; /* Query for file changes on check-ins */
206207
static Stmt qbranch;
207208
int pendingEndTr = 0; /* True if a </td></tr> is needed */
208209
209210
zPrevDate[0] = 0;
211
+ plainText = db_get_int("timeline-plaintext", 0);
210212
mxWikiLen = db_get_int("timeline-max-comment", 0);
211213
if( db_get_boolean("timeline-block-markup", 0) ){
212214
wikiFlags = WIKI_INLINE;
213215
}else{
214216
wikiFlags = WIKI_INLINE | WIKI_NOBLOCK;
@@ -285,11 +287,11 @@
285287
@ <td class="timelineGraph">
286288
if( tmFlags & TIMELINE_UCOLOR ) zBgClr = zUser ? hash_color(zUser) : 0;
287289
if( zType[0]=='c'
288290
&& (pGraph || zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0)
289291
){
290
- db_reset(&qbranch);
292
+ db_reset(&qbranch);
291293
db_bind_int(&qbranch, ":rid", rid);
292294
if( db_step(&qbranch)==SQLITE_ROW ){
293295
zBr = db_column_text(&qbranch, 0);
294296
}else{
295297
zBr = "trunk";
@@ -353,12 +355,18 @@
353355
if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
354356
Blob truncated;
355357
blob_zero(&truncated);
356358
blob_append(&truncated, blob_buffer(&comment), mxWikiLen);
357359
blob_append(&truncated, "...", 3);
358
- wiki_convert(&truncated, 0, wikiFlags);
360
+ if( plainText ){
361
+ @ %h(blob_str(&truncated))
362
+ }else{
363
+ wiki_convert(&truncated, 0, wikiFlags);
364
+ }
359365
blob_reset(&truncated);
366
+ }else if( plainText ){
367
+ @ %h(blob_str(&comment));
360368
}else{
361369
wiki_convert(&comment, 0, wikiFlags);
362370
}
363371
blob_reset(&comment);
364372
@@ -365,11 +373,11 @@
365373
/* Generate the "user: USERNAME" at the end of the comment, together
366374
** with a hyperlink to another timeline for that user.
367375
*/
368376
if( zTagList && zTagList[0]==0 ) zTagList = 0;
369377
if( g.perm.Hyperlink && fossil_strcmp(zUser, zThisUser)!=0 ){
370
- char *zLink = mprintf("%R/timeline?u=%h&c=%t&nd", zUser, zDate);
378
+ char *zLink = mprintf("%R/timeline?u=%h&amp;c=%t&amp;nd", zUser, zDate);
371379
@ (user: %z(href("%z",zLink))%h(zUser)</a>%s(zTagList?",":"\051")
372380
}else{
373381
@ (user: %h(zUser)%s(zTagList?",":"\051")
374382
}
375383
@@ -390,11 +398,11 @@
390398
while( z && z[0] ){
391399
for(i=0; z[i] && (z[i]!=',' || z[i+1]!=' '); i++){}
392400
if( zThisTag==0 || memcmp(z, zThisTag, i)!=0 || zThisTag[i]!=0 ){
393401
blob_appendf(&links,
394402
"%z%#h</a>%.2s",
395
- href("%R/timeline?r=%#t&nd&c=%s",i,z,zDate), i,z, &z[i]
403
+ href("%R/timeline?r=%#t&amp;nd&amp;c=%t",i,z,zDate), i,z, &z[i]
396404
);
397405
}else{
398406
blob_appendf(&links, "%#h", i+2, z);
399407
}
400408
if( z[i]==0 ) break;
@@ -415,11 +423,11 @@
415423
416424
/* Generate the file-change list if requested */
417425
if( (tmFlags & TIMELINE_FCHANGES)!=0 && zType[0]=='c' && g.perm.Hyperlink ){
418426
int inUl = 0;
419427
if( !fchngQueryInit ){
420
- db_prepare(&fchngQuery,
428
+ db_prepare(&fchngQuery,
421429
"SELECT (pid==0) AS isnew,"
422430
" (fid==0) AS isdel,"
423431
" (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name,"
424432
" (SELECT uuid FROM blob WHERE rid=fid),"
425433
" (SELECT uuid FROM blob WHERE rid=pid),"
@@ -484,11 +492,11 @@
484492
pGraph = 0;
485493
}else{
486494
/* style is not moved to css, because this is
487495
** a technical div for the timeline graph
488496
*/
489
- @ <tr><td /><td>
497
+ @ <tr><td></td><td>
490498
@ <div id="grbtm" style="width:%d(pGraph->mxRail*20+30)px;"></div>
491499
@ </td></tr>
492500
}
493501
}
494502
@ </table>
@@ -653,11 +661,11 @@
653661
@ if( p.u>0 ) drawUpArrow(p.x, rowinfo[p.u-1].y+6, p.y-5);
654662
if( !omitDescenders ){
655663
@ if( p.u==0 ) drawUpArrow(p.x, 0, p.y-5);
656664
@ if( p.f&1 ) drawBox("black",p.x-1,p.y-1,p.x+2,p.y+2);
657665
@ if( p.d ) drawUpArrow(p.x, p.y+6, btm);
658
- }
666
+ }
659667
@ if( p.mo>0 ){
660668
@ var x1 = p.mo + left - 1;
661669
@ var y1 = p.y-3;
662670
@ var x0 = x1>p.x ? p.x+7 : p.x-6;
663671
@ var u = rowinfo[p.mu-1];
@@ -758,11 +766,11 @@
758766
759767
/*
760768
** Create a temporary table suitable for storing timeline data.
761769
*/
762770
static void timeline_temp_table(void){
763
- static const char zSql[] =
771
+ static const char zSql[] =
764772
@ CREATE TEMP TABLE IF NOT EXISTS timeline(
765773
@ rid INTEGER PRIMARY KEY,
766774
@ uuid TEXT,
767775
@ timestamp TEXT,
768776
@ comment TEXT,
@@ -799,11 +807,11 @@
799807
@ WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid
800808
@ AND tagxref.rid=blob.rid AND tagxref.tagtype>0) AS tags,
801809
@ tagid AS tagid,
802810
@ brief AS brief,
803811
@ event.mtime AS mtime
804
- @ FROM event CROSS JOIN blob
812
+ @ FROM event CROSS JOIN blob
805813
@ WHERE blob.rid=event.objid
806814
;
807815
if( zBase==0 ){
808816
zBase = mprintf(zBaseSql, TAG_BRANCH, TAG_BRANCH);
809817
}
@@ -1167,24 +1175,24 @@
11671175
rBefore = symbolic_name_to_mtime(zBefore);
11681176
rAfter = symbolic_name_to_mtime(zAfter);
11691177
rCirca = symbolic_name_to_mtime(zCirca);
11701178
if( rAfter>0.0 ){
11711179
if( rBefore>0.0 ){
1172
- blob_appendf(&sql,
1180
+ blob_appendf(&sql,
11731181
" AND event.mtime>=%.17g AND event.mtime<=%.17g"
11741182
" ORDER BY event.mtime ASC", rAfter-ONE_SECOND, rBefore+ONE_SECOND);
11751183
url_add_parameter(&url, "a", zAfter);
11761184
url_add_parameter(&url, "b", zBefore);
11771185
nEntry = 1000000;
11781186
}else{
1179
- blob_appendf(&sql,
1187
+ blob_appendf(&sql,
11801188
" AND event.mtime>=%.17g ORDER BY event.mtime ASC",
11811189
rAfter-ONE_SECOND);
11821190
url_add_parameter(&url, "a", zAfter);
11831191
}
11841192
}else if( rBefore>0.0 ){
1185
- blob_appendf(&sql,
1193
+ blob_appendf(&sql,
11861194
" AND event.mtime<=%.17g ORDER BY event.mtime DESC",
11871195
rBefore+ONE_SECOND);
11881196
url_add_parameter(&url, "b", zBefore);
11891197
}else if( rCirca>0.0 ){
11901198
Blob sql2;
@@ -1300,11 +1308,11 @@
13001308
/*
13011309
** The input query q selects various records. Print a human-readable
13021310
** summary of those records.
13031311
**
13041312
** Limit the number of entries printed to nLine.
1305
-**
1313
+**
13061314
** The query should return these columns:
13071315
**
13081316
** 0. rid
13091317
** 1. uuid
13101318
** 2. Date/Time
@@ -1334,11 +1342,11 @@
13341342
int nParent = db_column_int(q, 5);
13351343
char *zFree = 0;
13361344
int n = 0;
13371345
char zPrefix[80];
13381346
char zUuid[UUID_SIZE+1];
1339
-
1347
+
13401348
sqlite3_snprintf(sizeof(zUuid), zUuid, "%.10s", zId);
13411349
if( memcmp(zDate, zPrevDate, 10) ){
13421350
fossil_print("=== %.10s ===\n", zDate);
13431351
memcpy(zPrevDate, zDate, 10);
13441352
nLine++;
@@ -1368,11 +1376,11 @@
13681376
nLine += comment_print(zFree, 9, 79);
13691377
sqlite3_free(zFree);
13701378
13711379
if(showfiles){
13721380
if( !fchngQueryInit ){
1373
- db_prepare(&fchngQuery,
1381
+ db_prepare(&fchngQuery,
13741382
"SELECT (pid==0) AS isnew,"
13751383
" (fid==0) AS isdel,"
13761384
" (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name,"
13771385
" (SELECT uuid FROM blob WHERE rid=fid),"
13781386
" (SELECT uuid FROM blob WHERE rid=pid)"
@@ -1385,11 +1393,11 @@
13851393
db_bind_int(&fchngQuery, ":mid", rid);
13861394
while( db_step(&fchngQuery)==SQLITE_ROW ){
13871395
const char *zFilename = db_column_text(&fchngQuery, 2);
13881396
int isNew = db_column_int(&fchngQuery, 0);
13891397
int isDel = db_column_int(&fchngQuery, 1);
1390
- if( isNew ){
1398
+ if( isNew ){
13911399
fossil_print(" ADDED %s\n",zFilename);
13921400
}else if( isDel ){
13931401
fossil_print(" DELETED %s\n",zFilename);
13941402
}else{
13951403
fossil_print(" EDITED %s\n", zFilename);
@@ -1404,11 +1412,11 @@
14041412
/*
14051413
** Return a pointer to a static string that forms the basis for
14061414
** a timeline query for display on a TTY.
14071415
*/
14081416
const char *timeline_query_for_tty(void){
1409
- static const char zBaseSql[] =
1417
+ static const char zBaseSql[] =
14101418
@ SELECT
14111419
@ blob.rid AS rid,
14121420
@ uuid,
14131421
@ datetime(event.mtime,'localtime') AS mDateTime,
14141422
@ coalesce(ecomment,comment)
14151423
--- src/timeline.c
+++ src/timeline.c
@@ -192,10 +192,11 @@
192 const char *zThisUser, /* Suppress links to this user */
193 const char *zThisTag, /* Suppress links to this tag */
194 void (*xExtra)(int) /* Routine to call on each line of display */
195 ){
196 int wikiFlags;
 
197 int mxWikiLen;
198 Blob comment;
199 int prevTagid = 0;
200 int suppressCnt = 0;
201 char zPrevDate[20];
@@ -205,10 +206,11 @@
205 Stmt fchngQuery; /* Query for file changes on check-ins */
206 static Stmt qbranch;
207 int pendingEndTr = 0; /* True if a </td></tr> is needed */
208
209 zPrevDate[0] = 0;
 
210 mxWikiLen = db_get_int("timeline-max-comment", 0);
211 if( db_get_boolean("timeline-block-markup", 0) ){
212 wikiFlags = WIKI_INLINE;
213 }else{
214 wikiFlags = WIKI_INLINE | WIKI_NOBLOCK;
@@ -285,11 +287,11 @@
285 @ <td class="timelineGraph">
286 if( tmFlags & TIMELINE_UCOLOR ) zBgClr = zUser ? hash_color(zUser) : 0;
287 if( zType[0]=='c'
288 && (pGraph || zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0)
289 ){
290 db_reset(&qbranch);
291 db_bind_int(&qbranch, ":rid", rid);
292 if( db_step(&qbranch)==SQLITE_ROW ){
293 zBr = db_column_text(&qbranch, 0);
294 }else{
295 zBr = "trunk";
@@ -353,12 +355,18 @@
353 if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
354 Blob truncated;
355 blob_zero(&truncated);
356 blob_append(&truncated, blob_buffer(&comment), mxWikiLen);
357 blob_append(&truncated, "...", 3);
358 wiki_convert(&truncated, 0, wikiFlags);
 
 
 
 
359 blob_reset(&truncated);
 
 
360 }else{
361 wiki_convert(&comment, 0, wikiFlags);
362 }
363 blob_reset(&comment);
364
@@ -365,11 +373,11 @@
365 /* Generate the "user: USERNAME" at the end of the comment, together
366 ** with a hyperlink to another timeline for that user.
367 */
368 if( zTagList && zTagList[0]==0 ) zTagList = 0;
369 if( g.perm.Hyperlink && fossil_strcmp(zUser, zThisUser)!=0 ){
370 char *zLink = mprintf("%R/timeline?u=%h&c=%t&nd", zUser, zDate);
371 @ (user: %z(href("%z",zLink))%h(zUser)</a>%s(zTagList?",":"\051")
372 }else{
373 @ (user: %h(zUser)%s(zTagList?",":"\051")
374 }
375
@@ -390,11 +398,11 @@
390 while( z && z[0] ){
391 for(i=0; z[i] && (z[i]!=',' || z[i+1]!=' '); i++){}
392 if( zThisTag==0 || memcmp(z, zThisTag, i)!=0 || zThisTag[i]!=0 ){
393 blob_appendf(&links,
394 "%z%#h</a>%.2s",
395 href("%R/timeline?r=%#t&nd&c=%s",i,z,zDate), i,z, &z[i]
396 );
397 }else{
398 blob_appendf(&links, "%#h", i+2, z);
399 }
400 if( z[i]==0 ) break;
@@ -415,11 +423,11 @@
415
416 /* Generate the file-change list if requested */
417 if( (tmFlags & TIMELINE_FCHANGES)!=0 && zType[0]=='c' && g.perm.Hyperlink ){
418 int inUl = 0;
419 if( !fchngQueryInit ){
420 db_prepare(&fchngQuery,
421 "SELECT (pid==0) AS isnew,"
422 " (fid==0) AS isdel,"
423 " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name,"
424 " (SELECT uuid FROM blob WHERE rid=fid),"
425 " (SELECT uuid FROM blob WHERE rid=pid),"
@@ -484,11 +492,11 @@
484 pGraph = 0;
485 }else{
486 /* style is not moved to css, because this is
487 ** a technical div for the timeline graph
488 */
489 @ <tr><td /><td>
490 @ <div id="grbtm" style="width:%d(pGraph->mxRail*20+30)px;"></div>
491 @ </td></tr>
492 }
493 }
494 @ </table>
@@ -653,11 +661,11 @@
653 @ if( p.u>0 ) drawUpArrow(p.x, rowinfo[p.u-1].y+6, p.y-5);
654 if( !omitDescenders ){
655 @ if( p.u==0 ) drawUpArrow(p.x, 0, p.y-5);
656 @ if( p.f&1 ) drawBox("black",p.x-1,p.y-1,p.x+2,p.y+2);
657 @ if( p.d ) drawUpArrow(p.x, p.y+6, btm);
658 }
659 @ if( p.mo>0 ){
660 @ var x1 = p.mo + left - 1;
661 @ var y1 = p.y-3;
662 @ var x0 = x1>p.x ? p.x+7 : p.x-6;
663 @ var u = rowinfo[p.mu-1];
@@ -758,11 +766,11 @@
758
759 /*
760 ** Create a temporary table suitable for storing timeline data.
761 */
762 static void timeline_temp_table(void){
763 static const char zSql[] =
764 @ CREATE TEMP TABLE IF NOT EXISTS timeline(
765 @ rid INTEGER PRIMARY KEY,
766 @ uuid TEXT,
767 @ timestamp TEXT,
768 @ comment TEXT,
@@ -799,11 +807,11 @@
799 @ WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid
800 @ AND tagxref.rid=blob.rid AND tagxref.tagtype>0) AS tags,
801 @ tagid AS tagid,
802 @ brief AS brief,
803 @ event.mtime AS mtime
804 @ FROM event CROSS JOIN blob
805 @ WHERE blob.rid=event.objid
806 ;
807 if( zBase==0 ){
808 zBase = mprintf(zBaseSql, TAG_BRANCH, TAG_BRANCH);
809 }
@@ -1167,24 +1175,24 @@
1167 rBefore = symbolic_name_to_mtime(zBefore);
1168 rAfter = symbolic_name_to_mtime(zAfter);
1169 rCirca = symbolic_name_to_mtime(zCirca);
1170 if( rAfter>0.0 ){
1171 if( rBefore>0.0 ){
1172 blob_appendf(&sql,
1173 " AND event.mtime>=%.17g AND event.mtime<=%.17g"
1174 " ORDER BY event.mtime ASC", rAfter-ONE_SECOND, rBefore+ONE_SECOND);
1175 url_add_parameter(&url, "a", zAfter);
1176 url_add_parameter(&url, "b", zBefore);
1177 nEntry = 1000000;
1178 }else{
1179 blob_appendf(&sql,
1180 " AND event.mtime>=%.17g ORDER BY event.mtime ASC",
1181 rAfter-ONE_SECOND);
1182 url_add_parameter(&url, "a", zAfter);
1183 }
1184 }else if( rBefore>0.0 ){
1185 blob_appendf(&sql,
1186 " AND event.mtime<=%.17g ORDER BY event.mtime DESC",
1187 rBefore+ONE_SECOND);
1188 url_add_parameter(&url, "b", zBefore);
1189 }else if( rCirca>0.0 ){
1190 Blob sql2;
@@ -1300,11 +1308,11 @@
1300 /*
1301 ** The input query q selects various records. Print a human-readable
1302 ** summary of those records.
1303 **
1304 ** Limit the number of entries printed to nLine.
1305 **
1306 ** The query should return these columns:
1307 **
1308 ** 0. rid
1309 ** 1. uuid
1310 ** 2. Date/Time
@@ -1334,11 +1342,11 @@
1334 int nParent = db_column_int(q, 5);
1335 char *zFree = 0;
1336 int n = 0;
1337 char zPrefix[80];
1338 char zUuid[UUID_SIZE+1];
1339
1340 sqlite3_snprintf(sizeof(zUuid), zUuid, "%.10s", zId);
1341 if( memcmp(zDate, zPrevDate, 10) ){
1342 fossil_print("=== %.10s ===\n", zDate);
1343 memcpy(zPrevDate, zDate, 10);
1344 nLine++;
@@ -1368,11 +1376,11 @@
1368 nLine += comment_print(zFree, 9, 79);
1369 sqlite3_free(zFree);
1370
1371 if(showfiles){
1372 if( !fchngQueryInit ){
1373 db_prepare(&fchngQuery,
1374 "SELECT (pid==0) AS isnew,"
1375 " (fid==0) AS isdel,"
1376 " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name,"
1377 " (SELECT uuid FROM blob WHERE rid=fid),"
1378 " (SELECT uuid FROM blob WHERE rid=pid)"
@@ -1385,11 +1393,11 @@
1385 db_bind_int(&fchngQuery, ":mid", rid);
1386 while( db_step(&fchngQuery)==SQLITE_ROW ){
1387 const char *zFilename = db_column_text(&fchngQuery, 2);
1388 int isNew = db_column_int(&fchngQuery, 0);
1389 int isDel = db_column_int(&fchngQuery, 1);
1390 if( isNew ){
1391 fossil_print(" ADDED %s\n",zFilename);
1392 }else if( isDel ){
1393 fossil_print(" DELETED %s\n",zFilename);
1394 }else{
1395 fossil_print(" EDITED %s\n", zFilename);
@@ -1404,11 +1412,11 @@
1404 /*
1405 ** Return a pointer to a static string that forms the basis for
1406 ** a timeline query for display on a TTY.
1407 */
1408 const char *timeline_query_for_tty(void){
1409 static const char zBaseSql[] =
1410 @ SELECT
1411 @ blob.rid AS rid,
1412 @ uuid,
1413 @ datetime(event.mtime,'localtime') AS mDateTime,
1414 @ coalesce(ecomment,comment)
1415
--- src/timeline.c
+++ src/timeline.c
@@ -192,10 +192,11 @@
192 const char *zThisUser, /* Suppress links to this user */
193 const char *zThisTag, /* Suppress links to this tag */
194 void (*xExtra)(int) /* Routine to call on each line of display */
195 ){
196 int wikiFlags;
197 int plainText;
198 int mxWikiLen;
199 Blob comment;
200 int prevTagid = 0;
201 int suppressCnt = 0;
202 char zPrevDate[20];
@@ -205,10 +206,11 @@
206 Stmt fchngQuery; /* Query for file changes on check-ins */
207 static Stmt qbranch;
208 int pendingEndTr = 0; /* True if a </td></tr> is needed */
209
210 zPrevDate[0] = 0;
211 plainText = db_get_int("timeline-plaintext", 0);
212 mxWikiLen = db_get_int("timeline-max-comment", 0);
213 if( db_get_boolean("timeline-block-markup", 0) ){
214 wikiFlags = WIKI_INLINE;
215 }else{
216 wikiFlags = WIKI_INLINE | WIKI_NOBLOCK;
@@ -285,11 +287,11 @@
287 @ <td class="timelineGraph">
288 if( tmFlags & TIMELINE_UCOLOR ) zBgClr = zUser ? hash_color(zUser) : 0;
289 if( zType[0]=='c'
290 && (pGraph || zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0)
291 ){
292 db_reset(&qbranch);
293 db_bind_int(&qbranch, ":rid", rid);
294 if( db_step(&qbranch)==SQLITE_ROW ){
295 zBr = db_column_text(&qbranch, 0);
296 }else{
297 zBr = "trunk";
@@ -353,12 +355,18 @@
355 if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
356 Blob truncated;
357 blob_zero(&truncated);
358 blob_append(&truncated, blob_buffer(&comment), mxWikiLen);
359 blob_append(&truncated, "...", 3);
360 if( plainText ){
361 @ %h(blob_str(&truncated))
362 }else{
363 wiki_convert(&truncated, 0, wikiFlags);
364 }
365 blob_reset(&truncated);
366 }else if( plainText ){
367 @ %h(blob_str(&comment));
368 }else{
369 wiki_convert(&comment, 0, wikiFlags);
370 }
371 blob_reset(&comment);
372
@@ -365,11 +373,11 @@
373 /* Generate the "user: USERNAME" at the end of the comment, together
374 ** with a hyperlink to another timeline for that user.
375 */
376 if( zTagList && zTagList[0]==0 ) zTagList = 0;
377 if( g.perm.Hyperlink && fossil_strcmp(zUser, zThisUser)!=0 ){
378 char *zLink = mprintf("%R/timeline?u=%h&amp;c=%t&amp;nd", zUser, zDate);
379 @ (user: %z(href("%z",zLink))%h(zUser)</a>%s(zTagList?",":"\051")
380 }else{
381 @ (user: %h(zUser)%s(zTagList?",":"\051")
382 }
383
@@ -390,11 +398,11 @@
398 while( z && z[0] ){
399 for(i=0; z[i] && (z[i]!=',' || z[i+1]!=' '); i++){}
400 if( zThisTag==0 || memcmp(z, zThisTag, i)!=0 || zThisTag[i]!=0 ){
401 blob_appendf(&links,
402 "%z%#h</a>%.2s",
403 href("%R/timeline?r=%#t&amp;nd&amp;c=%t",i,z,zDate), i,z, &z[i]
404 );
405 }else{
406 blob_appendf(&links, "%#h", i+2, z);
407 }
408 if( z[i]==0 ) break;
@@ -415,11 +423,11 @@
423
424 /* Generate the file-change list if requested */
425 if( (tmFlags & TIMELINE_FCHANGES)!=0 && zType[0]=='c' && g.perm.Hyperlink ){
426 int inUl = 0;
427 if( !fchngQueryInit ){
428 db_prepare(&fchngQuery,
429 "SELECT (pid==0) AS isnew,"
430 " (fid==0) AS isdel,"
431 " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name,"
432 " (SELECT uuid FROM blob WHERE rid=fid),"
433 " (SELECT uuid FROM blob WHERE rid=pid),"
@@ -484,11 +492,11 @@
492 pGraph = 0;
493 }else{
494 /* style is not moved to css, because this is
495 ** a technical div for the timeline graph
496 */
497 @ <tr><td></td><td>
498 @ <div id="grbtm" style="width:%d(pGraph->mxRail*20+30)px;"></div>
499 @ </td></tr>
500 }
501 }
502 @ </table>
@@ -653,11 +661,11 @@
661 @ if( p.u>0 ) drawUpArrow(p.x, rowinfo[p.u-1].y+6, p.y-5);
662 if( !omitDescenders ){
663 @ if( p.u==0 ) drawUpArrow(p.x, 0, p.y-5);
664 @ if( p.f&1 ) drawBox("black",p.x-1,p.y-1,p.x+2,p.y+2);
665 @ if( p.d ) drawUpArrow(p.x, p.y+6, btm);
666 }
667 @ if( p.mo>0 ){
668 @ var x1 = p.mo + left - 1;
669 @ var y1 = p.y-3;
670 @ var x0 = x1>p.x ? p.x+7 : p.x-6;
671 @ var u = rowinfo[p.mu-1];
@@ -758,11 +766,11 @@
766
767 /*
768 ** Create a temporary table suitable for storing timeline data.
769 */
770 static void timeline_temp_table(void){
771 static const char zSql[] =
772 @ CREATE TEMP TABLE IF NOT EXISTS timeline(
773 @ rid INTEGER PRIMARY KEY,
774 @ uuid TEXT,
775 @ timestamp TEXT,
776 @ comment TEXT,
@@ -799,11 +807,11 @@
807 @ WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid
808 @ AND tagxref.rid=blob.rid AND tagxref.tagtype>0) AS tags,
809 @ tagid AS tagid,
810 @ brief AS brief,
811 @ event.mtime AS mtime
812 @ FROM event CROSS JOIN blob
813 @ WHERE blob.rid=event.objid
814 ;
815 if( zBase==0 ){
816 zBase = mprintf(zBaseSql, TAG_BRANCH, TAG_BRANCH);
817 }
@@ -1167,24 +1175,24 @@
1175 rBefore = symbolic_name_to_mtime(zBefore);
1176 rAfter = symbolic_name_to_mtime(zAfter);
1177 rCirca = symbolic_name_to_mtime(zCirca);
1178 if( rAfter>0.0 ){
1179 if( rBefore>0.0 ){
1180 blob_appendf(&sql,
1181 " AND event.mtime>=%.17g AND event.mtime<=%.17g"
1182 " ORDER BY event.mtime ASC", rAfter-ONE_SECOND, rBefore+ONE_SECOND);
1183 url_add_parameter(&url, "a", zAfter);
1184 url_add_parameter(&url, "b", zBefore);
1185 nEntry = 1000000;
1186 }else{
1187 blob_appendf(&sql,
1188 " AND event.mtime>=%.17g ORDER BY event.mtime ASC",
1189 rAfter-ONE_SECOND);
1190 url_add_parameter(&url, "a", zAfter);
1191 }
1192 }else if( rBefore>0.0 ){
1193 blob_appendf(&sql,
1194 " AND event.mtime<=%.17g ORDER BY event.mtime DESC",
1195 rBefore+ONE_SECOND);
1196 url_add_parameter(&url, "b", zBefore);
1197 }else if( rCirca>0.0 ){
1198 Blob sql2;
@@ -1300,11 +1308,11 @@
1308 /*
1309 ** The input query q selects various records. Print a human-readable
1310 ** summary of those records.
1311 **
1312 ** Limit the number of entries printed to nLine.
1313 **
1314 ** The query should return these columns:
1315 **
1316 ** 0. rid
1317 ** 1. uuid
1318 ** 2. Date/Time
@@ -1334,11 +1342,11 @@
1342 int nParent = db_column_int(q, 5);
1343 char *zFree = 0;
1344 int n = 0;
1345 char zPrefix[80];
1346 char zUuid[UUID_SIZE+1];
1347
1348 sqlite3_snprintf(sizeof(zUuid), zUuid, "%.10s", zId);
1349 if( memcmp(zDate, zPrevDate, 10) ){
1350 fossil_print("=== %.10s ===\n", zDate);
1351 memcpy(zPrevDate, zDate, 10);
1352 nLine++;
@@ -1368,11 +1376,11 @@
1376 nLine += comment_print(zFree, 9, 79);
1377 sqlite3_free(zFree);
1378
1379 if(showfiles){
1380 if( !fchngQueryInit ){
1381 db_prepare(&fchngQuery,
1382 "SELECT (pid==0) AS isnew,"
1383 " (fid==0) AS isdel,"
1384 " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name,"
1385 " (SELECT uuid FROM blob WHERE rid=fid),"
1386 " (SELECT uuid FROM blob WHERE rid=pid)"
@@ -1385,11 +1393,11 @@
1393 db_bind_int(&fchngQuery, ":mid", rid);
1394 while( db_step(&fchngQuery)==SQLITE_ROW ){
1395 const char *zFilename = db_column_text(&fchngQuery, 2);
1396 int isNew = db_column_int(&fchngQuery, 0);
1397 int isDel = db_column_int(&fchngQuery, 1);
1398 if( isNew ){
1399 fossil_print(" ADDED %s\n",zFilename);
1400 }else if( isDel ){
1401 fossil_print(" DELETED %s\n",zFilename);
1402 }else{
1403 fossil_print(" EDITED %s\n", zFilename);
@@ -1404,11 +1412,11 @@
1412 /*
1413 ** Return a pointer to a static string that forms the basis for
1414 ** a timeline query for display on a TTY.
1415 */
1416 const char *timeline_query_for_tty(void){
1417 static const char zBaseSql[] =
1418 @ SELECT
1419 @ blob.rid AS rid,
1420 @ uuid,
1421 @ datetime(event.mtime,'localtime') AS mDateTime,
1422 @ coalesce(ecomment,comment)
1423
+1 -1
--- src/undo.c
+++ src/undo.c
@@ -322,11 +322,11 @@
322322
** Complete the undo process is one is currently in process.
323323
*/
324324
void undo_finish(void){
325325
if( undoActive ){
326326
if( undoNeedRollback ){
327
- fossil_print("\"fossil undo\" is available to undo changes"
327
+ fossil_print(" \"fossil undo\" is available to undo changes"
328328
" to the working checkout.\n");
329329
}
330330
undoActive = 0;
331331
undoNeedRollback = 0;
332332
}
333333
--- src/undo.c
+++ src/undo.c
@@ -322,11 +322,11 @@
322 ** Complete the undo process is one is currently in process.
323 */
324 void undo_finish(void){
325 if( undoActive ){
326 if( undoNeedRollback ){
327 fossil_print("\"fossil undo\" is available to undo changes"
328 " to the working checkout.\n");
329 }
330 undoActive = 0;
331 undoNeedRollback = 0;
332 }
333
--- src/undo.c
+++ src/undo.c
@@ -322,11 +322,11 @@
322 ** Complete the undo process is one is currently in process.
323 */
324 void undo_finish(void){
325 if( undoActive ){
326 if( undoNeedRollback ){
327 fossil_print(" \"fossil undo\" is available to undo changes"
328 " to the working checkout.\n");
329 }
330 undoActive = 0;
331 undoNeedRollback = 0;
332 }
333
+2 -1
--- src/update.c
+++ src/update.c
@@ -423,14 +423,15 @@
423423
}
424424
if( islinkv || islinkt /* || file_wd_islink(zFullPath) */ ){
425425
fossil_print("***** Cannot merge symlink %s\n", zNewName);
426426
nConflict++;
427427
}else{
428
+ unsigned mergeFlags = nochangeFlag ? MERGE_DRYRUN : 0;
428429
undo_save(zName);
429430
content_get(ridt, &t);
430431
content_get(ridv, &v);
431
- rc = merge_3way(&v, zFullPath, &t, &r);
432
+ rc = merge_3way(&v, zFullPath, &t, &r, mergeFlags);
432433
if( rc>=0 ){
433434
if( !nochangeFlag ){
434435
blob_write_to_file(&r, zFullNewPath);
435436
file_wd_setexe(zFullNewPath, isexe);
436437
}
437438
--- src/update.c
+++ src/update.c
@@ -423,14 +423,15 @@
423 }
424 if( islinkv || islinkt /* || file_wd_islink(zFullPath) */ ){
425 fossil_print("***** Cannot merge symlink %s\n", zNewName);
426 nConflict++;
427 }else{
 
428 undo_save(zName);
429 content_get(ridt, &t);
430 content_get(ridv, &v);
431 rc = merge_3way(&v, zFullPath, &t, &r);
432 if( rc>=0 ){
433 if( !nochangeFlag ){
434 blob_write_to_file(&r, zFullNewPath);
435 file_wd_setexe(zFullNewPath, isexe);
436 }
437
--- src/update.c
+++ src/update.c
@@ -423,14 +423,15 @@
423 }
424 if( islinkv || islinkt /* || file_wd_islink(zFullPath) */ ){
425 fossil_print("***** Cannot merge symlink %s\n", zNewName);
426 nConflict++;
427 }else{
428 unsigned mergeFlags = nochangeFlag ? MERGE_DRYRUN : 0;
429 undo_save(zName);
430 content_get(ridt, &t);
431 content_get(ridv, &v);
432 rc = merge_3way(&v, zFullPath, &t, &r, mergeFlags);
433 if( rc>=0 ){
434 if( !nochangeFlag ){
435 blob_write_to_file(&r, zFullNewPath);
436 file_wd_setexe(zFullNewPath, isexe);
437 }
438
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -13,14 +13,14 @@
1313
#
1414
1515
#### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers.
1616
# By default, this is an empty string (i.e. use the native compiler).
1717
#
18
-PREFIX =
18
+# PREFIX =
1919
# PREFIX = mingw32-
2020
# PREFIX = i686-pc-mingw32-
21
-# PREFIX = i686-w64-mingw32-
21
+PREFIX = i686-w64-mingw32-
2222
# PREFIX = x86_64-w64-mingw32-
2323
2424
#### The toplevel directory of the source tree. Fossil can be built
2525
# in a directory that is separate from the source tree. Just change
2626
# the following to point from the build directory to the src/ folder.
@@ -42,19 +42,19 @@
4242
#
4343
# FOSSIL_ENABLE_JSON = 1
4444
4545
#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
4646
#
47
-# FOSSIL_ENABLE_SSL = 1
47
+FOSSIL_ENABLE_SSL = 1
4848
4949
#### Enable scripting support via Tcl/Tk
5050
#
51
-# FOSSIL_ENABLE_TCL = 1
51
+FOSSIL_ENABLE_TCL = 1
5252
5353
#### Load Tcl using the stubs mechanism
5454
#
55
-# FOSSIL_ENABLE_TCL_STUBS = 1
55
+FOSSIL_ENABLE_TCL_STUBS = 1
5656
5757
#### Use the Tcl source directory instead of the install directory?
5858
# This is useful when Tcl has been compiled statically with MinGW.
5959
#
6060
FOSSIL_TCL_SOURCE = 1
6161
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -13,14 +13,14 @@
13 #
14
15 #### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers.
16 # By default, this is an empty string (i.e. use the native compiler).
17 #
18 PREFIX =
19 # PREFIX = mingw32-
20 # PREFIX = i686-pc-mingw32-
21 # PREFIX = i686-w64-mingw32-
22 # PREFIX = x86_64-w64-mingw32-
23
24 #### The toplevel directory of the source tree. Fossil can be built
25 # in a directory that is separate from the source tree. Just change
26 # the following to point from the build directory to the src/ folder.
@@ -42,19 +42,19 @@
42 #
43 # FOSSIL_ENABLE_JSON = 1
44
45 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
46 #
47 # FOSSIL_ENABLE_SSL = 1
48
49 #### Enable scripting support via Tcl/Tk
50 #
51 # FOSSIL_ENABLE_TCL = 1
52
53 #### Load Tcl using the stubs mechanism
54 #
55 # FOSSIL_ENABLE_TCL_STUBS = 1
56
57 #### Use the Tcl source directory instead of the install directory?
58 # This is useful when Tcl has been compiled statically with MinGW.
59 #
60 FOSSIL_TCL_SOURCE = 1
61
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -13,14 +13,14 @@
13 #
14
15 #### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers.
16 # By default, this is an empty string (i.e. use the native compiler).
17 #
18 # PREFIX =
19 # PREFIX = mingw32-
20 # PREFIX = i686-pc-mingw32-
21 PREFIX = i686-w64-mingw32-
22 # PREFIX = x86_64-w64-mingw32-
23
24 #### The toplevel directory of the source tree. Fossil can be built
25 # in a directory that is separate from the source tree. Just change
26 # the following to point from the build directory to the src/ folder.
@@ -42,19 +42,19 @@
42 #
43 # FOSSIL_ENABLE_JSON = 1
44
45 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
46 #
47 FOSSIL_ENABLE_SSL = 1
48
49 #### Enable scripting support via Tcl/Tk
50 #
51 FOSSIL_ENABLE_TCL = 1
52
53 #### Load Tcl using the stubs mechanism
54 #
55 FOSSIL_ENABLE_TCL_STUBS = 1
56
57 #### Use the Tcl source directory instead of the install directory?
58 # This is useful when Tcl has been compiled statically with MinGW.
59 #
60 FOSSIL_TCL_SOURCE = 1
61
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -13,14 +13,14 @@
1313
#
1414
1515
#### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers.
1616
# By default, this is an empty string (i.e. use the native compiler).
1717
#
18
-PREFIX =
18
+# PREFIX =
1919
# PREFIX = mingw32-
2020
# PREFIX = i686-pc-mingw32-
21
-# PREFIX = i686-w64-mingw32-
21
+PREFIX = i686-w64-mingw32-
2222
# PREFIX = x86_64-w64-mingw32-
2323
2424
#### The toplevel directory of the source tree. Fossil can be built
2525
# in a directory that is separate from the source tree. Just change
2626
# the following to point from the build directory to the src/ folder.
@@ -42,19 +42,19 @@
4242
#
4343
# FOSSIL_ENABLE_JSON = 1
4444
4545
#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
4646
#
47
-# FOSSIL_ENABLE_SSL = 1
47
+FOSSIL_ENABLE_SSL = 1
4848
4949
#### Enable scripting support via Tcl/Tk
5050
#
51
-# FOSSIL_ENABLE_TCL = 1
51
+FOSSIL_ENABLE_TCL = 1
5252
5353
#### Load Tcl using the stubs mechanism
5454
#
55
-# FOSSIL_ENABLE_TCL_STUBS = 1
55
+FOSSIL_ENABLE_TCL_STUBS = 1
5656
5757
#### Use the Tcl source directory instead of the install directory?
5858
# This is useful when Tcl has been compiled statically with MinGW.
5959
#
6060
FOSSIL_TCL_SOURCE = 1
6161
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -13,14 +13,14 @@
13 #
14
15 #### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers.
16 # By default, this is an empty string (i.e. use the native compiler).
17 #
18 PREFIX =
19 # PREFIX = mingw32-
20 # PREFIX = i686-pc-mingw32-
21 # PREFIX = i686-w64-mingw32-
22 # PREFIX = x86_64-w64-mingw32-
23
24 #### The toplevel directory of the source tree. Fossil can be built
25 # in a directory that is separate from the source tree. Just change
26 # the following to point from the build directory to the src/ folder.
@@ -42,19 +42,19 @@
42 #
43 # FOSSIL_ENABLE_JSON = 1
44
45 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
46 #
47 # FOSSIL_ENABLE_SSL = 1
48
49 #### Enable scripting support via Tcl/Tk
50 #
51 # FOSSIL_ENABLE_TCL = 1
52
53 #### Load Tcl using the stubs mechanism
54 #
55 # FOSSIL_ENABLE_TCL_STUBS = 1
56
57 #### Use the Tcl source directory instead of the install directory?
58 # This is useful when Tcl has been compiled statically with MinGW.
59 #
60 FOSSIL_TCL_SOURCE = 1
61
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -13,14 +13,14 @@
13 #
14
15 #### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers.
16 # By default, this is an empty string (i.e. use the native compiler).
17 #
18 # PREFIX =
19 # PREFIX = mingw32-
20 # PREFIX = i686-pc-mingw32-
21 PREFIX = i686-w64-mingw32-
22 # PREFIX = x86_64-w64-mingw32-
23
24 #### The toplevel directory of the source tree. Fossil can be built
25 # in a directory that is separate from the source tree. Just change
26 # the following to point from the build directory to the src/ folder.
@@ -42,19 +42,19 @@
42 #
43 # FOSSIL_ENABLE_JSON = 1
44
45 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
46 #
47 FOSSIL_ENABLE_SSL = 1
48
49 #### Enable scripting support via Tcl/Tk
50 #
51 FOSSIL_ENABLE_TCL = 1
52
53 #### Load Tcl using the stubs mechanism
54 #
55 FOSSIL_ENABLE_TCL_STUBS = 1
56
57 #### Use the Tcl source directory instead of the install directory?
58 # This is useful when Tcl has been compiled statically with MinGW.
59 #
60 FOSSIL_TCL_SOURCE = 1
61

Keyboard Shortcuts

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