Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch ui-local-diff Excluding Merge-Ins
This is equivalent to a diff from 65d97f23f6 to 462eb0cca0
|
2023-01-24
| ||
| 19:01 | Add initial infrastructure for being able to resolve 'ckout' uniformly in certain contexts, per /chat discussion. ... (check-in: 4d8c30265b user: stephan tags: trunk) | |
| 16:34 | Make all variable declarations C89 compliant. ... (Leaf check-in: 462eb0cca0 user: drh tags: ui-local-diff) | |
| 03:59 | Wrapping a few calls to vfile_check_signature() from the new local diff code in unprotect/pop call pairs to squish a DB protection error. ... (check-in: 1b3ef05ef9 user: wyoung tags: ui-local-diff) | |
| 03:29 | Brought the ui-local-diff branch up to date relative to trunk. It isn't a simple merge, primarily due to all the changes to /vdiff and /fdiff made over the past 2 years. It seems to work as well as it originally did, but it isn't ready to merge down to trunk as-is. ... (check-in: 76fa165763 user: wyoung tags: ui-local-diff) | |
| 03:18 | Replaced a standalone "diffFlags" variable in the /fdiff handler with use of the new DiffConfig.diffFlags member. No functional change, just a code cleanup found while working on another branch. Making it on trunk to keep that branch's diffs minimal. ... (check-in: 65d97f23f6 user: wyoung tags: trunk) | |
|
2023-01-23
| ||
| 00:12 | Add /json/settings/get and set APIs, per discussion in [forum:04b7159d63d4abe4|forum post 04b7159d63d4abe4]. ... (check-in: a80f27485a user: stephan tags: trunk) | |
Changes to src/checkin.c.
| ︙ | |||
64 65 66 67 68 69 70 | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | - + | ** all unmanaged files contained underneath those directories. If there ** are no files or directories named on the command-line, then add all ** unmanaged files anywhere in the check-out. ** ** This routine never follows symlinks. It always treats symlinks as ** object unto themselves. */ |
| ︙ |
Changes to src/diff.c.
| ︙ | |||
96 97 98 99 100 101 102 103 104 105 106 107 108 109 | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | + | int nContext; /* Number of lines of context */ int wColumn; /* Column width in -y mode */ u32 nFile; /* Number of files diffed so far */ const char *zDiffCmd; /* External diff command to use instead of builtin */ const char *zBinGlob; /* GLOB pattern for binary files */ ReCompiled *pRe; /* Show only changes matching this pattern */ const char *zLeftHash; /* HASH-id of the left file */ const char *zLocalName; /* Filename for /localdiff case */ }; #endif /* INTERFACE */ /* ** Initialize memory for a DiffConfig based on just a diffFlags integer. */ |
| ︙ |
Changes to src/info.c.
| ︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 19 20 21 22 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 | + + + + + + + + + + + + + + + + + + + + + + + | ** "info" command gives command-line access to information about ** the current tree, or a particular artifact or check-in. */ #include "config.h" #include "info.h" #include <assert.h> /*----------------------------------------------------------------------------- ** LOCAL DIFF CHANGES ** ** The goal is to show "(working) changes in the current checkout" in much the ** same way as the current "check-in" pages show the changes within a check-in. ** ** The page is on "/local" (no parameters needed; an alias of "/vinfo" and ** "/ci"), but at present there are no links to it within Fossil. Other changes: ** "/localpatch" produces a patch-set for all changes in the current checkout; ** "/localdiff" is an alias for "/fdiff" to show changes for an individual file; ** both "/file" and "/hexdump" have been extended to support local files. ** ** A number of points-of-query are labeld "TODO:LD". Most relate to these ** changes, although some are about existing code. ** ** In "checkin.c", the function "locate_unmanaged_files()" has been made ** non-static so that it can be called from here. **----------------------------------------------------------------------------- ** Options to control the "local changes" changes. At present, these are ** defines: if these changes are adopted, some may want to be made into ** configuration options. -----------------------------------------------------------------------------*/ /* ** Return a string (in memory obtained from malloc) holding a ** comma-separated list of tags that apply to check-in with ** record-id rid. If the "propagatingOnly" flag is true, then only ** show branch tags (tags that propagate to children). ** ** Return NULL if there are no such tags. |
| ︙ | |||
320 321 322 323 324 325 326 327 328 329 330 331 332 333 | 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 | + + + + + + + + + + + + + + + + + |
|TIMELINE_NOSCROLL
|TIMELINE_XMERGE
|TIMELINE_CHPICK,
0, 0, 0, rid, rid2, 0);
db_finalize(&q);
}
/*
** Read the content of file zName (prepended with the checkout directory) and
** put it into the uninitialized blob, returning 1. The blob is zeroed if the
** file does not exist or cannot be accessed, in which case it returns 0.
*/
static int content_from_file(
const char *zName, /* Filename (relative to checkout) of file to be read */
Blob *pBlob /* Pointer to blob to receive contents */
){
const char *zFullPath = mprintf("%s%s", g.zLocalRoot, zName);
blob_zero(pBlob);
if( file_size(zFullPath, ExtFILE)<0 ){
return 0;
}
blob_read_from_file(pBlob, zFullPath, ExtFILE);
return 1;
}
/*
** Append the difference between artifacts to the output
*/
static void append_diff(
const char *zFrom, /* Diff from this artifact */
const char *zTo, /* ... to this artifact */
|
| ︙ | |||
343 344 345 346 347 348 349 350 351 352 353 354 355 356 | 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 | + + |
}else{
blob_zero(&from);
pCfg->zLeftHash = 0;
}
if( zTo ){
toid = uuid_to_rid(zTo, 0);
content_get(toid, &to);
}else if( pCfg->zLocalName ){ /* Read the file on disk */
content_from_file(pCfg->zLocalName, &to);
}else{
blob_zero(&to);
}
if( pCfg->diffFlags & DIFF_SIDEBYSIDE ){
pCfg->diffFlags |= DIFF_HTML | DIFF_NOTTOOBIG;
}else{
pCfg->diffFlags |= DIFF_LINENO | DIFF_HTML | DIFF_NOTTOOBIG;
|
| ︙ | |||
433 434 435 436 437 438 439 440 441 442 443 444 445 446 | 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
}else if( zOld && zNew && fossil_strcmp(zOld,zNew)!=0 ){
@
@ %z(href("%R/fdiff?v1=%!S&v2=%!S",zOld,zNew))[diff]</a>
}
}
@ </p>
}
/*
** Append notice of executable or symlink being gained or lost.
*/
static void append_status(
const char *zAction, /* Whether status was gained or lost */
const char *zStatus, /* The status that was gained/lost */
const char *zName, /* Name of file */
const char *zOld /* Existing artifact */
){
if( !g.perm.Hyperlink ){
@ %h(zName) %h(zAction) %h(zStatus) status.
}else{
@ %z(href("%R/finfo?name=%T&m=%!S",zName,zOld))%h(zName)</a>
@ from %z(href("%R/artifact/%!S",zOld))[%S(zOld)]</a>
@ %h(zAction) %h(zStatus) status.
}
}
/*
** Append web-page output that shows changes between a file at last check-in
** and its current state on disk (i.e. any uncommitted changes). The status
** ("changed", "missing" etc.) is a blend of that from append_file_change_line()
** and diff_against_disk() (in "diffcmd.c").
**
** The file-differences (if being shown) use append_diff() as before, but
** there is an additional parameter (zLocal) which, if non-NULL, causes it
** to compare the checked-in version against the named file on disk.
*/
static void append_local_file_change_line(
const char *zName, /* Name of the file that has changed */
const char *zOld, /* blob.uuid before change. NULL for added files */
int isDeleted, /* Has the file-on-disk been removed from Fossil? */
int isChnged, /* Has the file changed in some way (see vfile.c) */
int isNew, /* Has the file been ADDed but not yet committed? */
int isLink, /* Is the file a symbolic link? */
DiffConfig *pCfg, /* Flags for text_diff() or NULL to omit all */
int pass /* 0x01 - Display single-line entries only */
/* 0x02 - Display entries with "diff blocks" only */
/* 0x03 - Display both */
){
/* This remembers whether a side-by-side "diff-block" was shown the last
** time through. If it was, we will add "<hr/>" to better separate the
** blocks.
*/
static int diffShownLastTime = 0;
char *zFullName = mprintf("%s%s", g.zLocalRoot, zName);
int isFilePresent = !file_access(zFullName, F_OK);
/* Determing up-front whether we would be showing a "diff-block" so we can
** filter them according to which pass we are on: the first pass will show
** only the "single-line" entries; the second will show only those with
** diff-blocks.
*/
int showDiff = ( isDeleted && isFilePresent )
|| ( !isDeleted && !isNew && ( ( isChnged == 1 )
|| ( isChnged == 2 )
|| ( isChnged == 4 )
)
);
/* We don't use 'diffFlags' in these tests so that whether "Hide diffs" is
** in effect or not, the order won't change.
*/
if( showDiff && (pass == 1) ){ return; } /* Don't do diff on pass 1 of 2 */
if( !showDiff && (pass == 2) ){ return; } /* Don't do line on pass 2 of 2 */
/* If a SBS diff-block was shown by the previous entry, add a divider */
if( diffShownLastTime && (pCfg->diffFlags & DIFF_SIDEBYSIDE) ){
@ <hr/>
}
/* Record whether we will be showing a diff-block this time. We DO factor in
** 'diffFlags' here so that in "Hide diffs" mode, we don't get extra lines.
*/
diffShownLastTime = showDiff && pCfg->diffFlags;
@ <p>
if( !g.perm.Hyperlink ){
if( isDeleted ){
if( isFilePresent ){
@ Deleted %h(zName) (still present as a local file).
}else{
@ Deleted %h(zName).
}
}else if( isNew ){
if( isFilePresent ){
@ Added %h(zName) but not committed.
}else{
@ Missing %h(zName) (was added to checkout).
}
}else switch( isChnged ){
case 3:
@ Added %h(zName) due to a merge.
break;
case 5:
@ Added %h(zName) due to an integrate-merge.
break;
case 6: append_status( "gained", "executable", zName, zOld); break;
case 7: append_status( "gained", "symlink", zName, zOld); break;
case 8: append_status( "lost", "executable", zName, zOld); break;
case 9: append_status( "lost", "symlink", zName, zOld); break;
default: /* Normal edit */
switch( isChnged ){
case 1:
@ Local changes
break;
case 2:
@ Merge
break;
case 4:
@ Integrate-merge
break;
}
@ of %h(zName).
}
if( showDiff && pCfg ){
append_diff(zOld, zName, pCfg);
}
}else{ /* With hyperlinks */
if( isDeleted ){
if( isFilePresent ){ /* DELETEd but still on disk */
@ Deleted %z(href("%R/finfo?name=%T&m=%!S",zName,zOld))%h(zName)</a>
@ from %z(href("%R/artifact/%!S",zOld))[%S(zOld)]</a> (still present
@ as %z(href("%R/file/%T?ci=ckout&annot=removed from checkout",zName))
@ [local file]</a>).
}else{ /* DELETEd and deleted from disk */
@ Deleted %z(href("%R/finfo?name=%T&m=%!S",zName,zOld))%h(zName)</a>
@ from %z(href("%R/artifact/%!S",zOld))[%S(zOld)]</a>.
}
}else if( isNew ){
if( isFilePresent ){ /* ADDed and present on disk */
@ Added %z(href("%R/file/%T?ci=ckout",zName))%h(zName)</a>
@ but not committed.
}else{ /* ADDed but not present on disk */
@ Missing %h(zName) (was added to checkout).
}
}else switch( isChnged ){
case 3: /* Added by a merge */
@ Added
@ %z(href("%R/file/%T?ci=ckout&annot=added by merge",zName))%h(zName)
@ </a> to %z(href("%R/artifact/%!S",zOld))[%S(zOld)]</a> due to merge.
break;
case 5: /* Added by an integration merge */
@ Added
@ %z(href("%R/file/%T?ci=ckout&annot=added by integration-merge",zName))
@ %h(zName)</a> to
@ %z(href("%R/artifact/%!S",zOld))[%S(zOld)]</a> due to integrate merge.
break;
case 6: append_status( "gained", "executable", zName, zOld); break;
case 7: append_status( "gained", "symlink", zName, zOld); break;
case 8: append_status( "lost", "executable", zName, zOld); break;
case 9: append_status( "lost", "symlink", zName, zOld); break;
default: /* Normal edit */
switch( isChnged ){
case 1:
@ Local changes
break;
case 2:
@ Merge
break;
case 4:
@ Integrate-merge
break;
}
@ of %z(href("%R/finfo?name=%T&m=%!S",zName,zOld))%h(zName)</a>
@ from %z(href("%R/artifact/%!S",zOld))[%S(zOld)]</a> to
@ %z(href("%R/file/%T?ci=ckout&annot=edited locally",zName))
@ [local file]</a>
}
if( showDiff ){
if( pCfg ){
append_diff(zOld, zName, pCfg);
}else if( isChnged ){
@
@ %z(href("%R/localdiff?name=%T&from=%!S",zName,zOld))[diff]</a>
}
}
}
@ </p>
fossil_free(zFullName);
}
/*
** Generate javascript to enhance HTML diffs.
*/
void append_diff_javascript(int diffType){
if( diffType==0 ) return;
builtin_fossil_js_bundle_or("diff", NULL);
|
| ︙ | |||
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 | 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
db_prepare(&q, "%s", blob_sql_text(&sql));
www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
0, 0, 0, rid, 0, 0);
db_finalize(&q);
style_finish_page();
}
/*
** Options for the "extras" report in "local-diff" mode. The bit-mask versions
** are used for "&ef=.." to select which category(ies) to show.
*/
enum {
EXB_PLAIN, EXB_IGNORE, EXB_CLEAN, EXB_KEEP,
EX_PLAIN = 1 << EXB_PLAIN, /* Matches none of the others */
EX_IGNORE = 1 << EXB_IGNORE, /* Matches "ignore-glob" */
EX_CLEAN = 1 << EXB_CLEAN, /* Matches "clean-glob" */
EX_KEEP = 1 << EXB_KEEP, /* Matches "keep-glob" */
EX_ALL = EX_PLAIN /* All entries */
| EX_IGNORE
| EX_CLEAN
| EX_KEEP
};
/*
** Called while generating "/local": appends a report of any "extra" files that
** might be present in the current checkout.
**
** The format is controlled by "zExtra" (the value from the "ex=" URL option).
** This is converted to an int ("extrasFlags") and treated as a collection of
** the EX_xxx flags defined above. Thus "1" will list all "plain" files:
** unmanaged files that match none of the ignore/clean/keep blob-lists, and "2"
** would list all files matching the ignore-blob setting. "3" would list both
** those sets of files.
**
** An empty "zExtra" is a special case: it converts to zero which would normally
** select none of the EX_xxx flags above. Instead, it is converted to EX_PLAIN
** (=1) but with a (smallish) upper-limit on the number of files that will be
** listed. This is the "default" mode as it offers a combination of usefulness
** and non-intrusiveness:
** o If the glob-lists are configured well, the only files that will show are
** likely to be new source files that have not been "fossil add"ed.
** o If the glob-lists HAVEN'T been configured, only a relatively small number
** of temporary files (e.g. ".o" or ".obj") will be shown.
**
*/
static void append_extras_report(
const char *zExtra, /* Value of "ef=" from URL */
const int diffType, /* Used to preserve current */
const char *zW /* settings in URLs */
){
const char *zIgnoreFlag, *zKeepFlag, *zCleanFlag;
Glob *pIgnore, *pKeep, *pClean;
int nRoot;
Stmt q;
Blob repo;
int maxExtrasToShow = 5; /* Before showing "+ xx others" */
int extrasFlags = atoi(zExtra); /* Which entries to show */
int nExtras;
int nMatch;
int nShown;
int nPlain;
int nIgnore;
int nClean;
int nKeep;
zIgnoreFlag = db_get("ignore-glob", 0); /* Patterns to ignore */
zCleanFlag = db_get("clean-glob", 0); /* ...that "clean" clobbers */
zKeepFlag = db_get("keep-glob", 0); /* ...that "clean" won't touch */
pIgnore = glob_create(zIgnoreFlag); /* Object versions of above */
pKeep = glob_create(zKeepFlag);
pClean = glob_create(zCleanFlag);
nRoot = (int)strlen(g.zLocalRoot); /* Length of root component */
locate_unmanaged_files(0, NULL, 0, NULL); /* Get all unmanaged files */
/*TODO:LD
** The first two of these exclusions come from clean_cmd() in checkin.c.
** Not sure exactly what they are intended to do (seem to have no effect on
** my test repos).
*/
if( file_tree_name(g.zRepositoryName, &repo, 0, 0) ){
db_multi_exec("DELETE FROM sfile WHERE pathname=%B", &repo);
}
db_multi_exec("DELETE FROM sfile WHERE pathname IN"
" (SELECT pathname FROM vfile)");
db_multi_exec("DELETE FROM sfile WHERE pathname IN (%s)",
fossil_all_reserved_names(0));
/* Handle the special case where zExtra was empty (and got converted to zero).
** If so, show "plain" files (those not matching any glob-list) but with an
** upper limit to the number shown (set above). If a value WAS given (i.e.
** after following a link), display all of the selected entries. */
if( extrasFlags==0 ){
extrasFlags = EX_PLAIN;
}else{
maxExtrasToShow = 0x7fffffff; /* Basically, all of them... */
}
/* Describe the files listed. Currently, the only "built-in" options are to
** list "plain" files (those unmanaged files not matching any glob-list),
** or to list those files matching ONE of the glob-lists. However, manual
** editing would allow selecting combinations of matching files.
**
** If only EX_PLAIN is present, then other types are explicitly excluded
** by definition: PLAIN means "not matching any glob-list". For all other
** cases, we cannot say things like "not ignored" because a file can match
** more than one list.
*/
@ <p><b>Extra Files
if( extrasFlags == EX_PLAIN ){
@ (unmanaged, not ignored, not for cleaning, not kept)
}else{
Blob desc;
blob_zero(&desc);
if( extrasFlags & EX_PLAIN ){ blob_appendf(&desc, " + unmanaged" ); }
if( extrasFlags & EX_IGNORE ){ blob_appendf(&desc, " + ignored" ); }
if( extrasFlags & EX_CLEAN ){ blob_appendf(&desc, " + to be cleaned"); }
if( extrasFlags & EX_KEEP ){ blob_appendf(&desc, " + to be kept" ); }
if( blob_size(&desc) > 3 ){ /* Should never fail... */
/* Add the string built above, skipping the leading " + " */
@ (%h(blob_str(&desc)+3))
}
blob_reset(&desc);
}
@ </b></p>
db_prepare(&q,
"SELECT %Q || pathname FROM sfile"
" ORDER BY 1", /*TODO:LD Order by pathname, as for differences? */
g.zLocalRoot
);
/*
** Put the file-list in one paragraph with line-breaks between.
*/
@ <p>
nExtras = nMatch = nShown = nPlain = nKeep = nClean = nIgnore = 0;
while( db_step(&q)==SQLITE_ROW ){
const char *zName = db_column_text(&q, 0);
int entryFlags = 0
| ( glob_match(pIgnore, zName+nRoot) ? EX_IGNORE : 0 )
| ( glob_match(pClean, zName+nRoot) ? EX_CLEAN : 0 )
| ( glob_match(pKeep, zName+nRoot) ? EX_KEEP : 0 ) ;
if( entryFlags == 0 ){
entryFlags = EX_PLAIN;
}
if( entryFlags & EX_PLAIN ){ nPlain++; }
if( entryFlags & EX_IGNORE ){ nIgnore++; }
if( entryFlags & EX_CLEAN ){ nClean++; }
if( entryFlags & EX_KEEP ){ nKeep++; }
nExtras++;
if( entryFlags & extrasFlags ){
nMatch++ ;
if( nShown < maxExtrasToShow ){
nShown++;
if( g.perm.Hyperlink ){
@ %z(href("%R/file/%T?ci=ckout&annot=not managed",zName+nRoot))
@ %h(zName+nRoot)</a>
}else{
@ %h(zName+nRoot)
}
if( entryFlags & EX_IGNORE ){
@ (marked ignore)
}
if( entryFlags & EX_CLEAN ){
@ (marked clean)
}
if( entryFlags & EX_KEEP ){
@ (marked keep)
}
@ <br/>
}
}
}
if( nShown < nMatch ){
const int nHidden = nMatch - nShown;
@ ... plus %d(nHidden) other matching file%h(nHidden==1?"":"s")
@ (%z(href("/local?diff=%d%s&ef=%d",diffType,zW,extrasFlags))
@ show all)</a>.
}
@ </p>
@ <p>
if( nExtras==0 ){
@ No unmanaged files in checkout\
}else if( (nPlain==0) && (P("ef")==NULL) ){
@ No extra files in checkout
@ (%z(href("%R/local?diff=%d%s&ef=1",diffType,zW))show exclusions</a>)\
}else{
/* Report types and counts of extra files, with links to see all of the
** selected type. Note the extra space before "including": the output of
** append_count() ends with "\" to get the formatting correct.
*/
append_count( EX_ALL, nExtras, "extra file", 1, 0, diffType,zW );
@ including
append_count( EX_PLAIN, nPlain, "unmanaged", 0, 1, diffType,zW );
append_count( EX_IGNORE, nIgnore, "marked ignore", 0, 1, diffType,zW );
append_count( EX_CLEAN, nClean, "to be cleaned", 0, 1, diffType,zW );
append_count( EX_KEEP, nKeep, "to be kept", 0, 1, diffType,zW );
}
@ .</p><hr/>
blob_reset(&repo);
db_finalize(&q);
}
/*
** Append "26 extra files" type message as a link (assuming count is non-zero),
** with pluralisation if requested and needed. If "commaBefore" is true, the
** link is preceded by ", " if there have been earler entries with commaBefore
** set. If false, it resets the count. This allows correct construction of
** variants like:
** 27 extra files including 27 ignored.
** 30 extra files including 3 unmanaged, 27 ignored.
** The dt (diffType) and zW parameters pass on formatting selections from the
** rest of the /local page.
*/
void append_count(
int ef, /* Flags for link */
int count, /* Number of files */
const char *linkText, /* Link text after count */
int pluralise, /* Add optional "s"? */
int commaBefore, /* Precede with ", " if earlier non-zero counts */
int dt, /* DiffType */
const char *zW /* Whitespace setting ("" or "&w") */
){
static int earlierCounts = 0;
if( count == 0 ){
return;
}
if( !commaBefore ){
earlierCounts = 0 ;
}else if( earlierCounts ){
@ ,
}
@ %z(href("%R/local?diff=%d%s&ef=%d",dt,zW,ef))%d(count) %h(linkText)\
if( pluralise ){
@ %h(count==1?"":"s")\
}
@ </a>\
if( commaBefore ){
earlierCounts += count;
}
}
/*
** WEBPAGE: vinfo
** WEBPAGE: ci
** WEBPAGE: local
** URL: /ci/ARTIFACTID
** OR: /ci?name=ARTIFACTID
**
** Display information about a particular check-in. The exact
** same information is shown on the /info page if the name query
** parameter to /info describes a check-in.
**
** The ARTIFACTID can be a unique prefix for the HASH of the check-in,
** or a tag or branch name that identifies the check-in.
**
** Use of /local (or the use of "ckout" for ARTIFACTID) will show the
** same header details as /ci/tip, but then displays any (uncommitted)
** edits made to files in the checkout directory. It can also display
** any "extra" files (roughly equivalent to "fossil extras").
*/
void ci_page(void){
Stmt q1, q2, q3;
int rid;
int isLeaf;
int diffType; /* 0: no diff, 1: unified, 2: side-by-side */
const char *zName; /* Name of the check-in to be displayed */
const char *zUuid; /* Hash of zName, found via blob.uuid */
const char *zParent; /* Hash of the parent check-in (if any) */
const char *zRe; /* regex parameter */
ReCompiled *pRe = 0; /* regex */
const char *zW; /* URL param for ignoring whitespace */
const char *zPage = "vinfo"; /* Page that shows diffs */
const char *zPageHide = "ci"; /* Page that hides diffs */
const char *zBrName; /* Branch name */
DiffConfig DCfg,*pCfg; /* Type of diff */
int bLocalMode; /* TRUE for /local; FALSE otherwise */
int vid; /* Virtual file system? */
int showExtras; /* Whether to show the extras report */
const char *zExtra; /* How to show the report */
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
style_set_current_feature("vinfo");
zName = P("name");
/*
** "zExtra" controls if, and how, the "extras report" is displayed. It is a
** string, because when passed around in the URL (as "ef=") a value of "" has
** a different meaning to "0". A value of "" means "show a limited number of
** unmanaged files" (those that aren't ignored, marked to be cleaned, or
** marked kept)... this is what you'd most want to see if you've created a new
** source file and forgotten to "fossil add" it. A value of "0" will hide the
** extras report. Other (numeric) values control what the report shows (e.g.
** "1" would list ALL unmanaged files without limiting their number).
**
** If the "ef=" is absent then default to "" (show (some) unmanaged files).
*/
zExtra = P("ef");
if( zExtra==NULL ) {
zExtra = "";
}
showExtras = strcmp(zExtra,"0")!=0;
/* Local mode is selected by either "/local" or with a "name" of "ckout".
** First, check we have access to the checkout (and report to the user if we
** don't), then refresh the "vfile" table (recording which files in the
** checkout have changed etc.). We then change the "name" parameter to "tip"
** so that the "header" section displays info about the check-in that the
** checkout came from.
*/
bLocalMode = (g.zPath[0]=='l') || (fossil_strcmp(zName,"ckout")==0);
if( bLocalMode ){
vid = g.localOpen ? db_lget_int("checkout", 0) : 0;
if( vid==0 ){
style_header("No Local Checkout");
@ No access to local checkout.
style_finish_page();
return;
}
db_unprotect(PROTECT_NONE);
vfile_check_signature(vid, CKSIG_ENOTFILE);
db_protect_pop();
zName = "tip";
cgi_replace_parameter("name","tip"); /* Needed to get rid below */
}
rid = name_to_rid_www("name");
if( rid==0 ){
style_header("Check-in Information Error");
@ No such object: %h(zName)
style_finish_page();
return;
}
|
| ︙ | |||
646 647 648 649 650 651 652 | 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 | - + + + + - + + |
" datetime(omtime,toLocal()), mtime"
" FROM blob, event"
" WHERE blob.rid=%d"
" AND event.objid=%d",
rid, rid
);
zBrName = branch_of_rid(rid);
|
| ︙ | |||
875 876 877 878 879 880 881 | 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 | + + + + - + + + + + + + + + + |
if( !PB("nowiki") ){
wiki_render_associated("checkin", zUuid, 0);
}
render_backlink_graph(zUuid,
"<div class=\"section accordion\">References</div>\n");
@ <div class="section accordion">Context</div><div class="accordion_panel">
render_checkin_context(rid, 0, 0, 0);
@ </div>
if( bLocalMode ){
@ <div class="section accordion">Uncommitted Changes</div>
}else{
|
| ︙ | |||
902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 | 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
@ %z(chref("button","%R/%s/%T",zPage,zName))
@ Show Whitespace Changes</a>
}else{
@ %z(chref("button","%R/%s/%T?w",zPage,zName))
@ Ignore Whitespace</a>
}
}
if( bLocalMode ){
@ %z(chref("button","%R/localpatch")) Patch</a>
if( showExtras ){
@ %z(chref("button","%R/local?diff=%d%s&ef=0",diffType,zW))Hide Extras</a>
}else{
@ %z(chref("button","%R/local?diff=%d%s&ef=",diffType,zW))Show Extras</a>
}
}else //TODO:LD Rejoin else-if?
if( zParent ){
@ %z(chref("button","%R/vpatch?from=%!S&to=%!S",zParent,zUuid))
@ Patch</a>
}
if( g.perm.Admin ){
@ %z(chref("button","%R/mlink?ci=%!S",zUuid))MLink Table</a>
}
@ </div>
if( pRe ){
@ <p><b>Only differences that match regular expression "%h(zRe)"
@ are shown.</b></p>
}
if( bLocalMode ){
int pass;
int anyDifferences = 0;
if( showExtras ){
append_extras_report(zExtra, diffType, zW);
}
/* Following SQL taken from diff_against_disk() in diffcmd.c */
db_begin_transaction();
db_prepare(&q3,
"SELECT pathname, deleted, chnged , rid==0, rid, islink"
" FROM vfile"
" WHERE vid=%d"
" AND (deleted OR chnged OR rid==0)"
" ORDER BY pathname /*scan*/",
vid
);
/* To prevent single-line diff-entries (those without "diff-blocks") from
** getting "lost", the first pass will only show one-line entries and the
** second pass will only show those with diff-blocks.
** TODO:LD Add this to the original (non-local) loop?
*/
for(pass=1; pass<=2; pass++) {
while( db_step(&q3)==SQLITE_ROW ){
const char *zPathname = db_column_text(&q3,0);
int isDeleted = db_column_int(&q3, 1);
int isChnged = db_column_int(&q3,2);
int isNew = db_column_int(&q3,3);
int srcid = db_column_int(&q3, 4);
int isLink = db_column_int(&q3, 5);
char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", srcid);
append_local_file_change_line(zPathname, zUuid,
isDeleted, isChnged, isNew, isLink, pCfg, pass);
free(zUuid);
anyDifferences = 1;
}
db_reset(&q3);
}
if( !anyDifferences ){
@ <p>No changes in the local checkout.</p>
}
db_end_transaction(1); /* ROLLBACK to fix uncommitted xaction complaint */
/*TODO:LD: Implement the optional two-pass code? */
}else{ /* Normal, non-local-mode: show diffs against parent */
|
| ︙ | |||
1244 1245 1246 1247 1248 1249 1250 | 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 | - + |
}
if( diffType!=0 ){
style_submenu_element("Hide Diff", "%R/vdiff?diff=0&%b", &qp);
}
if( diffType!=2 ){
style_submenu_element("Side-by-Side Diff", "%R/vdiff?diff=2&%b", &qp);
}
|
| ︙ | |||
1424 1425 1426 1427 1428 1429 1430 | 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 | - + |
if( cnt==1 ){
@ %z(href("%R/whatis/%!S",zUuid))[more...]</a>
}
cnt++;
continue;
}
if( !sameFilename ){
|
| ︙ | |||
1545 1546 1547 1548 1549 1550 1551 | 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 | - + |
}else if( zType[0]=='t' ){
@ Ticket change
objType |= OBJTYPE_TICKET;
}else if( zType[0]=='c' ){
@ Manifest of check-in
objType |= OBJTYPE_CHECKIN;
}else if( zType[0]=='e' ){
|
| ︙ | |||
1592 1593 1594 1595 1596 1597 1598 | 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 | - + |
if( cnt>0 ){
@ Also attachment "%h(zFilename)" to
}else{
@ Attachment "%h(zFilename)" to
}
objType |= OBJTYPE_ATTACHMENT;
if( fossil_is_artifact_hash(zTarget) ){
|
| ︙ | |||
1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 | 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 | + + + + + + |
cookie_link_parameter("diff","diff", zDflt);
return atoi(PD("diff",zDflt));
}
/*
** WEBPAGE: fdiff
** WEBPAGE: localdiff
** URL: fdiff?v1=HASH&v2=HASH
** URL: localdiff?name=filename&from=HASH
**
** Two arguments, v1 and v2, identify the artifacts to be diffed.
** Show diff side by side unless sbs is 0. Generate plain text if
** "patch" is present, otherwise generate "pretty" HTML.
**
** Alternative URL: fdiff?from=filename1&to=filename2&ci=checkin
**
** If the "from" and "to" query parameters are both present, then they are
** the names of two files within the check-in "ci" that are diffed. If the
** "ci" parameter is omitted, then the most recent check-in ("tip") is
** used.
**
** The /localdiff from shows changes to the locally-checkedout copy of "name"
** compared with the artifact identified by "from" (normally the version which
** was originally checked-out).
**
** Additional parameters:
**
** dc=N Show N lines of context around each diff
** patch Use the patch diff format
** regex=REGEX Only show differences that match REGEX
** sbs=BOOLEAN Turn side-by-side diffs on and off (default: on)
|
| ︙ | |||
1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 | 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 | + + + + + |
int verbose = PB("verbose");
DiffConfig DCfg;
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
diff_config_init(&DCfg, 0);
diffType = preferred_diff_type();
if( g.zPath[0]=='l' ){ /* diff against checkout */
DCfg.zLocalName = P("name");
v1 = name_to_rid_www("from");
v2 = (DCfg.zLocalName!=NULL)?-1:0; /* -1 prevents "not found" check below */
}else
if( P("from") && P("to") ){
v1 = artifact_from_ci_and_filename("from");
v2 = artifact_from_ci_and_filename("to");
}else{
Stmt q;
v1 = name_to_rid_www("v1");
v2 = name_to_rid_www("v2");
|
| ︙ | |||
1775 1776 1777 1778 1779 1780 1781 | 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 | + + + - + + - + + - + + + + + + + + + - + - + + + + - - + + + + + + + - + + + + + + - - + + + |
if( isPatch ){
Blob c1, c2, *pOut;
DiffConfig DCfg;
pOut = cgi_output_blob();
cgi_set_content_type("text/plain");
DCfg.diffFlags = DIFF_VERBOSE;
content_get(v1, &c1);
if( DCfg.zLocalName ){
content_from_file(DCfg.zLocalName, &c2);
}else{
|
| ︙ | |||
2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 | 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 | + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + + + |
cgi_append_content(zLine, k);
}
}
/*
** WEBPAGE: hexdump
** URL: /hexdump?name=ARTIFACTID
** URL: /hexdump?local=FILENAME
**
** Show the complete content of a file identified by ARTIFACTID
** as preformatted text.
**
** The second version does the same for FILENAME from the local checkout.
**
** Other parameters:
**
** verbose Show more detail when describing the object
*/
void hexdump_page(void){
int rid;
Blob content;
Blob downloadName;
char *zUuid;
u32 objdescFlags = 0;
const char *zLocalName = P("local");
int bLocalMode = zLocalName!=NULL;
rid = name_to_rid_www("name");
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
if( !bLocalMode ){
|
| ︙ | |||
2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 | 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 | + + + |
** parameter is also present, then name= must refer to a file name.
** If ci= is omitted, then the hash interpretation is preferred but
** if name= cannot be understood as a hash, a default "tip" value is
** used for ci=.
**
** For /file, name= can only be interpreted as a filename. As before,
** a default value of "tip" is used for ci= if ci= is omitted.
**
** If ci=ckout then display the content of the file NAME in the local
** checkout directory.
*/
void artifact_page(void){
int rid = 0;
Blob content;
const char *zMime;
Blob downloadName;
int renderAsWiki = 0;
|
| ︙ | |||
2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 | 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 | + |
const char *zName = P("name");
const char *zCI = P("ci");
HQuery url;
char *zCIUuid = 0;
int isSymbolicCI = 0; /* ci= exists and is a symbolic name, not a hash */
int isBranchCI = 0; /* ci= refers to a branch name */
char *zHeader = 0;
int bLocalMode = 0; /* TRUE if trying to show file in local checkout */
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
style_set_current_feature("artifact");
/* Capture and normalize the name= and ci= query parameters */
if( zName==0 ){
|
| ︙ | |||
2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 | 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 | + + + + + |
if( zCI==0 && !isFile ){
/* If there is no ci= query parameter, then prefer to interpret
** name= as a hash for /artifact and /whatis. But not for /file.
** For /file, a name= without a ci= will prefer to use the default
** "tip" value for ci=. */
rid = name_to_rid(zName);
}
if( fossil_strcmp(zCI,"ckout")==0 ){
/* "ci=ckout" is an extension for viewing files in the local checkout. */
bLocalMode = 1;
rid = -1; /* Dummy value to make it look found */
}else
if( rid==0 ){
rid = artifact_from_ci_and_filename(0);
}
if( rid==0 ){ /* Artifact not found */
if( isFile ){
Stmt q;
|
| ︙ | |||
2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 | 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 | + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + |
objdescFlags |= OBJDESC_DETAIL;
}
zUuid = db_text("?", "SELECT uuid FROM blob WHERE rid=%d", rid);
etag_check(ETAG_HASH, zUuid);
asText = P("txt")!=0;
if( isFile ){
if( bLocalMode ){
/*TODO:LD
** Is this the best way of handling annotations to the description?
** If "annot=message" is part of the URL, the message is appended
** to the description of the file. Only used for "local" files to
** distinguish such files from part of the repository.
*/
const char *annot = P("annot");
@ <h2>File %z(href("%R/finfo?name=%T&m=tip",zName))%h(zName)</a>
@ from %z(href("%R/local"))[Local Changes]</a>
if( annot ){
@ (%h(annot))
}
@ </h2>
}else
if( zCI==0 || fossil_strcmp(zCI,"tip")==0 ){
zCI = "tip";
isSymbolicCI = 1; /* Mark default-to-"tip" as symbolic */
@ <h2>File %z(href("%R/finfo?name=%T&m&ci=tip",zName))%h(zName)</a>
@ from the %z(href("%R/info/tip"))latest check-in</a></h2>
}else{
const char *zPath;
Blob path;
blob_zero(&path);
hyperlinked_path(zName, &path, zCI, "dir", "", LINKPATH_FINFO);
zPath = blob_str(&path);
@ <h2>File %s(zPath) artifact \
style_copy_button(1,"hash-fid",0,0,"%z%S</a> ",
href("%R/info/%s",zUuid),zUuid);
if( isBranchCI ){
@ on branch %z(href("%R/timeline?r=%T",zCI))%h(zCI)</a></h2>
}else if( isSymbolicCI ){
@ part of check-in %z(href("%R/info/%!S",zCIUuid))%s(zCI)</a></h2>
}else{
@ part of check-in %z(href("%R/info/%!S",zCIUuid))%S(zCIUuid)</a></h2>
}
blob_reset(&path);
}
if( !bLocalMode ){
|
| ︙ | |||
2610 2611 2612 2613 2614 2615 2616 | 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 | + - - - + + + + + + |
const char *zUser = db_column_text(&q,0);
const char *zDate = db_column_text(&q,1);
const char *zIp = db_column_text(&q,2);
@ <p>Received on %s(zDate) from %h(zUser) at %h(zIp).</p>
}
db_finalize(&q);
}
if( !bLocalMode ){
|
| ︙ | |||
2640 2641 2642 2643 2644 2645 2646 | 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 | + - - - - + + + + + + + + + + - + + + + + - + + |
if( asText ){
style_submenu_element("Svg", "%s", url_render(&url, "txt", 0, 0, 0));
}else{
renderAsSvg = 1;
style_submenu_element("Text", "%s", url_render(&url, "txt", "1", 0, 0));
}
}
if( !bLocalMode ){ /* This way madness lies... */
|
| ︙ |