Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Rework [b824b3e7f7] to ensure the "[diff]" link or the actual inline diff is inside the paragraph block. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
80e7250a4eb05c6ac22934313591d0df |
| User & Date: | andygoth 2015-05-17 20:45:33.033 |
| Original Comment: | Rework [b824b3e7f7] to ensure the "[diff]" link or the actual inline diff is inside the <p>...</p> block. |
Context
|
2015-05-17
| ||
| 21:54 | Correct spelling of the word "literal." ... (check-in: 73720a34cb user: andygoth tags: trunk) | |
| 21:30 | Move all square brackets outside the hyperlink text to make it easier to copy-and-paste links sans brackets from typical browsers. ... (check-in: a2020a7ac8 user: andygoth tags: andygoth-brackets-outside-link) | |
| 20:45 | Rework [b824b3e7f7] to ensure the "[diff]" link or the actual inline diff is inside the paragraph block. ... (check-in: 80e7250a4e user: andygoth tags: trunk) | |
| 05:54 | Consistently use periods and end-paragraph tags in append_file_change_line(). ... (check-in: b824b3e7f7 user: mistachkin tags: trunk) | |
Changes
Changes to src/info.c.
| ︙ | ︙ | |||
366 367 368 369 370 371 372 373 374 |
const char *zOld, /* blob.uuid before change. NULL for added files */
const char *zNew, /* blob.uuid after change. NULL for deletes */
const char *zOldName, /* Prior name. NULL if no name change. */
u64 diffFlags, /* Flags for text_diff(). Zero to omit diffs */
ReCompiled *pRe, /* Only show diffs that match this regex, if not NULL */
int mperm /* executable or symlink permission for zNew */
){
if( !g.perm.Hyperlink ){
if( zNew==0 ){
| > | | | | | | | | | | | | | | | | | > | 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 |
const char *zOld, /* blob.uuid before change. NULL for added files */
const char *zNew, /* blob.uuid after change. NULL for deletes */
const char *zOldName, /* Prior name. NULL if no name change. */
u64 diffFlags, /* Flags for text_diff(). Zero to omit diffs */
ReCompiled *pRe, /* Only show diffs that match this regex, if not NULL */
int mperm /* executable or symlink permission for zNew */
){
@ <p>
if( !g.perm.Hyperlink ){
if( zNew==0 ){
@ Deleted %h(zName).
}else if( zOld==0 ){
@ Added %h(zName).
}else if( zOldName!=0 && fossil_strcmp(zName,zOldName)!=0 ){
@ Name change from %h(zOldName) to %h(zName).
}else if( fossil_strcmp(zNew, zOld)==0 ){
if( mperm==PERM_EXE ){
@ %h(zName) became executable.
}else if( mperm==PERM_LNK ){
@ %h(zName) became a symlink.
}else{
@ %h(zName) became a regular file.
}
}else{
@ Changes to %h(zName).
}
if( diffFlags ){
append_diff(zOld, zNew, diffFlags, pRe);
}
}else{
if( zOld && zNew ){
if( fossil_strcmp(zOld, zNew)!=0 ){
@ Modified %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
@ from %z(href("%R/artifact/%!S",zOld))[%S(zOld)]</a>
@ to %z(href("%R/artifact/%!S",zNew))[%S(zNew)]</a>.
}else if( zOldName!=0 && fossil_strcmp(zName,zOldName)!=0 ){
@ Name change
@ from %z(href("%R/finfo?name=%T",zOldName))%h(zOldName)</a>
@ to %z(href("%R/finfo?name=%T",zName))%h(zName)</a>.
}else{
@ %z(href("%R/finfo?name=%T",zName))%h(zName)</a> became
if( mperm==PERM_EXE ){
@ executable with contents
}else if( mperm==PERM_LNK ){
@ a symlink with target
}else{
@ a regular file with contents
}
@ %z(href("%R/artifact/%!S",zNew))[%S(zNew)]</a>.
}
}else if( zOld ){
@ Deleted %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
@ version %z(href("%R/artifact/%!S",zOld))[%S(zOld)]</a>.
}else{
@ Added %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
@ version %z(href("%R/artifact/%!S",zNew))[%S(zNew)]</a>.
}
if( diffFlags ){
append_diff(zOld, zNew, diffFlags, pRe);
}else if( zOld && zNew && fossil_strcmp(zOld,zNew)!=0 ){
@
@ %z(href("%R/fdiff?v1=%!S&v2=%!S&sbs=1",zOld,zNew))[diff]</a>
}
}
@ </p>
}
/*
** Generate javascript to enhance HTML diffs.
*/
void append_diff_javascript(int sideBySide){
if( !sideBySide ) return;
|
| ︙ | ︙ |