Fossil SCM
Merge updates from trunk.
Commit
cdad2dc0c2e0a5fbafde51f8c3cb3f347376e778
Parent
70ea8c4f48979ea…
8 files changed
+10
-3
+9
-6
+4
-4
+4
-4
+2
-2
+59
+11
-5
+2
+10
-3
| --- src/attach.c | ||
| +++ src/attach.c | ||
| @@ -365,10 +365,12 @@ | ||
| 365 | 365 | int modPending; /* True if awaiting moderation */ |
| 366 | 366 | const char *zModAction; /* Moderation action or NULL */ |
| 367 | 367 | int isModerator; /* TRUE if user is the moderator */ |
| 368 | 368 | const char *zMime; /* MIME Type */ |
| 369 | 369 | Blob attach; /* Content of the attachment */ |
| 370 | + int fShowContent = 0; | |
| 371 | + const char *zLn = P("ln"); | |
| 370 | 372 | |
| 371 | 373 | login_check_credentials(); |
| 372 | 374 | if( !g.perm.RdTkt && !g.perm.RdWiki ){ login_needed(); return; } |
| 373 | 375 | rid = name_to_rid_www("name"); |
| 374 | 376 | if( rid==0 ){ fossil_redirect_home(); } |
| @@ -391,10 +393,12 @@ | ||
| 391 | 393 | zTarget = pAttach->zAttachTarget; |
| 392 | 394 | zSrc = pAttach->zAttachSrc; |
| 393 | 395 | ridSrc = db_int(0,"SELECT rid FROM blob WHERE uuid='%s'", zSrc); |
| 394 | 396 | zName = pAttach->zAttachName; |
| 395 | 397 | zDesc = pAttach->zComment; |
| 398 | + zMime = mimetype_from_name(zName); | |
| 399 | + fShowContent = zMime ? strncmp(zMime,"text/", 5)==0 : 0; | |
| 396 | 400 | if( validate16(zTarget, strlen(zTarget)) |
| 397 | 401 | && db_exists("SELECT 1 FROM ticket WHERE tkt_uuid='%s'", zTarget) |
| 398 | 402 | ){ |
| 399 | 403 | zTktUuid = zTarget; |
| 400 | 404 | if( !g.perm.RdTkt ){ login_needed(); return; } |
| @@ -464,10 +468,15 @@ | ||
| 464 | 468 | moderation_approve(rid); |
| 465 | 469 | } |
| 466 | 470 | } |
| 467 | 471 | style_header("Attachment Details"); |
| 468 | 472 | style_submenu_element("Raw", "Raw", "%R/artifact/%s", zUuid); |
| 473 | + if(fShowContent){ | |
| 474 | + style_submenu_element("Line Numbers", "Line Numbers", | |
| 475 | + "%R/ainfo/%s%s",zUuid, | |
| 476 | + ((zLn&&*zLn) ? "" : "?ln=0")); | |
| 477 | + } | |
| 469 | 478 | |
| 470 | 479 | @ <div class="section">Overview</div> |
| 471 | 480 | @ <p><table class="label-value"> |
| 472 | 481 | @ <tr><th>Artifact ID:</th> |
| 473 | 482 | @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a> |
| @@ -494,11 +503,10 @@ | ||
| 494 | 503 | @ <td>%z(href("%R/artifact/%s",zSrc))%s(zSrc)</a> |
| 495 | 504 | if( g.perm.Setup ){ |
| 496 | 505 | @ (%d(ridSrc)) |
| 497 | 506 | } |
| 498 | 507 | @ <tr><th>Filename:</th><td>%h(zName)</td></tr> |
| 499 | - zMime = mimetype_from_name(zName); | |
| 500 | 508 | if( g.perm.Setup ){ |
| 501 | 509 | @ <tr><th>MIME-Type:</th><td>%h(zMime)</td></tr> |
| 502 | 510 | } |
| 503 | 511 | @ <tr><th valign="top">Description:</th><td valign="top">%h(zDesc)</td></tr> |
| 504 | 512 | @ </table> |
| @@ -517,13 +525,12 @@ | ||
| 517 | 525 | } |
| 518 | 526 | |
| 519 | 527 | @ <div class="section">Content Appended</div> |
| 520 | 528 | @ <blockquote> |
| 521 | 529 | blob_zero(&attach); |
| 522 | - if( zMime==0 || strncmp(zMime,"text/", 5)==0 ){ | |
| 530 | + if( fShowContent ){ | |
| 523 | 531 | const char *z; |
| 524 | - const char *zLn = P("ln"); | |
| 525 | 532 | content_get(ridSrc, &attach); |
| 526 | 533 | blob_to_utf8_no_bom(&attach, 0); |
| 527 | 534 | z = blob_str(&attach); |
| 528 | 535 | if( zLn ){ |
| 529 | 536 | output_text_with_line_numbers(z, zLn); |
| 530 | 537 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -365,10 +365,12 @@ | |
| 365 | int modPending; /* True if awaiting moderation */ |
| 366 | const char *zModAction; /* Moderation action or NULL */ |
| 367 | int isModerator; /* TRUE if user is the moderator */ |
| 368 | const char *zMime; /* MIME Type */ |
| 369 | Blob attach; /* Content of the attachment */ |
| 370 | |
| 371 | login_check_credentials(); |
| 372 | if( !g.perm.RdTkt && !g.perm.RdWiki ){ login_needed(); return; } |
| 373 | rid = name_to_rid_www("name"); |
| 374 | if( rid==0 ){ fossil_redirect_home(); } |
| @@ -391,10 +393,12 @@ | |
| 391 | zTarget = pAttach->zAttachTarget; |
| 392 | zSrc = pAttach->zAttachSrc; |
| 393 | ridSrc = db_int(0,"SELECT rid FROM blob WHERE uuid='%s'", zSrc); |
| 394 | zName = pAttach->zAttachName; |
| 395 | zDesc = pAttach->zComment; |
| 396 | if( validate16(zTarget, strlen(zTarget)) |
| 397 | && db_exists("SELECT 1 FROM ticket WHERE tkt_uuid='%s'", zTarget) |
| 398 | ){ |
| 399 | zTktUuid = zTarget; |
| 400 | if( !g.perm.RdTkt ){ login_needed(); return; } |
| @@ -464,10 +468,15 @@ | |
| 464 | moderation_approve(rid); |
| 465 | } |
| 466 | } |
| 467 | style_header("Attachment Details"); |
| 468 | style_submenu_element("Raw", "Raw", "%R/artifact/%s", zUuid); |
| 469 | |
| 470 | @ <div class="section">Overview</div> |
| 471 | @ <p><table class="label-value"> |
| 472 | @ <tr><th>Artifact ID:</th> |
| 473 | @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a> |
| @@ -494,11 +503,10 @@ | |
| 494 | @ <td>%z(href("%R/artifact/%s",zSrc))%s(zSrc)</a> |
| 495 | if( g.perm.Setup ){ |
| 496 | @ (%d(ridSrc)) |
| 497 | } |
| 498 | @ <tr><th>Filename:</th><td>%h(zName)</td></tr> |
| 499 | zMime = mimetype_from_name(zName); |
| 500 | if( g.perm.Setup ){ |
| 501 | @ <tr><th>MIME-Type:</th><td>%h(zMime)</td></tr> |
| 502 | } |
| 503 | @ <tr><th valign="top">Description:</th><td valign="top">%h(zDesc)</td></tr> |
| 504 | @ </table> |
| @@ -517,13 +525,12 @@ | |
| 517 | } |
| 518 | |
| 519 | @ <div class="section">Content Appended</div> |
| 520 | @ <blockquote> |
| 521 | blob_zero(&attach); |
| 522 | if( zMime==0 || strncmp(zMime,"text/", 5)==0 ){ |
| 523 | const char *z; |
| 524 | const char *zLn = P("ln"); |
| 525 | content_get(ridSrc, &attach); |
| 526 | blob_to_utf8_no_bom(&attach, 0); |
| 527 | z = blob_str(&attach); |
| 528 | if( zLn ){ |
| 529 | output_text_with_line_numbers(z, zLn); |
| 530 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -365,10 +365,12 @@ | |
| 365 | int modPending; /* True if awaiting moderation */ |
| 366 | const char *zModAction; /* Moderation action or NULL */ |
| 367 | int isModerator; /* TRUE if user is the moderator */ |
| 368 | const char *zMime; /* MIME Type */ |
| 369 | Blob attach; /* Content of the attachment */ |
| 370 | int fShowContent = 0; |
| 371 | const char *zLn = P("ln"); |
| 372 | |
| 373 | login_check_credentials(); |
| 374 | if( !g.perm.RdTkt && !g.perm.RdWiki ){ login_needed(); return; } |
| 375 | rid = name_to_rid_www("name"); |
| 376 | if( rid==0 ){ fossil_redirect_home(); } |
| @@ -391,10 +393,12 @@ | |
| 393 | zTarget = pAttach->zAttachTarget; |
| 394 | zSrc = pAttach->zAttachSrc; |
| 395 | ridSrc = db_int(0,"SELECT rid FROM blob WHERE uuid='%s'", zSrc); |
| 396 | zName = pAttach->zAttachName; |
| 397 | zDesc = pAttach->zComment; |
| 398 | zMime = mimetype_from_name(zName); |
| 399 | fShowContent = zMime ? strncmp(zMime,"text/", 5)==0 : 0; |
| 400 | if( validate16(zTarget, strlen(zTarget)) |
| 401 | && db_exists("SELECT 1 FROM ticket WHERE tkt_uuid='%s'", zTarget) |
| 402 | ){ |
| 403 | zTktUuid = zTarget; |
| 404 | if( !g.perm.RdTkt ){ login_needed(); return; } |
| @@ -464,10 +468,15 @@ | |
| 468 | moderation_approve(rid); |
| 469 | } |
| 470 | } |
| 471 | style_header("Attachment Details"); |
| 472 | style_submenu_element("Raw", "Raw", "%R/artifact/%s", zUuid); |
| 473 | if(fShowContent){ |
| 474 | style_submenu_element("Line Numbers", "Line Numbers", |
| 475 | "%R/ainfo/%s%s",zUuid, |
| 476 | ((zLn&&*zLn) ? "" : "?ln=0")); |
| 477 | } |
| 478 | |
| 479 | @ <div class="section">Overview</div> |
| 480 | @ <p><table class="label-value"> |
| 481 | @ <tr><th>Artifact ID:</th> |
| 482 | @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a> |
| @@ -494,11 +503,10 @@ | |
| 503 | @ <td>%z(href("%R/artifact/%s",zSrc))%s(zSrc)</a> |
| 504 | if( g.perm.Setup ){ |
| 505 | @ (%d(ridSrc)) |
| 506 | } |
| 507 | @ <tr><th>Filename:</th><td>%h(zName)</td></tr> |
| 508 | if( g.perm.Setup ){ |
| 509 | @ <tr><th>MIME-Type:</th><td>%h(zMime)</td></tr> |
| 510 | } |
| 511 | @ <tr><th valign="top">Description:</th><td valign="top">%h(zDesc)</td></tr> |
| 512 | @ </table> |
| @@ -517,13 +525,12 @@ | |
| 525 | } |
| 526 | |
| 527 | @ <div class="section">Content Appended</div> |
| 528 | @ <blockquote> |
| 529 | blob_zero(&attach); |
| 530 | if( fShowContent ){ |
| 531 | const char *z; |
| 532 | content_get(ridSrc, &attach); |
| 533 | blob_to_utf8_no_bom(&attach, 0); |
| 534 | z = blob_str(&attach); |
| 535 | if( zLn ){ |
| 536 | output_text_with_line_numbers(z, zLn); |
| 537 |
+9
-6
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -197,11 +197,11 @@ | ||
| 197 | 197 | i64 fsize; |
| 198 | 198 | int verboseFlag = find_option("verbose","v",0)!=0; |
| 199 | 199 | if( !verboseFlag ){ |
| 200 | 200 | verboseFlag = find_option("detail","l",0)!=0; /* deprecated */ |
| 201 | 201 | } |
| 202 | - | |
| 202 | + | |
| 203 | 203 | /* We should be done with options.. */ |
| 204 | 204 | verify_all_options(); |
| 205 | 205 | |
| 206 | 206 | if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){ |
| 207 | 207 | db_open_config(0); |
| @@ -1065,28 +1065,28 @@ | ||
| 1065 | 1065 | cmp = -1; |
| 1066 | 1066 | }else{ |
| 1067 | 1067 | cmp = fossil_strcmp(pFileFrom->zName, pFileTo->zName); |
| 1068 | 1068 | } |
| 1069 | 1069 | if( cmp<0 ){ |
| 1070 | - if(!zGlob || strglob(zGlob, pFileFrom->zName)){ | |
| 1070 | + if( !zGlob || sqlite3_strglob(zGlob, pFileFrom->zName)==0 ){ | |
| 1071 | 1071 | append_file_change_line(pFileFrom->zName, |
| 1072 | 1072 | pFileFrom->zUuid, 0, 0, diffFlags, pRe, 0); |
| 1073 | 1073 | } |
| 1074 | 1074 | pFileFrom = manifest_file_next(pFrom, 0); |
| 1075 | 1075 | }else if( cmp>0 ){ |
| 1076 | - if(!zGlob || strglob(zGlob, pFileTo->zName)){ | |
| 1076 | + if( !zGlob || sqlite3_strglob(zGlob, pFileTo->zName)==0 ){ | |
| 1077 | 1077 | append_file_change_line(pFileTo->zName, |
| 1078 | 1078 | 0, pFileTo->zUuid, 0, diffFlags, pRe, |
| 1079 | 1079 | manifest_file_mperm(pFileTo)); |
| 1080 | 1080 | } |
| 1081 | 1081 | pFileTo = manifest_file_next(pTo, 0); |
| 1082 | 1082 | }else if( fossil_strcmp(pFileFrom->zUuid, pFileTo->zUuid)==0 ){ |
| 1083 | 1083 | pFileFrom = manifest_file_next(pFrom, 0); |
| 1084 | 1084 | pFileTo = manifest_file_next(pTo, 0); |
| 1085 | 1085 | }else{ |
| 1086 | - if(!zGlob || (strglob(zGlob, pFileFrom->zName) | |
| 1087 | - || strglob(zGlob, pFileTo->zName))){ | |
| 1086 | + if(!zGlob || (sqlite3_strglob(zGlob, pFileFrom->zName)==0 | |
| 1087 | + || sqlite3_strglob(zGlob, pFileTo->zName)==0) ){ | |
| 1088 | 1088 | append_file_change_line(pFileFrom->zName, |
| 1089 | 1089 | pFileFrom->zUuid, |
| 1090 | 1090 | pFileTo->zUuid, 0, diffFlags, pRe, |
| 1091 | 1091 | manifest_file_mperm(pFileTo)); |
| 1092 | 1092 | } |
| @@ -1744,10 +1744,11 @@ | ||
| 1744 | 1744 | int objType; |
| 1745 | 1745 | int asText; |
| 1746 | 1746 | const char *zUuid; |
| 1747 | 1747 | u32 objdescFlags = 0; |
| 1748 | 1748 | int descOnly = fossil_strcmp(g.zPath,"whatis")==0; |
| 1749 | + const char *zLn = P("ln"); | |
| 1749 | 1750 | |
| 1750 | 1751 | if( P("ci") && P("filename") ){ |
| 1751 | 1752 | rid = artifact_from_ci_and_filename_www(); |
| 1752 | 1753 | } |
| 1753 | 1754 | if( rid==0 ){ |
| @@ -1811,10 +1812,13 @@ | ||
| 1811 | 1812 | style_submenu_element("Parsed", "Parsed", "%R/info/%s", zUuid); |
| 1812 | 1813 | } |
| 1813 | 1814 | if( descOnly ){ |
| 1814 | 1815 | style_submenu_element("Content", "Content", "%R/artifact/%s", zUuid); |
| 1815 | 1816 | }else{ |
| 1817 | + style_submenu_element("Line Numbers", "Line Numbers", | |
| 1818 | + "%R/info/%s%s",zUuid, | |
| 1819 | + ((zLn&&*zLn) ? "" : "?ln=0")); | |
| 1816 | 1820 | @ <hr /> |
| 1817 | 1821 | content_get(rid, &content); |
| 1818 | 1822 | if( renderAsWiki ){ |
| 1819 | 1823 | wiki_render_by_mimetype(&content, zMime); |
| 1820 | 1824 | }else if( renderAsHtml ){ |
| @@ -1827,11 +1831,10 @@ | ||
| 1827 | 1831 | style_submenu_element("Hex","Hex", "%s/hexdump?name=%s", g.zTop, zUuid); |
| 1828 | 1832 | blob_to_utf8_no_bom(&content, 0); |
| 1829 | 1833 | zMime = mimetype_from_content(&content); |
| 1830 | 1834 | @ <blockquote> |
| 1831 | 1835 | if( zMime==0 ){ |
| 1832 | - const char *zLn = P("ln"); | |
| 1833 | 1836 | const char *z; |
| 1834 | 1837 | z = blob_str(&content); |
| 1835 | 1838 | if( zLn ){ |
| 1836 | 1839 | output_text_with_line_numbers(z, zLn); |
| 1837 | 1840 | }else{ |
| 1838 | 1841 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -197,11 +197,11 @@ | |
| 197 | i64 fsize; |
| 198 | int verboseFlag = find_option("verbose","v",0)!=0; |
| 199 | if( !verboseFlag ){ |
| 200 | verboseFlag = find_option("detail","l",0)!=0; /* deprecated */ |
| 201 | } |
| 202 | |
| 203 | /* We should be done with options.. */ |
| 204 | verify_all_options(); |
| 205 | |
| 206 | if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){ |
| 207 | db_open_config(0); |
| @@ -1065,28 +1065,28 @@ | |
| 1065 | cmp = -1; |
| 1066 | }else{ |
| 1067 | cmp = fossil_strcmp(pFileFrom->zName, pFileTo->zName); |
| 1068 | } |
| 1069 | if( cmp<0 ){ |
| 1070 | if(!zGlob || strglob(zGlob, pFileFrom->zName)){ |
| 1071 | append_file_change_line(pFileFrom->zName, |
| 1072 | pFileFrom->zUuid, 0, 0, diffFlags, pRe, 0); |
| 1073 | } |
| 1074 | pFileFrom = manifest_file_next(pFrom, 0); |
| 1075 | }else if( cmp>0 ){ |
| 1076 | if(!zGlob || strglob(zGlob, pFileTo->zName)){ |
| 1077 | append_file_change_line(pFileTo->zName, |
| 1078 | 0, pFileTo->zUuid, 0, diffFlags, pRe, |
| 1079 | manifest_file_mperm(pFileTo)); |
| 1080 | } |
| 1081 | pFileTo = manifest_file_next(pTo, 0); |
| 1082 | }else if( fossil_strcmp(pFileFrom->zUuid, pFileTo->zUuid)==0 ){ |
| 1083 | pFileFrom = manifest_file_next(pFrom, 0); |
| 1084 | pFileTo = manifest_file_next(pTo, 0); |
| 1085 | }else{ |
| 1086 | if(!zGlob || (strglob(zGlob, pFileFrom->zName) |
| 1087 | || strglob(zGlob, pFileTo->zName))){ |
| 1088 | append_file_change_line(pFileFrom->zName, |
| 1089 | pFileFrom->zUuid, |
| 1090 | pFileTo->zUuid, 0, diffFlags, pRe, |
| 1091 | manifest_file_mperm(pFileTo)); |
| 1092 | } |
| @@ -1744,10 +1744,11 @@ | |
| 1744 | int objType; |
| 1745 | int asText; |
| 1746 | const char *zUuid; |
| 1747 | u32 objdescFlags = 0; |
| 1748 | int descOnly = fossil_strcmp(g.zPath,"whatis")==0; |
| 1749 | |
| 1750 | if( P("ci") && P("filename") ){ |
| 1751 | rid = artifact_from_ci_and_filename_www(); |
| 1752 | } |
| 1753 | if( rid==0 ){ |
| @@ -1811,10 +1812,13 @@ | |
| 1811 | style_submenu_element("Parsed", "Parsed", "%R/info/%s", zUuid); |
| 1812 | } |
| 1813 | if( descOnly ){ |
| 1814 | style_submenu_element("Content", "Content", "%R/artifact/%s", zUuid); |
| 1815 | }else{ |
| 1816 | @ <hr /> |
| 1817 | content_get(rid, &content); |
| 1818 | if( renderAsWiki ){ |
| 1819 | wiki_render_by_mimetype(&content, zMime); |
| 1820 | }else if( renderAsHtml ){ |
| @@ -1827,11 +1831,10 @@ | |
| 1827 | style_submenu_element("Hex","Hex", "%s/hexdump?name=%s", g.zTop, zUuid); |
| 1828 | blob_to_utf8_no_bom(&content, 0); |
| 1829 | zMime = mimetype_from_content(&content); |
| 1830 | @ <blockquote> |
| 1831 | if( zMime==0 ){ |
| 1832 | const char *zLn = P("ln"); |
| 1833 | const char *z; |
| 1834 | z = blob_str(&content); |
| 1835 | if( zLn ){ |
| 1836 | output_text_with_line_numbers(z, zLn); |
| 1837 | }else{ |
| 1838 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -197,11 +197,11 @@ | |
| 197 | i64 fsize; |
| 198 | int verboseFlag = find_option("verbose","v",0)!=0; |
| 199 | if( !verboseFlag ){ |
| 200 | verboseFlag = find_option("detail","l",0)!=0; /* deprecated */ |
| 201 | } |
| 202 | |
| 203 | /* We should be done with options.. */ |
| 204 | verify_all_options(); |
| 205 | |
| 206 | if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){ |
| 207 | db_open_config(0); |
| @@ -1065,28 +1065,28 @@ | |
| 1065 | cmp = -1; |
| 1066 | }else{ |
| 1067 | cmp = fossil_strcmp(pFileFrom->zName, pFileTo->zName); |
| 1068 | } |
| 1069 | if( cmp<0 ){ |
| 1070 | if( !zGlob || sqlite3_strglob(zGlob, pFileFrom->zName)==0 ){ |
| 1071 | append_file_change_line(pFileFrom->zName, |
| 1072 | pFileFrom->zUuid, 0, 0, diffFlags, pRe, 0); |
| 1073 | } |
| 1074 | pFileFrom = manifest_file_next(pFrom, 0); |
| 1075 | }else if( cmp>0 ){ |
| 1076 | if( !zGlob || sqlite3_strglob(zGlob, pFileTo->zName)==0 ){ |
| 1077 | append_file_change_line(pFileTo->zName, |
| 1078 | 0, pFileTo->zUuid, 0, diffFlags, pRe, |
| 1079 | manifest_file_mperm(pFileTo)); |
| 1080 | } |
| 1081 | pFileTo = manifest_file_next(pTo, 0); |
| 1082 | }else if( fossil_strcmp(pFileFrom->zUuid, pFileTo->zUuid)==0 ){ |
| 1083 | pFileFrom = manifest_file_next(pFrom, 0); |
| 1084 | pFileTo = manifest_file_next(pTo, 0); |
| 1085 | }else{ |
| 1086 | if(!zGlob || (sqlite3_strglob(zGlob, pFileFrom->zName)==0 |
| 1087 | || sqlite3_strglob(zGlob, pFileTo->zName)==0) ){ |
| 1088 | append_file_change_line(pFileFrom->zName, |
| 1089 | pFileFrom->zUuid, |
| 1090 | pFileTo->zUuid, 0, diffFlags, pRe, |
| 1091 | manifest_file_mperm(pFileTo)); |
| 1092 | } |
| @@ -1744,10 +1744,11 @@ | |
| 1744 | int objType; |
| 1745 | int asText; |
| 1746 | const char *zUuid; |
| 1747 | u32 objdescFlags = 0; |
| 1748 | int descOnly = fossil_strcmp(g.zPath,"whatis")==0; |
| 1749 | const char *zLn = P("ln"); |
| 1750 | |
| 1751 | if( P("ci") && P("filename") ){ |
| 1752 | rid = artifact_from_ci_and_filename_www(); |
| 1753 | } |
| 1754 | if( rid==0 ){ |
| @@ -1811,10 +1812,13 @@ | |
| 1812 | style_submenu_element("Parsed", "Parsed", "%R/info/%s", zUuid); |
| 1813 | } |
| 1814 | if( descOnly ){ |
| 1815 | style_submenu_element("Content", "Content", "%R/artifact/%s", zUuid); |
| 1816 | }else{ |
| 1817 | style_submenu_element("Line Numbers", "Line Numbers", |
| 1818 | "%R/info/%s%s",zUuid, |
| 1819 | ((zLn&&*zLn) ? "" : "?ln=0")); |
| 1820 | @ <hr /> |
| 1821 | content_get(rid, &content); |
| 1822 | if( renderAsWiki ){ |
| 1823 | wiki_render_by_mimetype(&content, zMime); |
| 1824 | }else if( renderAsHtml ){ |
| @@ -1827,11 +1831,10 @@ | |
| 1831 | style_submenu_element("Hex","Hex", "%s/hexdump?name=%s", g.zTop, zUuid); |
| 1832 | blob_to_utf8_no_bom(&content, 0); |
| 1833 | zMime = mimetype_from_content(&content); |
| 1834 | @ <blockquote> |
| 1835 | if( zMime==0 ){ |
| 1836 | const char *z; |
| 1837 | z = blob_str(&content); |
| 1838 | if( zLn ){ |
| 1839 | output_text_with_line_numbers(z, zLn); |
| 1840 | }else{ |
| 1841 |
+4
-4
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -945,11 +945,11 @@ | ||
| 945 | 945 | void version_cmd(void){ |
| 946 | 946 | int verboseFlag = 0; |
| 947 | 947 | |
| 948 | 948 | fossil_print("This is fossil version %s\n", get_version()); |
| 949 | 949 | verboseFlag = find_option("verbose","v",0)!=0; |
| 950 | - | |
| 950 | + | |
| 951 | 951 | /* We should be done with options.. */ |
| 952 | 952 | verify_all_options(); |
| 953 | 953 | |
| 954 | 954 | if(!verboseFlag){ |
| 955 | 955 | return; |
| @@ -1438,11 +1438,11 @@ | ||
| 1438 | 1438 | continue; |
| 1439 | 1439 | } |
| 1440 | 1440 | if( pFileGlob!=0 |
| 1441 | 1441 | && file_isfile(zRepo) |
| 1442 | 1442 | && glob_match(pFileGlob, zRepo) |
| 1443 | - && strglob("*.fossil*",zRepo)==0 | |
| 1443 | + && sqlite3_strglob("*.fossil*",zRepo)!=0 | |
| 1444 | 1444 | && (zMimetype = mimetype_from_name(zRepo))!=0 |
| 1445 | 1445 | && strcmp(zMimetype, "application/x-fossil-artifact")!=0 |
| 1446 | 1446 | ){ |
| 1447 | 1447 | Blob content; |
| 1448 | 1448 | blob_read_from_file(&content, zRepo); |
| @@ -1944,11 +1944,11 @@ | ||
| 1944 | 1944 | if( zAltBase ) set_base_url(zAltBase); |
| 1945 | 1945 | if( find_option("https",0,0)!=0 ) cgi_replace_parameter("HTTPS","on"); |
| 1946 | 1946 | zHost = find_option("host", 0, 1); |
| 1947 | 1947 | if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost); |
| 1948 | 1948 | g.cgiOutput = 1; |
| 1949 | - | |
| 1949 | + | |
| 1950 | 1950 | /* We should be done with options.. */ |
| 1951 | 1951 | verify_all_options(); |
| 1952 | 1952 | |
| 1953 | 1953 | if( g.argc!=2 && g.argc!=3 && g.argc!=6 ){ |
| 1954 | 1954 | fossil_fatal("no repository specified"); |
| @@ -2134,11 +2134,11 @@ | ||
| 2134 | 2134 | set_base_url(zAltBase); |
| 2135 | 2135 | } |
| 2136 | 2136 | if( find_option("localhost", 0, 0)!=0 ){ |
| 2137 | 2137 | flags |= HTTP_SERVER_LOCALHOST; |
| 2138 | 2138 | } |
| 2139 | - | |
| 2139 | + | |
| 2140 | 2140 | /* We should be done with options.. */ |
| 2141 | 2141 | verify_all_options(); |
| 2142 | 2142 | |
| 2143 | 2143 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 2144 | 2144 | isUiCmd = g.argv[1][0]=='u'; |
| 2145 | 2145 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -945,11 +945,11 @@ | |
| 945 | void version_cmd(void){ |
| 946 | int verboseFlag = 0; |
| 947 | |
| 948 | fossil_print("This is fossil version %s\n", get_version()); |
| 949 | verboseFlag = find_option("verbose","v",0)!=0; |
| 950 | |
| 951 | /* We should be done with options.. */ |
| 952 | verify_all_options(); |
| 953 | |
| 954 | if(!verboseFlag){ |
| 955 | return; |
| @@ -1438,11 +1438,11 @@ | |
| 1438 | continue; |
| 1439 | } |
| 1440 | if( pFileGlob!=0 |
| 1441 | && file_isfile(zRepo) |
| 1442 | && glob_match(pFileGlob, zRepo) |
| 1443 | && strglob("*.fossil*",zRepo)==0 |
| 1444 | && (zMimetype = mimetype_from_name(zRepo))!=0 |
| 1445 | && strcmp(zMimetype, "application/x-fossil-artifact")!=0 |
| 1446 | ){ |
| 1447 | Blob content; |
| 1448 | blob_read_from_file(&content, zRepo); |
| @@ -1944,11 +1944,11 @@ | |
| 1944 | if( zAltBase ) set_base_url(zAltBase); |
| 1945 | if( find_option("https",0,0)!=0 ) cgi_replace_parameter("HTTPS","on"); |
| 1946 | zHost = find_option("host", 0, 1); |
| 1947 | if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost); |
| 1948 | g.cgiOutput = 1; |
| 1949 | |
| 1950 | /* We should be done with options.. */ |
| 1951 | verify_all_options(); |
| 1952 | |
| 1953 | if( g.argc!=2 && g.argc!=3 && g.argc!=6 ){ |
| 1954 | fossil_fatal("no repository specified"); |
| @@ -2134,11 +2134,11 @@ | |
| 2134 | set_base_url(zAltBase); |
| 2135 | } |
| 2136 | if( find_option("localhost", 0, 0)!=0 ){ |
| 2137 | flags |= HTTP_SERVER_LOCALHOST; |
| 2138 | } |
| 2139 | |
| 2140 | /* We should be done with options.. */ |
| 2141 | verify_all_options(); |
| 2142 | |
| 2143 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 2144 | isUiCmd = g.argv[1][0]=='u'; |
| 2145 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -945,11 +945,11 @@ | |
| 945 | void version_cmd(void){ |
| 946 | int verboseFlag = 0; |
| 947 | |
| 948 | fossil_print("This is fossil version %s\n", get_version()); |
| 949 | verboseFlag = find_option("verbose","v",0)!=0; |
| 950 | |
| 951 | /* We should be done with options.. */ |
| 952 | verify_all_options(); |
| 953 | |
| 954 | if(!verboseFlag){ |
| 955 | return; |
| @@ -1438,11 +1438,11 @@ | |
| 1438 | continue; |
| 1439 | } |
| 1440 | if( pFileGlob!=0 |
| 1441 | && file_isfile(zRepo) |
| 1442 | && glob_match(pFileGlob, zRepo) |
| 1443 | && sqlite3_strglob("*.fossil*",zRepo)!=0 |
| 1444 | && (zMimetype = mimetype_from_name(zRepo))!=0 |
| 1445 | && strcmp(zMimetype, "application/x-fossil-artifact")!=0 |
| 1446 | ){ |
| 1447 | Blob content; |
| 1448 | blob_read_from_file(&content, zRepo); |
| @@ -1944,11 +1944,11 @@ | |
| 1944 | if( zAltBase ) set_base_url(zAltBase); |
| 1945 | if( find_option("https",0,0)!=0 ) cgi_replace_parameter("HTTPS","on"); |
| 1946 | zHost = find_option("host", 0, 1); |
| 1947 | if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost); |
| 1948 | g.cgiOutput = 1; |
| 1949 | |
| 1950 | /* We should be done with options.. */ |
| 1951 | verify_all_options(); |
| 1952 | |
| 1953 | if( g.argc!=2 && g.argc!=3 && g.argc!=6 ){ |
| 1954 | fossil_fatal("no repository specified"); |
| @@ -2134,11 +2134,11 @@ | |
| 2134 | set_base_url(zAltBase); |
| 2135 | } |
| 2136 | if( find_option("localhost", 0, 0)!=0 ){ |
| 2137 | flags |= HTTP_SERVER_LOCALHOST; |
| 2138 | } |
| 2139 | |
| 2140 | /* We should be done with options.. */ |
| 2141 | verify_all_options(); |
| 2142 | |
| 2143 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 2144 | isUiCmd = g.argv[1][0]=='u'; |
| 2145 |
+4
-4
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -945,11 +945,11 @@ | ||
| 945 | 945 | void version_cmd(void){ |
| 946 | 946 | int verboseFlag = 0; |
| 947 | 947 | |
| 948 | 948 | fossil_print("This is fossil version %s\n", get_version()); |
| 949 | 949 | verboseFlag = find_option("verbose","v",0)!=0; |
| 950 | - | |
| 950 | + | |
| 951 | 951 | /* We should be done with options.. */ |
| 952 | 952 | verify_all_options(); |
| 953 | 953 | |
| 954 | 954 | if(!verboseFlag){ |
| 955 | 955 | return; |
| @@ -1438,11 +1438,11 @@ | ||
| 1438 | 1438 | continue; |
| 1439 | 1439 | } |
| 1440 | 1440 | if( pFileGlob!=0 |
| 1441 | 1441 | && file_isfile(zRepo) |
| 1442 | 1442 | && glob_match(pFileGlob, zRepo) |
| 1443 | - && strglob("*.fossil*",zRepo)==0 | |
| 1443 | + && sqlite3_strglob("*.fossil*",zRepo)!=0 | |
| 1444 | 1444 | && (zMimetype = mimetype_from_name(zRepo))!=0 |
| 1445 | 1445 | && strcmp(zMimetype, "application/x-fossil-artifact")!=0 |
| 1446 | 1446 | ){ |
| 1447 | 1447 | Blob content; |
| 1448 | 1448 | blob_read_from_file(&content, zRepo); |
| @@ -1944,11 +1944,11 @@ | ||
| 1944 | 1944 | if( zAltBase ) set_base_url(zAltBase); |
| 1945 | 1945 | if( find_option("https",0,0)!=0 ) cgi_replace_parameter("HTTPS","on"); |
| 1946 | 1946 | zHost = find_option("host", 0, 1); |
| 1947 | 1947 | if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost); |
| 1948 | 1948 | g.cgiOutput = 1; |
| 1949 | - | |
| 1949 | + | |
| 1950 | 1950 | /* We should be done with options.. */ |
| 1951 | 1951 | verify_all_options(); |
| 1952 | 1952 | |
| 1953 | 1953 | if( g.argc!=2 && g.argc!=3 && g.argc!=6 ){ |
| 1954 | 1954 | fossil_fatal("no repository specified"); |
| @@ -2134,11 +2134,11 @@ | ||
| 2134 | 2134 | set_base_url(zAltBase); |
| 2135 | 2135 | } |
| 2136 | 2136 | if( find_option("localhost", 0, 0)!=0 ){ |
| 2137 | 2137 | flags |= HTTP_SERVER_LOCALHOST; |
| 2138 | 2138 | } |
| 2139 | - | |
| 2139 | + | |
| 2140 | 2140 | /* We should be done with options.. */ |
| 2141 | 2141 | verify_all_options(); |
| 2142 | 2142 | |
| 2143 | 2143 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 2144 | 2144 | isUiCmd = g.argv[1][0]=='u'; |
| 2145 | 2145 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -945,11 +945,11 @@ | |
| 945 | void version_cmd(void){ |
| 946 | int verboseFlag = 0; |
| 947 | |
| 948 | fossil_print("This is fossil version %s\n", get_version()); |
| 949 | verboseFlag = find_option("verbose","v",0)!=0; |
| 950 | |
| 951 | /* We should be done with options.. */ |
| 952 | verify_all_options(); |
| 953 | |
| 954 | if(!verboseFlag){ |
| 955 | return; |
| @@ -1438,11 +1438,11 @@ | |
| 1438 | continue; |
| 1439 | } |
| 1440 | if( pFileGlob!=0 |
| 1441 | && file_isfile(zRepo) |
| 1442 | && glob_match(pFileGlob, zRepo) |
| 1443 | && strglob("*.fossil*",zRepo)==0 |
| 1444 | && (zMimetype = mimetype_from_name(zRepo))!=0 |
| 1445 | && strcmp(zMimetype, "application/x-fossil-artifact")!=0 |
| 1446 | ){ |
| 1447 | Blob content; |
| 1448 | blob_read_from_file(&content, zRepo); |
| @@ -1944,11 +1944,11 @@ | |
| 1944 | if( zAltBase ) set_base_url(zAltBase); |
| 1945 | if( find_option("https",0,0)!=0 ) cgi_replace_parameter("HTTPS","on"); |
| 1946 | zHost = find_option("host", 0, 1); |
| 1947 | if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost); |
| 1948 | g.cgiOutput = 1; |
| 1949 | |
| 1950 | /* We should be done with options.. */ |
| 1951 | verify_all_options(); |
| 1952 | |
| 1953 | if( g.argc!=2 && g.argc!=3 && g.argc!=6 ){ |
| 1954 | fossil_fatal("no repository specified"); |
| @@ -2134,11 +2134,11 @@ | |
| 2134 | set_base_url(zAltBase); |
| 2135 | } |
| 2136 | if( find_option("localhost", 0, 0)!=0 ){ |
| 2137 | flags |= HTTP_SERVER_LOCALHOST; |
| 2138 | } |
| 2139 | |
| 2140 | /* We should be done with options.. */ |
| 2141 | verify_all_options(); |
| 2142 | |
| 2143 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 2144 | isUiCmd = g.argv[1][0]=='u'; |
| 2145 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -945,11 +945,11 @@ | |
| 945 | void version_cmd(void){ |
| 946 | int verboseFlag = 0; |
| 947 | |
| 948 | fossil_print("This is fossil version %s\n", get_version()); |
| 949 | verboseFlag = find_option("verbose","v",0)!=0; |
| 950 | |
| 951 | /* We should be done with options.. */ |
| 952 | verify_all_options(); |
| 953 | |
| 954 | if(!verboseFlag){ |
| 955 | return; |
| @@ -1438,11 +1438,11 @@ | |
| 1438 | continue; |
| 1439 | } |
| 1440 | if( pFileGlob!=0 |
| 1441 | && file_isfile(zRepo) |
| 1442 | && glob_match(pFileGlob, zRepo) |
| 1443 | && sqlite3_strglob("*.fossil*",zRepo)!=0 |
| 1444 | && (zMimetype = mimetype_from_name(zRepo))!=0 |
| 1445 | && strcmp(zMimetype, "application/x-fossil-artifact")!=0 |
| 1446 | ){ |
| 1447 | Blob content; |
| 1448 | blob_read_from_file(&content, zRepo); |
| @@ -1944,11 +1944,11 @@ | |
| 1944 | if( zAltBase ) set_base_url(zAltBase); |
| 1945 | if( find_option("https",0,0)!=0 ) cgi_replace_parameter("HTTPS","on"); |
| 1946 | zHost = find_option("host", 0, 1); |
| 1947 | if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost); |
| 1948 | g.cgiOutput = 1; |
| 1949 | |
| 1950 | /* We should be done with options.. */ |
| 1951 | verify_all_options(); |
| 1952 | |
| 1953 | if( g.argc!=2 && g.argc!=3 && g.argc!=6 ){ |
| 1954 | fossil_fatal("no repository specified"); |
| @@ -2134,11 +2134,11 @@ | |
| 2134 | set_base_url(zAltBase); |
| 2135 | } |
| 2136 | if( find_option("localhost", 0, 0)!=0 ){ |
| 2137 | flags |= HTTP_SERVER_LOCALHOST; |
| 2138 | } |
| 2139 | |
| 2140 | /* We should be done with options.. */ |
| 2141 | verify_all_options(); |
| 2142 | |
| 2143 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 2144 | isUiCmd = g.argv[1][0]=='u'; |
| 2145 |
+2
-2
| --- src/tag.c | ||
| +++ src/tag.c | ||
| @@ -354,11 +354,11 @@ | ||
| 354 | 354 | ** |
| 355 | 355 | ** List all objects that use TAGNAME. TYPE can be "ci" for |
| 356 | 356 | ** checkins or "e" for events. The limit option limits the number |
| 357 | 357 | ** of results to the given value. |
| 358 | 358 | ** |
| 359 | -** %fossil tag list ?--raw? ?CHECK-IN? | |
| 359 | +** %fossil tag list|ls ?--raw? ?CHECK-IN? | |
| 360 | 360 | ** |
| 361 | 361 | ** List all tags, or if CHECK-IN is supplied, list |
| 362 | 362 | ** all tags and their values for CHECK-IN. |
| 363 | 363 | ** |
| 364 | 364 | ** The option --raw allows the manipulation of all types of tags |
| @@ -475,11 +475,11 @@ | ||
| 475 | 475 | db_finalize(&q); |
| 476 | 476 | } |
| 477 | 477 | } |
| 478 | 478 | }else |
| 479 | 479 | |
| 480 | - if( strncmp(g.argv[2],"list",n)==0 ){ | |
| 480 | + if(( strncmp(g.argv[2],"list",n)==0 )||( strncmp(g.argv[2],"ls",n)==0 )){ | |
| 481 | 481 | Stmt q; |
| 482 | 482 | if( g.argc==3 ){ |
| 483 | 483 | db_prepare(&q, |
| 484 | 484 | "SELECT tagname FROM tag" |
| 485 | 485 | " WHERE EXISTS(SELECT 1 FROM tagxref" |
| 486 | 486 | |
| 487 | 487 | ADDED test/merge6.test |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -354,11 +354,11 @@ | |
| 354 | ** |
| 355 | ** List all objects that use TAGNAME. TYPE can be "ci" for |
| 356 | ** checkins or "e" for events. The limit option limits the number |
| 357 | ** of results to the given value. |
| 358 | ** |
| 359 | ** %fossil tag list ?--raw? ?CHECK-IN? |
| 360 | ** |
| 361 | ** List all tags, or if CHECK-IN is supplied, list |
| 362 | ** all tags and their values for CHECK-IN. |
| 363 | ** |
| 364 | ** The option --raw allows the manipulation of all types of tags |
| @@ -475,11 +475,11 @@ | |
| 475 | db_finalize(&q); |
| 476 | } |
| 477 | } |
| 478 | }else |
| 479 | |
| 480 | if( strncmp(g.argv[2],"list",n)==0 ){ |
| 481 | Stmt q; |
| 482 | if( g.argc==3 ){ |
| 483 | db_prepare(&q, |
| 484 | "SELECT tagname FROM tag" |
| 485 | " WHERE EXISTS(SELECT 1 FROM tagxref" |
| 486 | |
| 487 | DDED test/merge6.test |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -354,11 +354,11 @@ | |
| 354 | ** |
| 355 | ** List all objects that use TAGNAME. TYPE can be "ci" for |
| 356 | ** checkins or "e" for events. The limit option limits the number |
| 357 | ** of results to the given value. |
| 358 | ** |
| 359 | ** %fossil tag list|ls ?--raw? ?CHECK-IN? |
| 360 | ** |
| 361 | ** List all tags, or if CHECK-IN is supplied, list |
| 362 | ** all tags and their values for CHECK-IN. |
| 363 | ** |
| 364 | ** The option --raw allows the manipulation of all types of tags |
| @@ -475,11 +475,11 @@ | |
| 475 | db_finalize(&q); |
| 476 | } |
| 477 | } |
| 478 | }else |
| 479 | |
| 480 | if(( strncmp(g.argv[2],"list",n)==0 )||( strncmp(g.argv[2],"ls",n)==0 )){ |
| 481 | Stmt q; |
| 482 | if( g.argc==3 ){ |
| 483 | db_prepare(&q, |
| 484 | "SELECT tagname FROM tag" |
| 485 | " WHERE EXISTS(SELECT 1 FROM tagxref" |
| 486 | |
| 487 | DDED test/merge6.test |
+59
| --- a/test/merge6.test | ||
| +++ b/test/merge6.test | ||
| @@ -0,0 +1,59 @@ | ||
| 1 | +# | |
| 2 | +# Copyright (c) 2014 D. Richard Hipp | |
| 3 | +# | |
| 4 | +# This program is free software; you can redistribute it and/or | |
| 5 | +# modify it under the terms of the Simplified BSD License (also | |
| 6 | +# known as the "2-Clause License" or "FreeBSD License".) | |
| 7 | +# | |
| 8 | +# This program is distributed in the hope that it will be useful, | |
| 9 | +# but without any warranty; without even the implied warranty of | |
| 10 | +# merchantability or fitness for a particular purpose. | |
| 11 | +# | |
| 12 | +# Author contact information: | |
| 13 | +# [email protected] | |
| 14 | +# http://www.hwaci.com/drh/ | |
| 15 | +# | |
| 16 | +############################################################################ | |
| 17 | +# | |
| 18 | +# Tests of the "merge" command | |
| 19 | +# | |
| 20 | + | |
| 21 | +#################################################################### | |
| 22 | +# TEST 1: Handle multiple merges each with one or more ADDED files # | |
| 23 | +###########################################repo_init############### | |
| 24 | + | |
| 25 | +test_setup | |
| 26 | +fossil ls | |
| 27 | + | |
| 28 | +test merge_multi-0 {[string map [list \r\_multi-0 {[normalize_result] eq {}} | |
| 29 | + | |
| 30 | +write_file f1 "f1 line" | |
| 31 | +fossil add f1 | |
| 32 | +fossil string map [list \r\_multi-1 {[normalize_result] eq {f1}} | |
| 33 | + | |
| 34 | +fossil update trunk | |
| 35 | +write_file f2 "f2 line" | |
| 36 | +fossil add f2 | |
| 37 | +fossil commit -m "branch for file f2" -b branch_for_f2 | |
| 38 | +fossistring map [list \r\] eq {f1 | |
| 39 | +f2}} | |
| 40 | + | |
| 41 | +fossil update trunk | |
| 42 | +write_file f3 "f3 line" | |
| 43 | +write_file f4 "f4 line" | |
| 44 | +fossil add f3 | |
| 45 | +fossil add f4 | |
| 46 | +fossil commit -m "branch for files f3 and f4" -b branch_for_f3_f4 | |
| 47 | +fossil ls | |
| 48 | + | |
| 49 | +test merge_multi-3 {[string map [list \r\_multi-3 {[normalize_result] eq {f1 | |
| 50 | +f3 | |
| 51 | +f4}} | |
| 52 | + | |
| 53 | +fossil update trunk | |
| 54 | +fossil merge branch_for_f2 | |
| 55 | +fossil merge branch_for_f3_f4 | |
| 56 | +fossil commit -m "new trunk files f2, string map [list \r\n \n] [string trim $RESULT]] eq {f1 | |
| 57 | +f2 | |
| 58 | +f3 | |
| 59 | +f4}} |
| --- a/test/merge6.test | |
| +++ b/test/merge6.test | |
| @@ -0,0 +1,59 @@ | |
| --- a/test/merge6.test | |
| +++ b/test/merge6.test | |
| @@ -0,0 +1,59 @@ | |
| 1 | # |
| 2 | # Copyright (c) 2014 D. Richard Hipp |
| 3 | # |
| 4 | # This program is free software; you can redistribute it and/or |
| 5 | # modify it under the terms of the Simplified BSD License (also |
| 6 | # known as the "2-Clause License" or "FreeBSD License".) |
| 7 | # |
| 8 | # This program is distributed in the hope that it will be useful, |
| 9 | # but without any warranty; without even the implied warranty of |
| 10 | # merchantability or fitness for a particular purpose. |
| 11 | # |
| 12 | # Author contact information: |
| 13 | # [email protected] |
| 14 | # http://www.hwaci.com/drh/ |
| 15 | # |
| 16 | ############################################################################ |
| 17 | # |
| 18 | # Tests of the "merge" command |
| 19 | # |
| 20 | |
| 21 | #################################################################### |
| 22 | # TEST 1: Handle multiple merges each with one or more ADDED files # |
| 23 | ###########################################repo_init############### |
| 24 | |
| 25 | test_setup |
| 26 | fossil ls |
| 27 | |
| 28 | test merge_multi-0 {[string map [list \r\_multi-0 {[normalize_result] eq {}} |
| 29 | |
| 30 | write_file f1 "f1 line" |
| 31 | fossil add f1 |
| 32 | fossil string map [list \r\_multi-1 {[normalize_result] eq {f1}} |
| 33 | |
| 34 | fossil update trunk |
| 35 | write_file f2 "f2 line" |
| 36 | fossil add f2 |
| 37 | fossil commit -m "branch for file f2" -b branch_for_f2 |
| 38 | fossistring map [list \r\] eq {f1 |
| 39 | f2}} |
| 40 | |
| 41 | fossil update trunk |
| 42 | write_file f3 "f3 line" |
| 43 | write_file f4 "f4 line" |
| 44 | fossil add f3 |
| 45 | fossil add f4 |
| 46 | fossil commit -m "branch for files f3 and f4" -b branch_for_f3_f4 |
| 47 | fossil ls |
| 48 | |
| 49 | test merge_multi-3 {[string map [list \r\_multi-3 {[normalize_result] eq {f1 |
| 50 | f3 |
| 51 | f4}} |
| 52 | |
| 53 | fossil update trunk |
| 54 | fossil merge branch_for_f2 |
| 55 | fossil merge branch_for_f3_f4 |
| 56 | fossil commit -m "new trunk files f2, string map [list \r\n \n] [string trim $RESULT]] eq {f1 |
| 57 | f2 |
| 58 | f3 |
| 59 | f4}} |
+11
-5
| --- www/build.wiki | ||
| +++ www/build.wiki | ||
| @@ -116,17 +116,23 @@ | ||
| 116 | 116 | |
| 117 | 117 | <li><p><i>MSVC</i> → Use the MSVC makefile. First |
| 118 | 118 | change to the "win/" subdirectory ("<b>cd win</b>") then run |
| 119 | 119 | "<b>nmake /f Makefile.msc</b>".<br><br>Alternatively, the batch |
| 120 | 120 | file "<b>win\buildmsvc.bat</b>" may be used and it will attempt to |
| 121 | -detect and use the latest installed version of MSVC. To enable | |
| 122 | -the optional <a href="http://www.openssl.org/">OpenSSL</a> support, | |
| 123 | -first make sure that some recent <a href="http://www.perl.org/">Perl</a> | |
| 124 | -binaries are installed locally and then run one of the following commands: | |
| 121 | +detect and use the latest installed version of MSVC.<br><br>To enable | |
| 122 | +the optional <a href="https://www.openssl.org/">OpenSSL</a> support, | |
| 123 | +first <a href="https://www.openssl.org/source/">download the official | |
| 124 | +source code for OpenSSL</a> and extract it to an appropriately named | |
| 125 | +"<b>openssl-X.Y.ZA</b>" subdirectory within the local | |
| 126 | +[/tree?ci=trunk&name=compat | compat] directory (e.g. | |
| 127 | +"<b>compat/openssl-1.0.1i</b>"), then make sure that some recent | |
| 128 | +<a href="http://www.perl.org/">Perl</a> binaries are installed locally, | |
| 129 | +and finally run one of the following commands: | |
| 125 | 130 | <blockquote><pre> |
| 126 | 131 | nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 127 | - | |
| 132 | +</pre></blockquote> | |
| 133 | +<blockquote><pre> | |
| 128 | 134 | buildmsvc.bat FOSSIL_ENABLE_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 129 | 135 | </pre></blockquote> |
| 130 | 136 | |
| 131 | 137 | <li><p><i>Cygwin</i> → The same as other unix-like systems. It is |
| 132 | 138 | recommended to configure using: "<b>configure --disable-internal-sqlite</b>", |
| 133 | 139 |
| --- www/build.wiki | |
| +++ www/build.wiki | |
| @@ -116,17 +116,23 @@ | |
| 116 | |
| 117 | <li><p><i>MSVC</i> → Use the MSVC makefile. First |
| 118 | change to the "win/" subdirectory ("<b>cd win</b>") then run |
| 119 | "<b>nmake /f Makefile.msc</b>".<br><br>Alternatively, the batch |
| 120 | file "<b>win\buildmsvc.bat</b>" may be used and it will attempt to |
| 121 | detect and use the latest installed version of MSVC. To enable |
| 122 | the optional <a href="http://www.openssl.org/">OpenSSL</a> support, |
| 123 | first make sure that some recent <a href="http://www.perl.org/">Perl</a> |
| 124 | binaries are installed locally and then run one of the following commands: |
| 125 | <blockquote><pre> |
| 126 | nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 127 | |
| 128 | buildmsvc.bat FOSSIL_ENABLE_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 129 | </pre></blockquote> |
| 130 | |
| 131 | <li><p><i>Cygwin</i> → The same as other unix-like systems. It is |
| 132 | recommended to configure using: "<b>configure --disable-internal-sqlite</b>", |
| 133 |
| --- www/build.wiki | |
| +++ www/build.wiki | |
| @@ -116,17 +116,23 @@ | |
| 116 | |
| 117 | <li><p><i>MSVC</i> → Use the MSVC makefile. First |
| 118 | change to the "win/" subdirectory ("<b>cd win</b>") then run |
| 119 | "<b>nmake /f Makefile.msc</b>".<br><br>Alternatively, the batch |
| 120 | file "<b>win\buildmsvc.bat</b>" may be used and it will attempt to |
| 121 | detect and use the latest installed version of MSVC.<br><br>To enable |
| 122 | the optional <a href="https://www.openssl.org/">OpenSSL</a> support, |
| 123 | first <a href="https://www.openssl.org/source/">download the official |
| 124 | source code for OpenSSL</a> and extract it to an appropriately named |
| 125 | "<b>openssl-X.Y.ZA</b>" subdirectory within the local |
| 126 | [/tree?ci=trunk&name=compat | compat] directory (e.g. |
| 127 | "<b>compat/openssl-1.0.1i</b>"), then make sure that some recent |
| 128 | <a href="http://www.perl.org/">Perl</a> binaries are installed locally, |
| 129 | and finally run one of the following commands: |
| 130 | <blockquote><pre> |
| 131 | nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 132 | </pre></blockquote> |
| 133 | <blockquote><pre> |
| 134 | buildmsvc.bat FOSSIL_ENABLE_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 135 | </pre></blockquote> |
| 136 | |
| 137 | <li><p><i>Cygwin</i> → The same as other unix-like systems. It is |
| 138 | recommended to configure using: "<b>configure --disable-internal-sqlite</b>", |
| 139 |
+2
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -20,10 +20,12 @@ | ||
| 20 | 20 | * Let [/help?cmd=new|fossil new] no longer create an initial empty commit |
| 21 | 21 | by default. The first commit after checking out an empty repository will |
| 22 | 22 | become the initial commit. (NOT PLANNED FOR 1.30, BUT DONE TO EXPOSE |
| 23 | 23 | [/help?cmd=new|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 24 | 24 | MAKING ANY DECISION ON IT!) |
| 25 | + * Added a line-number toggle option to the [/help?cmd=/info|/info] | |
| 26 | + and [/help?cmd=/artifact|/artifact] pages. | |
| 25 | 27 | |
| 26 | 28 | <h2>Changes For Version 1.29 (2014-06-12)</h2> |
| 27 | 29 | * Add the ability to display content, diffs and annotations for UTF16 |
| 28 | 30 | text files in the web interface. |
| 29 | 31 | * Add the "SaveAs..." and "Invert" buttons |
| 30 | 32 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -20,10 +20,12 @@ | |
| 20 | * Let [/help?cmd=new|fossil new] no longer create an initial empty commit |
| 21 | by default. The first commit after checking out an empty repository will |
| 22 | become the initial commit. (NOT PLANNED FOR 1.30, BUT DONE TO EXPOSE |
| 23 | [/help?cmd=new|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 24 | MAKING ANY DECISION ON IT!) |
| 25 | |
| 26 | <h2>Changes For Version 1.29 (2014-06-12)</h2> |
| 27 | * Add the ability to display content, diffs and annotations for UTF16 |
| 28 | text files in the web interface. |
| 29 | * Add the "SaveAs..." and "Invert" buttons |
| 30 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -20,10 +20,12 @@ | |
| 20 | * Let [/help?cmd=new|fossil new] no longer create an initial empty commit |
| 21 | by default. The first commit after checking out an empty repository will |
| 22 | become the initial commit. (NOT PLANNED FOR 1.30, BUT DONE TO EXPOSE |
| 23 | [/help?cmd=new|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 24 | MAKING ANY DECISION ON IT!) |
| 25 | * Added a line-number toggle option to the [/help?cmd=/info|/info] |
| 26 | and [/help?cmd=/artifact|/artifact] pages. |
| 27 | |
| 28 | <h2>Changes For Version 1.29 (2014-06-12)</h2> |
| 29 | * Add the ability to display content, diffs and annotations for UTF16 |
| 30 | text files in the web interface. |
| 31 | * Add the "SaveAs..." and "Invert" buttons |
| 32 |