Fossil SCM
Rename --detail, --showfiles, --files to -v|--verbose (but keep original as deprecated)
Commit
34ed0afc8ac538d802db2a60413d5618ba73460a
Parent
14779a31ec6e05a…
7 files changed
+9
-9
+25
-22
+7
-4
+6
-3
+8
-5
+11
-8
+23
-17
+9
-9
| --- src/event.c | ||
| +++ src/event.c | ||
| @@ -43,11 +43,11 @@ | ||
| 43 | 43 | ** WEBPAGE: event |
| 44 | 44 | ** URL: /event |
| 45 | 45 | ** PARAMETERS: |
| 46 | 46 | ** |
| 47 | 47 | ** name=EVENTID // Identify the event to display EVENTID must be complete |
| 48 | -** detail=BOOLEAN // Show details if TRUE. Default is FALSE. Optional. | |
| 48 | +** v=BOOLEAN // Show details if TRUE. Default is FALSE. Optional. | |
| 49 | 49 | ** aid=ARTIFACTID // Which specific version of the event. Optional. |
| 50 | 50 | ** |
| 51 | 51 | ** Display an existing event identified by EVENTID |
| 52 | 52 | */ |
| 53 | 53 | void event_page(void){ |
| @@ -61,11 +61,11 @@ | ||
| 61 | 61 | Manifest *pEvent; /* Parsed event artifact */ |
| 62 | 62 | Blob fullbody; /* Complete content of the event body */ |
| 63 | 63 | Blob title; /* Title extracted from the event body */ |
| 64 | 64 | Blob tail; /* Event body that comes after the title */ |
| 65 | 65 | Stmt q1; /* Query to search for the event */ |
| 66 | - int showDetail; /* True to show details */ | |
| 66 | + int verboseFlag; /* True to show details */ | |
| 67 | 67 | |
| 68 | 68 | |
| 69 | 69 | /* wiki-read privilege is needed in order to read events. |
| 70 | 70 | */ |
| 71 | 71 | login_check_credentials(); |
| @@ -101,11 +101,11 @@ | ||
| 101 | 101 | @ Cannot locate specified event |
| 102 | 102 | style_footer(); |
| 103 | 103 | return; |
| 104 | 104 | } |
| 105 | 105 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 106 | - showDetail = atoi(PD("detail","0")); | |
| 106 | + verboseFlag = atoi(PD("verbose","0")); | |
| 107 | 107 | |
| 108 | 108 | /* Extract the event content. |
| 109 | 109 | */ |
| 110 | 110 | pEvent = manifest_get(rid, CFTYPE_EVENT); |
| 111 | 111 | if( pEvent==0 ){ |
| @@ -124,37 +124,37 @@ | ||
| 124 | 124 | } |
| 125 | 125 | zETime = db_text(0, "SELECT datetime(%.17g)", pEvent->rEventDate); |
| 126 | 126 | style_submenu_element("Context", "Context", "%s/timeline?c=%T", |
| 127 | 127 | g.zTop, zETime); |
| 128 | 128 | if( g.perm.Hyperlink ){ |
| 129 | - if( showDetail ){ | |
| 129 | + if( verboseFlag ){ | |
| 130 | 130 | style_submenu_element("Plain", "Plain", "%s/event?name=%s&aid=%s", |
| 131 | 131 | g.zTop, zEventId, zUuid); |
| 132 | 132 | if( nextRid ){ |
| 133 | 133 | char *zNext; |
| 134 | 134 | zNext = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nextRid); |
| 135 | 135 | style_submenu_element("Next", "Next", |
| 136 | - "%s/event?name=%s&aid=%s&detail=1", | |
| 136 | + "%s/event?name=%s&aid=%s&v=1", | |
| 137 | 137 | g.zTop, zEventId, zNext); |
| 138 | 138 | free(zNext); |
| 139 | 139 | } |
| 140 | 140 | if( prevRid ){ |
| 141 | 141 | char *zPrev; |
| 142 | 142 | zPrev = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", prevRid); |
| 143 | 143 | style_submenu_element("Prev", "Prev", |
| 144 | - "%s/event?name=%s&aid=%s&detail=1", | |
| 144 | + "%s/event?name=%s&aid=%s&v=1", | |
| 145 | 145 | g.zTop, zEventId, zPrev); |
| 146 | 146 | free(zPrev); |
| 147 | 147 | } |
| 148 | 148 | }else{ |
| 149 | - style_submenu_element("Detail", "Detail", | |
| 150 | - "%s/event?name=%s&aid=%s&detail=1", | |
| 149 | + style_submenu_element("Details", "Details", | |
| 150 | + "%s/event?name=%s&aid=%s&v=1", | |
| 151 | 151 | g.zTop, zEventId, zUuid); |
| 152 | 152 | } |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | - if( showDetail && g.perm.Hyperlink ){ | |
| 155 | + if( verboseFlag && g.perm.Hyperlink ){ | |
| 156 | 156 | int i; |
| 157 | 157 | const char *zClr = 0; |
| 158 | 158 | Blob comment; |
| 159 | 159 | |
| 160 | 160 | zATime = db_text(0, "SELECT datetime(%.17g)", pEvent->rDate); |
| 161 | 161 |
| --- src/event.c | |
| +++ src/event.c | |
| @@ -43,11 +43,11 @@ | |
| 43 | ** WEBPAGE: event |
| 44 | ** URL: /event |
| 45 | ** PARAMETERS: |
| 46 | ** |
| 47 | ** name=EVENTID // Identify the event to display EVENTID must be complete |
| 48 | ** detail=BOOLEAN // Show details if TRUE. Default is FALSE. Optional. |
| 49 | ** aid=ARTIFACTID // Which specific version of the event. Optional. |
| 50 | ** |
| 51 | ** Display an existing event identified by EVENTID |
| 52 | */ |
| 53 | void event_page(void){ |
| @@ -61,11 +61,11 @@ | |
| 61 | Manifest *pEvent; /* Parsed event artifact */ |
| 62 | Blob fullbody; /* Complete content of the event body */ |
| 63 | Blob title; /* Title extracted from the event body */ |
| 64 | Blob tail; /* Event body that comes after the title */ |
| 65 | Stmt q1; /* Query to search for the event */ |
| 66 | int showDetail; /* True to show details */ |
| 67 | |
| 68 | |
| 69 | /* wiki-read privilege is needed in order to read events. |
| 70 | */ |
| 71 | login_check_credentials(); |
| @@ -101,11 +101,11 @@ | |
| 101 | @ Cannot locate specified event |
| 102 | style_footer(); |
| 103 | return; |
| 104 | } |
| 105 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 106 | showDetail = atoi(PD("detail","0")); |
| 107 | |
| 108 | /* Extract the event content. |
| 109 | */ |
| 110 | pEvent = manifest_get(rid, CFTYPE_EVENT); |
| 111 | if( pEvent==0 ){ |
| @@ -124,37 +124,37 @@ | |
| 124 | } |
| 125 | zETime = db_text(0, "SELECT datetime(%.17g)", pEvent->rEventDate); |
| 126 | style_submenu_element("Context", "Context", "%s/timeline?c=%T", |
| 127 | g.zTop, zETime); |
| 128 | if( g.perm.Hyperlink ){ |
| 129 | if( showDetail ){ |
| 130 | style_submenu_element("Plain", "Plain", "%s/event?name=%s&aid=%s", |
| 131 | g.zTop, zEventId, zUuid); |
| 132 | if( nextRid ){ |
| 133 | char *zNext; |
| 134 | zNext = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nextRid); |
| 135 | style_submenu_element("Next", "Next", |
| 136 | "%s/event?name=%s&aid=%s&detail=1", |
| 137 | g.zTop, zEventId, zNext); |
| 138 | free(zNext); |
| 139 | } |
| 140 | if( prevRid ){ |
| 141 | char *zPrev; |
| 142 | zPrev = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", prevRid); |
| 143 | style_submenu_element("Prev", "Prev", |
| 144 | "%s/event?name=%s&aid=%s&detail=1", |
| 145 | g.zTop, zEventId, zPrev); |
| 146 | free(zPrev); |
| 147 | } |
| 148 | }else{ |
| 149 | style_submenu_element("Detail", "Detail", |
| 150 | "%s/event?name=%s&aid=%s&detail=1", |
| 151 | g.zTop, zEventId, zUuid); |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | if( showDetail && g.perm.Hyperlink ){ |
| 156 | int i; |
| 157 | const char *zClr = 0; |
| 158 | Blob comment; |
| 159 | |
| 160 | zATime = db_text(0, "SELECT datetime(%.17g)", pEvent->rDate); |
| 161 |
| --- src/event.c | |
| +++ src/event.c | |
| @@ -43,11 +43,11 @@ | |
| 43 | ** WEBPAGE: event |
| 44 | ** URL: /event |
| 45 | ** PARAMETERS: |
| 46 | ** |
| 47 | ** name=EVENTID // Identify the event to display EVENTID must be complete |
| 48 | ** v=BOOLEAN // Show details if TRUE. Default is FALSE. Optional. |
| 49 | ** aid=ARTIFACTID // Which specific version of the event. Optional. |
| 50 | ** |
| 51 | ** Display an existing event identified by EVENTID |
| 52 | */ |
| 53 | void event_page(void){ |
| @@ -61,11 +61,11 @@ | |
| 61 | Manifest *pEvent; /* Parsed event artifact */ |
| 62 | Blob fullbody; /* Complete content of the event body */ |
| 63 | Blob title; /* Title extracted from the event body */ |
| 64 | Blob tail; /* Event body that comes after the title */ |
| 65 | Stmt q1; /* Query to search for the event */ |
| 66 | int verboseFlag; /* True to show details */ |
| 67 | |
| 68 | |
| 69 | /* wiki-read privilege is needed in order to read events. |
| 70 | */ |
| 71 | login_check_credentials(); |
| @@ -101,11 +101,11 @@ | |
| 101 | @ Cannot locate specified event |
| 102 | style_footer(); |
| 103 | return; |
| 104 | } |
| 105 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 106 | verboseFlag = atoi(PD("verbose","0")); |
| 107 | |
| 108 | /* Extract the event content. |
| 109 | */ |
| 110 | pEvent = manifest_get(rid, CFTYPE_EVENT); |
| 111 | if( pEvent==0 ){ |
| @@ -124,37 +124,37 @@ | |
| 124 | } |
| 125 | zETime = db_text(0, "SELECT datetime(%.17g)", pEvent->rEventDate); |
| 126 | style_submenu_element("Context", "Context", "%s/timeline?c=%T", |
| 127 | g.zTop, zETime); |
| 128 | if( g.perm.Hyperlink ){ |
| 129 | if( verboseFlag ){ |
| 130 | style_submenu_element("Plain", "Plain", "%s/event?name=%s&aid=%s", |
| 131 | g.zTop, zEventId, zUuid); |
| 132 | if( nextRid ){ |
| 133 | char *zNext; |
| 134 | zNext = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nextRid); |
| 135 | style_submenu_element("Next", "Next", |
| 136 | "%s/event?name=%s&aid=%s&v=1", |
| 137 | g.zTop, zEventId, zNext); |
| 138 | free(zNext); |
| 139 | } |
| 140 | if( prevRid ){ |
| 141 | char *zPrev; |
| 142 | zPrev = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", prevRid); |
| 143 | style_submenu_element("Prev", "Prev", |
| 144 | "%s/event?name=%s&aid=%s&v=1", |
| 145 | g.zTop, zEventId, zPrev); |
| 146 | free(zPrev); |
| 147 | } |
| 148 | }else{ |
| 149 | style_submenu_element("Details", "Details", |
| 150 | "%s/event?name=%s&aid=%s&v=1", |
| 151 | g.zTop, zEventId, zUuid); |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | if( verboseFlag && g.perm.Hyperlink ){ |
| 156 | int i; |
| 157 | const char *zClr = 0; |
| 158 | Blob comment; |
| 159 | |
| 160 | zATime = db_text(0, "SELECT datetime(%.17g)", pEvent->rDate); |
| 161 |
+25
-22
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -171,17 +171,20 @@ | ||
| 171 | 171 | ** file in a checkout. |
| 172 | 172 | ** |
| 173 | 173 | ** Options: |
| 174 | 174 | ** |
| 175 | 175 | ** -R|--repository FILE Extract info from repository FILE |
| 176 | -** -l|--detail Show extra information | |
| 176 | +** -v|--verbose Show extra information | |
| 177 | 177 | ** |
| 178 | 178 | ** See also: annotate, artifact, finfo, timeline |
| 179 | 179 | */ |
| 180 | 180 | void info_cmd(void){ |
| 181 | 181 | i64 fsize; |
| 182 | - int bDetail = find_option("detail","l",0)!=0; | |
| 182 | + int verboseFlag = find_option("verbose","v",0)!=0; | |
| 183 | + if ( !verboseFlag ){ | |
| 184 | + verboseFlag = find_option("detail","l",0)!=0; /* deprecated */ | |
| 185 | + } | |
| 183 | 186 | if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){ |
| 184 | 187 | db_open_config(0); |
| 185 | 188 | db_record_repository_filename(g.argv[2]); |
| 186 | 189 | db_open_repository(g.argv[2]); |
| 187 | 190 | fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>")); |
| @@ -197,11 +200,11 @@ | ||
| 197 | 200 | fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>")); |
| 198 | 201 | if( g.localOpen ){ |
| 199 | 202 | fossil_print("repository: %s\n", db_repository_filename()); |
| 200 | 203 | fossil_print("local-root: %s\n", g.zLocalRoot); |
| 201 | 204 | } |
| 202 | - if( bDetail ) extraRepoInfo(); | |
| 205 | + if( verboseFlag ) extraRepoInfo(); | |
| 203 | 206 | if( g.zConfigDbName ){ |
| 204 | 207 | fossil_print("config-db: %s\n", g.zConfigDbName); |
| 205 | 208 | } |
| 206 | 209 | fossil_print("project-code: %s\n", db_get("project-code", "")); |
| 207 | 210 | vid = g.localOpen ? db_lget_int("checkout", 0) : 0; |
| @@ -397,13 +400,13 @@ | ||
| 397 | 400 | |
| 398 | 401 | /* |
| 399 | 402 | ** Construct an appropriate diffFlag for text_diff() based on query |
| 400 | 403 | ** parameters and the to boolean arguments. |
| 401 | 404 | */ |
| 402 | -u64 construct_diff_flags(int showDiff, int sideBySide){ | |
| 405 | +u64 construct_diff_flags(int verboseFlag, int sideBySide){ | |
| 403 | 406 | u64 diffFlags; |
| 404 | - if( showDiff==0 ){ | |
| 407 | + if( verboseFlag==0 ){ | |
| 405 | 408 | diffFlags = 0; /* Zero means do not show any diff */ |
| 406 | 409 | }else{ |
| 407 | 410 | int x; |
| 408 | 411 | if( sideBySide ){ |
| 409 | 412 | diffFlags = DIFF_SIDEBYSIDE | DIFF_IGNORE_EOLWS; |
| @@ -445,11 +448,11 @@ | ||
| 445 | 448 | */ |
| 446 | 449 | void ci_page(void){ |
| 447 | 450 | Stmt q; |
| 448 | 451 | int rid; |
| 449 | 452 | int isLeaf; |
| 450 | - int showDiff; /* True to show diffs */ | |
| 453 | + int verboseFlag; /* True to show diffs */ | |
| 451 | 454 | int sideBySide; /* True for side-by-side diffs */ |
| 452 | 455 | u64 diffFlags; /* Flag parameter for text_diff() */ |
| 453 | 456 | const char *zName; /* Name of the checkin to be displayed */ |
| 454 | 457 | const char *zUuid; /* UUID of zName */ |
| 455 | 458 | const char *zParent; /* UUID of the parent checkin (if any) */ |
| @@ -606,14 +609,14 @@ | ||
| 606 | 609 | db_finalize(&q); |
| 607 | 610 | showTags(rid, ""); |
| 608 | 611 | if( zParent ){ |
| 609 | 612 | @ <div class="section">Changes</div> |
| 610 | 613 | @ <div class="sectionmenu"> |
| 611 | - showDiff = g.zPath[0]!='c'; | |
| 614 | + verboseFlag = g.zPath[0]!='c'; | |
| 612 | 615 | if( db_get_boolean("show-version-diffs", 0)==0 ){ |
| 613 | - showDiff = !showDiff; | |
| 614 | - if( showDiff ){ | |
| 616 | + verboseFlag = !verboseFlag; | |
| 617 | + if( verboseFlag ){ | |
| 615 | 618 | @ %z(xhref("class='button'","%R/vinfo/%T",zName)) |
| 616 | 619 | @ hide diffs</a> |
| 617 | 620 | if( sideBySide ){ |
| 618 | 621 | @ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName)) |
| 619 | 622 | @ unified diffs</a> |
| @@ -626,11 +629,11 @@ | ||
| 626 | 629 | @ show unified diffs</a> |
| 627 | 630 | @ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName)) |
| 628 | 631 | @ show side-by-side diffs</a> |
| 629 | 632 | } |
| 630 | 633 | }else{ |
| 631 | - if( showDiff ){ | |
| 634 | + if( verboseFlag ){ | |
| 632 | 635 | @ %z(xhref("class='button'","%R/ci/%T",zName))hide diffs</a> |
| 633 | 636 | if( sideBySide ){ |
| 634 | 637 | @ %z(xhref("class='button'","%R/info/%T?sbs=0",zName)) |
| 635 | 638 | @ unified diffs</a> |
| 636 | 639 | }else{ |
| @@ -661,11 +664,11 @@ | ||
| 661 | 664 | " AND (mlink.fid>0" |
| 662 | 665 | " OR mlink.fnid NOT IN (SELECT pfnid FROM mlink WHERE mid=%d))" |
| 663 | 666 | " ORDER BY name /*sort*/", |
| 664 | 667 | rid, rid |
| 665 | 668 | ); |
| 666 | - diffFlags = construct_diff_flags(showDiff, sideBySide); | |
| 669 | + diffFlags = construct_diff_flags(verboseFlag, sideBySide); | |
| 667 | 670 | while( db_step(&q)==SQLITE_ROW ){ |
| 668 | 671 | const char *zName = db_column_text(&q,0); |
| 669 | 672 | int mperm = db_column_int(&q, 1); |
| 670 | 673 | const char *zOld = db_column_text(&q,2); |
| 671 | 674 | const char *zNew = db_column_text(&q,3); |
| @@ -875,19 +878,19 @@ | ||
| 875 | 878 | ** Query parameters: |
| 876 | 879 | ** |
| 877 | 880 | ** from=TAG |
| 878 | 881 | ** to=TAG |
| 879 | 882 | ** branch=TAG |
| 880 | -** detail=BOOLEAN | |
| 883 | +** v=BOOLEAN | |
| 881 | 884 | ** sbs=BOOLEAN |
| 882 | 885 | ** |
| 883 | 886 | ** |
| 884 | 887 | ** Show all differences between two checkins. |
| 885 | 888 | */ |
| 886 | 889 | void vdiff_page(void){ |
| 887 | 890 | int ridFrom, ridTo; |
| 888 | - int showDetail = 0; | |
| 891 | + int verboseFlag = 0; | |
| 889 | 892 | int sideBySide = 0; |
| 890 | 893 | u64 diffFlags = 0; |
| 891 | 894 | Manifest *pFrom, *pTo; |
| 892 | 895 | ManifestFile *pFileFrom, *pFileTo; |
| 893 | 896 | const char *zBranch; |
| @@ -910,26 +913,26 @@ | ||
| 910 | 913 | pTo = vdiff_parse_manifest("to", &ridTo); |
| 911 | 914 | if( pTo==0 ) return; |
| 912 | 915 | pFrom = vdiff_parse_manifest("from", &ridFrom); |
| 913 | 916 | if( pFrom==0 ) return; |
| 914 | 917 | sideBySide = atoi(PD("sbs","1")); |
| 915 | - showDetail = atoi(PD("detail","0")); | |
| 916 | - if( !showDetail && sideBySide ) showDetail = 1; | |
| 918 | + verboseFlag = atoi(PD("v","0")); | |
| 919 | + if( !verboseFlag && sideBySide ) verboseFlag = 1; | |
| 917 | 920 | zFrom = P("from"); |
| 918 | 921 | zTo = P("to"); |
| 919 | 922 | if( !sideBySide ){ |
| 920 | 923 | style_submenu_element("Side-by-side Diff", "sbsdiff", |
| 921 | - "%R/vdiff?from=%T&to=%T&detail=%d&sbs=1", | |
| 922 | - zFrom, zTo, showDetail); | |
| 924 | + "%R/vdiff?from=%T&to=%T&v=%d&sbs=1", | |
| 925 | + zFrom, zTo, verboseFlag); | |
| 923 | 926 | }else{ |
| 924 | 927 | style_submenu_element("Unified Diff", "udiff", |
| 925 | - "%R/vdiff?from=%T&to=%T&detail=%d&sbs=0", | |
| 926 | - zFrom, zTo, showDetail); | |
| 928 | + "%R/vdiff?from=%T&to=%T&v=%d&sbs=0", | |
| 929 | + zFrom, zTo, verboseFlag); | |
| 927 | 930 | } |
| 928 | 931 | style_submenu_element("Invert", "invert", |
| 929 | - "%R/vdiff?from=%T&to=%T&detail=%d&sbs=%d", | |
| 930 | - zTo, zFrom, showDetail, sideBySide); | |
| 932 | + "%R/vdiff?from=%T&to=%T&v=%d&sbs=%d", | |
| 933 | + zTo, zFrom, verboseFlag, sideBySide); | |
| 931 | 934 | style_header("Check-in Differences"); |
| 932 | 935 | @ <h2>Difference From:</h2><blockquote> |
| 933 | 936 | checkin_description(ridFrom); |
| 934 | 937 | @ </blockquote><h2>To:</h2><blockquote> |
| 935 | 938 | checkin_description(ridTo); |
| @@ -942,11 +945,11 @@ | ||
| 942 | 945 | |
| 943 | 946 | manifest_file_rewind(pFrom); |
| 944 | 947 | pFileFrom = manifest_file_next(pFrom, 0); |
| 945 | 948 | manifest_file_rewind(pTo); |
| 946 | 949 | pFileTo = manifest_file_next(pTo, 0); |
| 947 | - diffFlags = construct_diff_flags(showDetail, sideBySide); | |
| 950 | + diffFlags = construct_diff_flags(verboseFlag, sideBySide); | |
| 948 | 951 | while( pFileFrom || pFileTo ){ |
| 949 | 952 | int cmp; |
| 950 | 953 | if( pFileFrom==0 ){ |
| 951 | 954 | cmp = +1; |
| 952 | 955 | }else if( pFileTo==0 ){ |
| 953 | 956 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -171,17 +171,20 @@ | |
| 171 | ** file in a checkout. |
| 172 | ** |
| 173 | ** Options: |
| 174 | ** |
| 175 | ** -R|--repository FILE Extract info from repository FILE |
| 176 | ** -l|--detail Show extra information |
| 177 | ** |
| 178 | ** See also: annotate, artifact, finfo, timeline |
| 179 | */ |
| 180 | void info_cmd(void){ |
| 181 | i64 fsize; |
| 182 | int bDetail = find_option("detail","l",0)!=0; |
| 183 | if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){ |
| 184 | db_open_config(0); |
| 185 | db_record_repository_filename(g.argv[2]); |
| 186 | db_open_repository(g.argv[2]); |
| 187 | fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>")); |
| @@ -197,11 +200,11 @@ | |
| 197 | fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>")); |
| 198 | if( g.localOpen ){ |
| 199 | fossil_print("repository: %s\n", db_repository_filename()); |
| 200 | fossil_print("local-root: %s\n", g.zLocalRoot); |
| 201 | } |
| 202 | if( bDetail ) extraRepoInfo(); |
| 203 | if( g.zConfigDbName ){ |
| 204 | fossil_print("config-db: %s\n", g.zConfigDbName); |
| 205 | } |
| 206 | fossil_print("project-code: %s\n", db_get("project-code", "")); |
| 207 | vid = g.localOpen ? db_lget_int("checkout", 0) : 0; |
| @@ -397,13 +400,13 @@ | |
| 397 | |
| 398 | /* |
| 399 | ** Construct an appropriate diffFlag for text_diff() based on query |
| 400 | ** parameters and the to boolean arguments. |
| 401 | */ |
| 402 | u64 construct_diff_flags(int showDiff, int sideBySide){ |
| 403 | u64 diffFlags; |
| 404 | if( showDiff==0 ){ |
| 405 | diffFlags = 0; /* Zero means do not show any diff */ |
| 406 | }else{ |
| 407 | int x; |
| 408 | if( sideBySide ){ |
| 409 | diffFlags = DIFF_SIDEBYSIDE | DIFF_IGNORE_EOLWS; |
| @@ -445,11 +448,11 @@ | |
| 445 | */ |
| 446 | void ci_page(void){ |
| 447 | Stmt q; |
| 448 | int rid; |
| 449 | int isLeaf; |
| 450 | int showDiff; /* True to show diffs */ |
| 451 | int sideBySide; /* True for side-by-side diffs */ |
| 452 | u64 diffFlags; /* Flag parameter for text_diff() */ |
| 453 | const char *zName; /* Name of the checkin to be displayed */ |
| 454 | const char *zUuid; /* UUID of zName */ |
| 455 | const char *zParent; /* UUID of the parent checkin (if any) */ |
| @@ -606,14 +609,14 @@ | |
| 606 | db_finalize(&q); |
| 607 | showTags(rid, ""); |
| 608 | if( zParent ){ |
| 609 | @ <div class="section">Changes</div> |
| 610 | @ <div class="sectionmenu"> |
| 611 | showDiff = g.zPath[0]!='c'; |
| 612 | if( db_get_boolean("show-version-diffs", 0)==0 ){ |
| 613 | showDiff = !showDiff; |
| 614 | if( showDiff ){ |
| 615 | @ %z(xhref("class='button'","%R/vinfo/%T",zName)) |
| 616 | @ hide diffs</a> |
| 617 | if( sideBySide ){ |
| 618 | @ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName)) |
| 619 | @ unified diffs</a> |
| @@ -626,11 +629,11 @@ | |
| 626 | @ show unified diffs</a> |
| 627 | @ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName)) |
| 628 | @ show side-by-side diffs</a> |
| 629 | } |
| 630 | }else{ |
| 631 | if( showDiff ){ |
| 632 | @ %z(xhref("class='button'","%R/ci/%T",zName))hide diffs</a> |
| 633 | if( sideBySide ){ |
| 634 | @ %z(xhref("class='button'","%R/info/%T?sbs=0",zName)) |
| 635 | @ unified diffs</a> |
| 636 | }else{ |
| @@ -661,11 +664,11 @@ | |
| 661 | " AND (mlink.fid>0" |
| 662 | " OR mlink.fnid NOT IN (SELECT pfnid FROM mlink WHERE mid=%d))" |
| 663 | " ORDER BY name /*sort*/", |
| 664 | rid, rid |
| 665 | ); |
| 666 | diffFlags = construct_diff_flags(showDiff, sideBySide); |
| 667 | while( db_step(&q)==SQLITE_ROW ){ |
| 668 | const char *zName = db_column_text(&q,0); |
| 669 | int mperm = db_column_int(&q, 1); |
| 670 | const char *zOld = db_column_text(&q,2); |
| 671 | const char *zNew = db_column_text(&q,3); |
| @@ -875,19 +878,19 @@ | |
| 875 | ** Query parameters: |
| 876 | ** |
| 877 | ** from=TAG |
| 878 | ** to=TAG |
| 879 | ** branch=TAG |
| 880 | ** detail=BOOLEAN |
| 881 | ** sbs=BOOLEAN |
| 882 | ** |
| 883 | ** |
| 884 | ** Show all differences between two checkins. |
| 885 | */ |
| 886 | void vdiff_page(void){ |
| 887 | int ridFrom, ridTo; |
| 888 | int showDetail = 0; |
| 889 | int sideBySide = 0; |
| 890 | u64 diffFlags = 0; |
| 891 | Manifest *pFrom, *pTo; |
| 892 | ManifestFile *pFileFrom, *pFileTo; |
| 893 | const char *zBranch; |
| @@ -910,26 +913,26 @@ | |
| 910 | pTo = vdiff_parse_manifest("to", &ridTo); |
| 911 | if( pTo==0 ) return; |
| 912 | pFrom = vdiff_parse_manifest("from", &ridFrom); |
| 913 | if( pFrom==0 ) return; |
| 914 | sideBySide = atoi(PD("sbs","1")); |
| 915 | showDetail = atoi(PD("detail","0")); |
| 916 | if( !showDetail && sideBySide ) showDetail = 1; |
| 917 | zFrom = P("from"); |
| 918 | zTo = P("to"); |
| 919 | if( !sideBySide ){ |
| 920 | style_submenu_element("Side-by-side Diff", "sbsdiff", |
| 921 | "%R/vdiff?from=%T&to=%T&detail=%d&sbs=1", |
| 922 | zFrom, zTo, showDetail); |
| 923 | }else{ |
| 924 | style_submenu_element("Unified Diff", "udiff", |
| 925 | "%R/vdiff?from=%T&to=%T&detail=%d&sbs=0", |
| 926 | zFrom, zTo, showDetail); |
| 927 | } |
| 928 | style_submenu_element("Invert", "invert", |
| 929 | "%R/vdiff?from=%T&to=%T&detail=%d&sbs=%d", |
| 930 | zTo, zFrom, showDetail, sideBySide); |
| 931 | style_header("Check-in Differences"); |
| 932 | @ <h2>Difference From:</h2><blockquote> |
| 933 | checkin_description(ridFrom); |
| 934 | @ </blockquote><h2>To:</h2><blockquote> |
| 935 | checkin_description(ridTo); |
| @@ -942,11 +945,11 @@ | |
| 942 | |
| 943 | manifest_file_rewind(pFrom); |
| 944 | pFileFrom = manifest_file_next(pFrom, 0); |
| 945 | manifest_file_rewind(pTo); |
| 946 | pFileTo = manifest_file_next(pTo, 0); |
| 947 | diffFlags = construct_diff_flags(showDetail, sideBySide); |
| 948 | while( pFileFrom || pFileTo ){ |
| 949 | int cmp; |
| 950 | if( pFileFrom==0 ){ |
| 951 | cmp = +1; |
| 952 | }else if( pFileTo==0 ){ |
| 953 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -171,17 +171,20 @@ | |
| 171 | ** file in a checkout. |
| 172 | ** |
| 173 | ** Options: |
| 174 | ** |
| 175 | ** -R|--repository FILE Extract info from repository FILE |
| 176 | ** -v|--verbose Show extra information |
| 177 | ** |
| 178 | ** See also: annotate, artifact, finfo, timeline |
| 179 | */ |
| 180 | void info_cmd(void){ |
| 181 | i64 fsize; |
| 182 | int verboseFlag = find_option("verbose","v",0)!=0; |
| 183 | if ( !verboseFlag ){ |
| 184 | verboseFlag = find_option("detail","l",0)!=0; /* deprecated */ |
| 185 | } |
| 186 | if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){ |
| 187 | db_open_config(0); |
| 188 | db_record_repository_filename(g.argv[2]); |
| 189 | db_open_repository(g.argv[2]); |
| 190 | fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>")); |
| @@ -197,11 +200,11 @@ | |
| 200 | fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>")); |
| 201 | if( g.localOpen ){ |
| 202 | fossil_print("repository: %s\n", db_repository_filename()); |
| 203 | fossil_print("local-root: %s\n", g.zLocalRoot); |
| 204 | } |
| 205 | if( verboseFlag ) extraRepoInfo(); |
| 206 | if( g.zConfigDbName ){ |
| 207 | fossil_print("config-db: %s\n", g.zConfigDbName); |
| 208 | } |
| 209 | fossil_print("project-code: %s\n", db_get("project-code", "")); |
| 210 | vid = g.localOpen ? db_lget_int("checkout", 0) : 0; |
| @@ -397,13 +400,13 @@ | |
| 400 | |
| 401 | /* |
| 402 | ** Construct an appropriate diffFlag for text_diff() based on query |
| 403 | ** parameters and the to boolean arguments. |
| 404 | */ |
| 405 | u64 construct_diff_flags(int verboseFlag, int sideBySide){ |
| 406 | u64 diffFlags; |
| 407 | if( verboseFlag==0 ){ |
| 408 | diffFlags = 0; /* Zero means do not show any diff */ |
| 409 | }else{ |
| 410 | int x; |
| 411 | if( sideBySide ){ |
| 412 | diffFlags = DIFF_SIDEBYSIDE | DIFF_IGNORE_EOLWS; |
| @@ -445,11 +448,11 @@ | |
| 448 | */ |
| 449 | void ci_page(void){ |
| 450 | Stmt q; |
| 451 | int rid; |
| 452 | int isLeaf; |
| 453 | int verboseFlag; /* True to show diffs */ |
| 454 | int sideBySide; /* True for side-by-side diffs */ |
| 455 | u64 diffFlags; /* Flag parameter for text_diff() */ |
| 456 | const char *zName; /* Name of the checkin to be displayed */ |
| 457 | const char *zUuid; /* UUID of zName */ |
| 458 | const char *zParent; /* UUID of the parent checkin (if any) */ |
| @@ -606,14 +609,14 @@ | |
| 609 | db_finalize(&q); |
| 610 | showTags(rid, ""); |
| 611 | if( zParent ){ |
| 612 | @ <div class="section">Changes</div> |
| 613 | @ <div class="sectionmenu"> |
| 614 | verboseFlag = g.zPath[0]!='c'; |
| 615 | if( db_get_boolean("show-version-diffs", 0)==0 ){ |
| 616 | verboseFlag = !verboseFlag; |
| 617 | if( verboseFlag ){ |
| 618 | @ %z(xhref("class='button'","%R/vinfo/%T",zName)) |
| 619 | @ hide diffs</a> |
| 620 | if( sideBySide ){ |
| 621 | @ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName)) |
| 622 | @ unified diffs</a> |
| @@ -626,11 +629,11 @@ | |
| 629 | @ show unified diffs</a> |
| 630 | @ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName)) |
| 631 | @ show side-by-side diffs</a> |
| 632 | } |
| 633 | }else{ |
| 634 | if( verboseFlag ){ |
| 635 | @ %z(xhref("class='button'","%R/ci/%T",zName))hide diffs</a> |
| 636 | if( sideBySide ){ |
| 637 | @ %z(xhref("class='button'","%R/info/%T?sbs=0",zName)) |
| 638 | @ unified diffs</a> |
| 639 | }else{ |
| @@ -661,11 +664,11 @@ | |
| 664 | " AND (mlink.fid>0" |
| 665 | " OR mlink.fnid NOT IN (SELECT pfnid FROM mlink WHERE mid=%d))" |
| 666 | " ORDER BY name /*sort*/", |
| 667 | rid, rid |
| 668 | ); |
| 669 | diffFlags = construct_diff_flags(verboseFlag, sideBySide); |
| 670 | while( db_step(&q)==SQLITE_ROW ){ |
| 671 | const char *zName = db_column_text(&q,0); |
| 672 | int mperm = db_column_int(&q, 1); |
| 673 | const char *zOld = db_column_text(&q,2); |
| 674 | const char *zNew = db_column_text(&q,3); |
| @@ -875,19 +878,19 @@ | |
| 878 | ** Query parameters: |
| 879 | ** |
| 880 | ** from=TAG |
| 881 | ** to=TAG |
| 882 | ** branch=TAG |
| 883 | ** v=BOOLEAN |
| 884 | ** sbs=BOOLEAN |
| 885 | ** |
| 886 | ** |
| 887 | ** Show all differences between two checkins. |
| 888 | */ |
| 889 | void vdiff_page(void){ |
| 890 | int ridFrom, ridTo; |
| 891 | int verboseFlag = 0; |
| 892 | int sideBySide = 0; |
| 893 | u64 diffFlags = 0; |
| 894 | Manifest *pFrom, *pTo; |
| 895 | ManifestFile *pFileFrom, *pFileTo; |
| 896 | const char *zBranch; |
| @@ -910,26 +913,26 @@ | |
| 913 | pTo = vdiff_parse_manifest("to", &ridTo); |
| 914 | if( pTo==0 ) return; |
| 915 | pFrom = vdiff_parse_manifest("from", &ridFrom); |
| 916 | if( pFrom==0 ) return; |
| 917 | sideBySide = atoi(PD("sbs","1")); |
| 918 | verboseFlag = atoi(PD("v","0")); |
| 919 | if( !verboseFlag && sideBySide ) verboseFlag = 1; |
| 920 | zFrom = P("from"); |
| 921 | zTo = P("to"); |
| 922 | if( !sideBySide ){ |
| 923 | style_submenu_element("Side-by-side Diff", "sbsdiff", |
| 924 | "%R/vdiff?from=%T&to=%T&v=%d&sbs=1", |
| 925 | zFrom, zTo, verboseFlag); |
| 926 | }else{ |
| 927 | style_submenu_element("Unified Diff", "udiff", |
| 928 | "%R/vdiff?from=%T&to=%T&v=%d&sbs=0", |
| 929 | zFrom, zTo, verboseFlag); |
| 930 | } |
| 931 | style_submenu_element("Invert", "invert", |
| 932 | "%R/vdiff?from=%T&to=%T&v=%d&sbs=%d", |
| 933 | zTo, zFrom, verboseFlag, sideBySide); |
| 934 | style_header("Check-in Differences"); |
| 935 | @ <h2>Difference From:</h2><blockquote> |
| 936 | checkin_description(ridFrom); |
| 937 | @ </blockquote><h2>To:</h2><blockquote> |
| 938 | checkin_description(ridTo); |
| @@ -942,11 +945,11 @@ | |
| 945 | |
| 946 | manifest_file_rewind(pFrom); |
| 947 | pFileFrom = manifest_file_next(pFrom, 0); |
| 948 | manifest_file_rewind(pTo); |
| 949 | pFileTo = manifest_file_next(pTo, 0); |
| 950 | diffFlags = construct_diff_flags(verboseFlag, sideBySide); |
| 951 | while( pFileFrom || pFileTo ){ |
| 952 | int cmp; |
| 953 | if( pFileFrom==0 ){ |
| 954 | cmp = +1; |
| 955 | }else if( pFileTo==0 ){ |
| 956 |
+7
-4
| --- src/json.c | ||
| +++ src/json.c | ||
| @@ -2011,11 +2011,11 @@ | ||
| 2011 | 2011 | ** |
| 2012 | 2012 | */ |
| 2013 | 2013 | cson_value * json_page_stat(){ |
| 2014 | 2014 | i64 t, fsize; |
| 2015 | 2015 | int n, m; |
| 2016 | - int full; | |
| 2016 | + int verboseFlag; | |
| 2017 | 2017 | const char *zDb; |
| 2018 | 2018 | enum { BufLen = 1000 }; |
| 2019 | 2019 | char zBuf[BufLen]; |
| 2020 | 2020 | cson_value * jv = NULL; |
| 2021 | 2021 | cson_object * jo = NULL; |
| @@ -2025,11 +2025,14 @@ | ||
| 2025 | 2025 | if( !g.perm.Read ){ |
| 2026 | 2026 | json_set_err(FSL_JSON_E_DENIED, |
| 2027 | 2027 | "Requires 'o' permissions."); |
| 2028 | 2028 | return NULL; |
| 2029 | 2029 | } |
| 2030 | - full = json_find_option_bool("full",NULL,"f",0); | |
| 2030 | + verboseFlag = json_find_option_bool("verbose",NULL,"v",0); | |
| 2031 | + if( !verboseFlag){ | |
| 2032 | + verboseFlag = json_find_option_bool("full",NULL,"f",0); /* deprecated */ | |
| 2033 | + } | |
| 2031 | 2034 | #define SETBUF(O,K) cson_object_set(O, K, cson_value_new_string(zBuf, strlen(zBuf))); |
| 2032 | 2035 | |
| 2033 | 2036 | jv = cson_value_new_object(); |
| 2034 | 2037 | jo = cson_value_get_object(jv); |
| 2035 | 2038 | |
| @@ -2041,11 +2044,11 @@ | ||
| 2041 | 2044 | free(zTmp); |
| 2042 | 2045 | zTmp = NULL; |
| 2043 | 2046 | fsize = file_size(g.zRepositoryName); |
| 2044 | 2047 | cson_object_set(jo, "repositorySize", cson_value_new_integer((cson_int_t)fsize)); |
| 2045 | 2048 | |
| 2046 | - if(full){ | |
| 2049 | + if(verboseFlag){ | |
| 2047 | 2050 | n = db_int(0, "SELECT count(*) FROM blob"); |
| 2048 | 2051 | m = db_int(0, "SELECT count(*) FROM delta"); |
| 2049 | 2052 | cson_object_set(jo, "blobCount", cson_value_new_integer((cson_int_t)n)); |
| 2050 | 2053 | cson_object_set(jo, "deltaCount", cson_value_new_integer((cson_int_t)m)); |
| 2051 | 2054 | if( n>0 ){ |
| @@ -2080,11 +2083,11 @@ | ||
| 2080 | 2083 | " WHERE +tagname GLOB 'wiki-*'"); |
| 2081 | 2084 | cson_object_set(jo, "wikiPageCount", cson_value_new_integer((cson_int_t)n)); |
| 2082 | 2085 | n = db_int(0, "SELECT count(*) FROM tag /*scan*/" |
| 2083 | 2086 | " WHERE +tagname GLOB 'tkt-*'"); |
| 2084 | 2087 | cson_object_set(jo, "ticketCount", cson_value_new_integer((cson_int_t)n)); |
| 2085 | - }/*full*/ | |
| 2088 | + }/*verboseFlag*/ | |
| 2086 | 2089 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 2087 | 2090 | " + 0.99"); |
| 2088 | 2091 | cson_object_set(jo, "ageDays", cson_value_new_integer((cson_int_t)n)); |
| 2089 | 2092 | cson_object_set(jo, "ageYears", cson_value_new_double(n/365.2425)); |
| 2090 | 2093 | sqlite3_snprintf(BufLen, zBuf, db_get("project-code","")); |
| 2091 | 2094 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -2011,11 +2011,11 @@ | |
| 2011 | ** |
| 2012 | */ |
| 2013 | cson_value * json_page_stat(){ |
| 2014 | i64 t, fsize; |
| 2015 | int n, m; |
| 2016 | int full; |
| 2017 | const char *zDb; |
| 2018 | enum { BufLen = 1000 }; |
| 2019 | char zBuf[BufLen]; |
| 2020 | cson_value * jv = NULL; |
| 2021 | cson_object * jo = NULL; |
| @@ -2025,11 +2025,14 @@ | |
| 2025 | if( !g.perm.Read ){ |
| 2026 | json_set_err(FSL_JSON_E_DENIED, |
| 2027 | "Requires 'o' permissions."); |
| 2028 | return NULL; |
| 2029 | } |
| 2030 | full = json_find_option_bool("full",NULL,"f",0); |
| 2031 | #define SETBUF(O,K) cson_object_set(O, K, cson_value_new_string(zBuf, strlen(zBuf))); |
| 2032 | |
| 2033 | jv = cson_value_new_object(); |
| 2034 | jo = cson_value_get_object(jv); |
| 2035 | |
| @@ -2041,11 +2044,11 @@ | |
| 2041 | free(zTmp); |
| 2042 | zTmp = NULL; |
| 2043 | fsize = file_size(g.zRepositoryName); |
| 2044 | cson_object_set(jo, "repositorySize", cson_value_new_integer((cson_int_t)fsize)); |
| 2045 | |
| 2046 | if(full){ |
| 2047 | n = db_int(0, "SELECT count(*) FROM blob"); |
| 2048 | m = db_int(0, "SELECT count(*) FROM delta"); |
| 2049 | cson_object_set(jo, "blobCount", cson_value_new_integer((cson_int_t)n)); |
| 2050 | cson_object_set(jo, "deltaCount", cson_value_new_integer((cson_int_t)m)); |
| 2051 | if( n>0 ){ |
| @@ -2080,11 +2083,11 @@ | |
| 2080 | " WHERE +tagname GLOB 'wiki-*'"); |
| 2081 | cson_object_set(jo, "wikiPageCount", cson_value_new_integer((cson_int_t)n)); |
| 2082 | n = db_int(0, "SELECT count(*) FROM tag /*scan*/" |
| 2083 | " WHERE +tagname GLOB 'tkt-*'"); |
| 2084 | cson_object_set(jo, "ticketCount", cson_value_new_integer((cson_int_t)n)); |
| 2085 | }/*full*/ |
| 2086 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 2087 | " + 0.99"); |
| 2088 | cson_object_set(jo, "ageDays", cson_value_new_integer((cson_int_t)n)); |
| 2089 | cson_object_set(jo, "ageYears", cson_value_new_double(n/365.2425)); |
| 2090 | sqlite3_snprintf(BufLen, zBuf, db_get("project-code","")); |
| 2091 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -2011,11 +2011,11 @@ | |
| 2011 | ** |
| 2012 | */ |
| 2013 | cson_value * json_page_stat(){ |
| 2014 | i64 t, fsize; |
| 2015 | int n, m; |
| 2016 | int verboseFlag; |
| 2017 | const char *zDb; |
| 2018 | enum { BufLen = 1000 }; |
| 2019 | char zBuf[BufLen]; |
| 2020 | cson_value * jv = NULL; |
| 2021 | cson_object * jo = NULL; |
| @@ -2025,11 +2025,14 @@ | |
| 2025 | if( !g.perm.Read ){ |
| 2026 | json_set_err(FSL_JSON_E_DENIED, |
| 2027 | "Requires 'o' permissions."); |
| 2028 | return NULL; |
| 2029 | } |
| 2030 | verboseFlag = json_find_option_bool("verbose",NULL,"v",0); |
| 2031 | if( !verboseFlag){ |
| 2032 | verboseFlag = json_find_option_bool("full",NULL,"f",0); /* deprecated */ |
| 2033 | } |
| 2034 | #define SETBUF(O,K) cson_object_set(O, K, cson_value_new_string(zBuf, strlen(zBuf))); |
| 2035 | |
| 2036 | jv = cson_value_new_object(); |
| 2037 | jo = cson_value_get_object(jv); |
| 2038 | |
| @@ -2041,11 +2044,11 @@ | |
| 2044 | free(zTmp); |
| 2045 | zTmp = NULL; |
| 2046 | fsize = file_size(g.zRepositoryName); |
| 2047 | cson_object_set(jo, "repositorySize", cson_value_new_integer((cson_int_t)fsize)); |
| 2048 | |
| 2049 | if(verboseFlag){ |
| 2050 | n = db_int(0, "SELECT count(*) FROM blob"); |
| 2051 | m = db_int(0, "SELECT count(*) FROM delta"); |
| 2052 | cson_object_set(jo, "blobCount", cson_value_new_integer((cson_int_t)n)); |
| 2053 | cson_object_set(jo, "deltaCount", cson_value_new_integer((cson_int_t)m)); |
| 2054 | if( n>0 ){ |
| @@ -2080,11 +2083,11 @@ | |
| 2083 | " WHERE +tagname GLOB 'wiki-*'"); |
| 2084 | cson_object_set(jo, "wikiPageCount", cson_value_new_integer((cson_int_t)n)); |
| 2085 | n = db_int(0, "SELECT count(*) FROM tag /*scan*/" |
| 2086 | " WHERE +tagname GLOB 'tkt-*'"); |
| 2087 | cson_object_set(jo, "ticketCount", cson_value_new_integer((cson_int_t)n)); |
| 2088 | }/*verboseFlag*/ |
| 2089 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 2090 | " + 0.99"); |
| 2091 | cson_object_set(jo, "ageDays", cson_value_new_integer((cson_int_t)n)); |
| 2092 | cson_object_set(jo, "ageYears", cson_value_new_double(n/365.2425)); |
| 2093 | sqlite3_snprintf(BufLen, zBuf, db_get("project-code","")); |
| 2094 |
+6
-3
| --- src/json_timeline.c | ||
| +++ src/json_timeline.c | ||
| @@ -426,11 +426,11 @@ | ||
| 426 | 426 | cson_object * pay = NULL; |
| 427 | 427 | cson_value * tmp = NULL; |
| 428 | 428 | cson_value * listV = NULL; |
| 429 | 429 | cson_array * list = NULL; |
| 430 | 430 | int check = 0; |
| 431 | - char showFiles = -1/*magic number*/; | |
| 431 | + char verboseFlag; | |
| 432 | 432 | Stmt q = empty_Stmt; |
| 433 | 433 | char warnRowToJsonFailed = 0; |
| 434 | 434 | Blob sql = empty_blob; |
| 435 | 435 | if( !g.perm.Hyperlink ){ |
| 436 | 436 | /* Reminder to self: HTML impl requires 'o' (Read) |
| @@ -437,11 +437,14 @@ | ||
| 437 | 437 | rights. |
| 438 | 438 | */ |
| 439 | 439 | json_set_err( FSL_JSON_E_DENIED, "Checkin timeline requires 'h' access." ); |
| 440 | 440 | return NULL; |
| 441 | 441 | } |
| 442 | - showFiles = json_find_option_bool("files",NULL,"f",0); | |
| 442 | + verboseFlag = json_find_option_bool("verbose",NULL,"v",0); | |
| 443 | + if( !verboseFlag ){ | |
| 444 | + verboseFlag = json_find_option_bool("files",NULL,"f",0); | |
| 445 | + } | |
| 443 | 446 | payV = cson_value_new_object(); |
| 444 | 447 | pay = cson_value_get_object(payV); |
| 445 | 448 | check = json_timeline_setup_sql( "ci", &sql, pay ); |
| 446 | 449 | if(check){ |
| 447 | 450 | json_set_err(check, "Query initialization failed."); |
| @@ -470,11 +473,11 @@ | ||
| 470 | 473 | tmp = listV; |
| 471 | 474 | SET("timeline"); |
| 472 | 475 | while( (SQLITE_ROW == db_step(&q) )){ |
| 473 | 476 | /* convert each row into a JSON object...*/ |
| 474 | 477 | int const rid = db_column_int(&q,0); |
| 475 | - cson_value * rowV = json_artifact_for_ci(rid, showFiles); | |
| 478 | + cson_value * rowV = json_artifact_for_ci(rid, verboseFlag); | |
| 476 | 479 | cson_object * row = cson_value_get_object(rowV); |
| 477 | 480 | if(!row){ |
| 478 | 481 | if( !warnRowToJsonFailed ){ |
| 479 | 482 | warnRowToJsonFailed = 1; |
| 480 | 483 | json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED, |
| 481 | 484 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -426,11 +426,11 @@ | |
| 426 | cson_object * pay = NULL; |
| 427 | cson_value * tmp = NULL; |
| 428 | cson_value * listV = NULL; |
| 429 | cson_array * list = NULL; |
| 430 | int check = 0; |
| 431 | char showFiles = -1/*magic number*/; |
| 432 | Stmt q = empty_Stmt; |
| 433 | char warnRowToJsonFailed = 0; |
| 434 | Blob sql = empty_blob; |
| 435 | if( !g.perm.Hyperlink ){ |
| 436 | /* Reminder to self: HTML impl requires 'o' (Read) |
| @@ -437,11 +437,14 @@ | |
| 437 | rights. |
| 438 | */ |
| 439 | json_set_err( FSL_JSON_E_DENIED, "Checkin timeline requires 'h' access." ); |
| 440 | return NULL; |
| 441 | } |
| 442 | showFiles = json_find_option_bool("files",NULL,"f",0); |
| 443 | payV = cson_value_new_object(); |
| 444 | pay = cson_value_get_object(payV); |
| 445 | check = json_timeline_setup_sql( "ci", &sql, pay ); |
| 446 | if(check){ |
| 447 | json_set_err(check, "Query initialization failed."); |
| @@ -470,11 +473,11 @@ | |
| 470 | tmp = listV; |
| 471 | SET("timeline"); |
| 472 | while( (SQLITE_ROW == db_step(&q) )){ |
| 473 | /* convert each row into a JSON object...*/ |
| 474 | int const rid = db_column_int(&q,0); |
| 475 | cson_value * rowV = json_artifact_for_ci(rid, showFiles); |
| 476 | cson_object * row = cson_value_get_object(rowV); |
| 477 | if(!row){ |
| 478 | if( !warnRowToJsonFailed ){ |
| 479 | warnRowToJsonFailed = 1; |
| 480 | json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED, |
| 481 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -426,11 +426,11 @@ | |
| 426 | cson_object * pay = NULL; |
| 427 | cson_value * tmp = NULL; |
| 428 | cson_value * listV = NULL; |
| 429 | cson_array * list = NULL; |
| 430 | int check = 0; |
| 431 | char verboseFlag; |
| 432 | Stmt q = empty_Stmt; |
| 433 | char warnRowToJsonFailed = 0; |
| 434 | Blob sql = empty_blob; |
| 435 | if( !g.perm.Hyperlink ){ |
| 436 | /* Reminder to self: HTML impl requires 'o' (Read) |
| @@ -437,11 +437,14 @@ | |
| 437 | rights. |
| 438 | */ |
| 439 | json_set_err( FSL_JSON_E_DENIED, "Checkin timeline requires 'h' access." ); |
| 440 | return NULL; |
| 441 | } |
| 442 | verboseFlag = json_find_option_bool("verbose",NULL,"v",0); |
| 443 | if( !verboseFlag ){ |
| 444 | verboseFlag = json_find_option_bool("files",NULL,"f",0); |
| 445 | } |
| 446 | payV = cson_value_new_object(); |
| 447 | pay = cson_value_get_object(payV); |
| 448 | check = json_timeline_setup_sql( "ci", &sql, pay ); |
| 449 | if(check){ |
| 450 | json_set_err(check, "Query initialization failed."); |
| @@ -470,11 +473,11 @@ | |
| 473 | tmp = listV; |
| 474 | SET("timeline"); |
| 475 | while( (SQLITE_ROW == db_step(&q) )){ |
| 476 | /* convert each row into a JSON object...*/ |
| 477 | int const rid = db_column_int(&q,0); |
| 478 | cson_value * rowV = json_artifact_for_ci(rid, verboseFlag); |
| 479 | cson_object * row = cson_value_get_object(rowV); |
| 480 | if(!row){ |
| 481 | if( !warnRowToJsonFailed ){ |
| 482 | warnRowToJsonFailed = 1; |
| 483 | json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED, |
| 484 |
+8
-5
| --- src/merge.c | ||
| +++ src/merge.c | ||
| @@ -89,21 +89,21 @@ | ||
| 89 | 89 | ** |
| 90 | 90 | ** --case-sensitive BOOL Override the case-sensitive setting. If false, |
| 91 | 91 | ** files whose names differ only in case are taken |
| 92 | 92 | ** to be the same file. |
| 93 | 93 | ** |
| 94 | -** --detail Show additional details of the merge | |
| 94 | +** -v|--verbose Show additional details of the merge | |
| 95 | 95 | ** |
| 96 | 96 | ** -f|--force Force the merge even if it would be a no-op. |
| 97 | 97 | ** |
| 98 | 98 | ** -n|--dry-run If given, display instead of run actions |
| 99 | 99 | */ |
| 100 | 100 | void merge_cmd(void){ |
| 101 | 101 | int vid; /* Current version "V" */ |
| 102 | 102 | int mid; /* Version we are merging from "M" */ |
| 103 | 103 | int pid; /* The pivot version - most recent common ancestor P */ |
| 104 | - int detailFlag; /* True if the --detail option is present */ | |
| 104 | + int verboseFlag; /* True if the --verbose option is present */ | |
| 105 | 105 | int pickFlag; /* True if the --cherrypick option is present */ |
| 106 | 106 | int backoutFlag; /* True if the --backout option is present */ |
| 107 | 107 | int dryRunFlag; /* True if the --dry-run or -n option is present */ |
| 108 | 108 | int forceFlag; /* True if the --force or -f option is present */ |
| 109 | 109 | const char *zBinGlob; /* The value of --binary */ |
| @@ -123,11 +123,14 @@ | ||
| 123 | 123 | ** M The version being merged in |
| 124 | 124 | ** P The "pivot" - the most recent common ancestor of V and M. |
| 125 | 125 | */ |
| 126 | 126 | |
| 127 | 127 | undo_capture_command_line(); |
| 128 | - detailFlag = find_option("detail",0,0)!=0; | |
| 128 | + verboseFlag = find_option("verbose","v",0)!=0; | |
| 129 | + if ( !verboseFlag ){ | |
| 130 | + verboseFlag = find_option("detail",0,0)!=0; | |
| 131 | + } | |
| 129 | 132 | pickFlag = find_option("cherrypick",0,0)!=0; |
| 130 | 133 | backoutFlag = find_option("backout",0,0)!=0; |
| 131 | 134 | debugFlag = find_option("debug",0,0)!=0; |
| 132 | 135 | zBinGlob = find_option("binary",0,1); |
| 133 | 136 | dryRunFlag = find_option("dry-run","n",0)!=0; |
| @@ -248,11 +251,11 @@ | ||
| 248 | 251 | if( !forceFlag && mid==pid ){ |
| 249 | 252 | fossil_print("Merge skipped because it is a no-op. " |
| 250 | 253 | " Use --force to override.\n"); |
| 251 | 254 | return; |
| 252 | 255 | } |
| 253 | - if( detailFlag ){ | |
| 256 | + if( verboseFlag ){ | |
| 254 | 257 | print_checkin_description(mid, 12, "merge-from:"); |
| 255 | 258 | print_checkin_description(pid, 12, "baseline:"); |
| 256 | 259 | } |
| 257 | 260 | vfile_check_signature(vid, CKSIG_ENOTFILE); |
| 258 | 261 | db_begin_transaction(); |
| @@ -502,11 +505,11 @@ | ||
| 502 | 505 | int islinkm = db_column_int(&q, 8); |
| 503 | 506 | int rc; |
| 504 | 507 | char *zFullPath; |
| 505 | 508 | Blob m, p, r; |
| 506 | 509 | /* Do a 3-way merge of idp->idm into idp->idv. The results go into idv. */ |
| 507 | - if( detailFlag ){ | |
| 510 | + if( verboseFlag ){ | |
| 508 | 511 | fossil_print("MERGE %s (pivot=%d v1=%d v2=%d)\n", |
| 509 | 512 | zName, ridp, ridm, ridv); |
| 510 | 513 | }else{ |
| 511 | 514 | fossil_print("MERGE %s\n", zName); |
| 512 | 515 | } |
| 513 | 516 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -89,21 +89,21 @@ | |
| 89 | ** |
| 90 | ** --case-sensitive BOOL Override the case-sensitive setting. If false, |
| 91 | ** files whose names differ only in case are taken |
| 92 | ** to be the same file. |
| 93 | ** |
| 94 | ** --detail Show additional details of the merge |
| 95 | ** |
| 96 | ** -f|--force Force the merge even if it would be a no-op. |
| 97 | ** |
| 98 | ** -n|--dry-run If given, display instead of run actions |
| 99 | */ |
| 100 | void merge_cmd(void){ |
| 101 | int vid; /* Current version "V" */ |
| 102 | int mid; /* Version we are merging from "M" */ |
| 103 | int pid; /* The pivot version - most recent common ancestor P */ |
| 104 | int detailFlag; /* True if the --detail option is present */ |
| 105 | int pickFlag; /* True if the --cherrypick option is present */ |
| 106 | int backoutFlag; /* True if the --backout option is present */ |
| 107 | int dryRunFlag; /* True if the --dry-run or -n option is present */ |
| 108 | int forceFlag; /* True if the --force or -f option is present */ |
| 109 | const char *zBinGlob; /* The value of --binary */ |
| @@ -123,11 +123,14 @@ | |
| 123 | ** M The version being merged in |
| 124 | ** P The "pivot" - the most recent common ancestor of V and M. |
| 125 | */ |
| 126 | |
| 127 | undo_capture_command_line(); |
| 128 | detailFlag = find_option("detail",0,0)!=0; |
| 129 | pickFlag = find_option("cherrypick",0,0)!=0; |
| 130 | backoutFlag = find_option("backout",0,0)!=0; |
| 131 | debugFlag = find_option("debug",0,0)!=0; |
| 132 | zBinGlob = find_option("binary",0,1); |
| 133 | dryRunFlag = find_option("dry-run","n",0)!=0; |
| @@ -248,11 +251,11 @@ | |
| 248 | if( !forceFlag && mid==pid ){ |
| 249 | fossil_print("Merge skipped because it is a no-op. " |
| 250 | " Use --force to override.\n"); |
| 251 | return; |
| 252 | } |
| 253 | if( detailFlag ){ |
| 254 | print_checkin_description(mid, 12, "merge-from:"); |
| 255 | print_checkin_description(pid, 12, "baseline:"); |
| 256 | } |
| 257 | vfile_check_signature(vid, CKSIG_ENOTFILE); |
| 258 | db_begin_transaction(); |
| @@ -502,11 +505,11 @@ | |
| 502 | int islinkm = db_column_int(&q, 8); |
| 503 | int rc; |
| 504 | char *zFullPath; |
| 505 | Blob m, p, r; |
| 506 | /* Do a 3-way merge of idp->idm into idp->idv. The results go into idv. */ |
| 507 | if( detailFlag ){ |
| 508 | fossil_print("MERGE %s (pivot=%d v1=%d v2=%d)\n", |
| 509 | zName, ridp, ridm, ridv); |
| 510 | }else{ |
| 511 | fossil_print("MERGE %s\n", zName); |
| 512 | } |
| 513 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -89,21 +89,21 @@ | |
| 89 | ** |
| 90 | ** --case-sensitive BOOL Override the case-sensitive setting. If false, |
| 91 | ** files whose names differ only in case are taken |
| 92 | ** to be the same file. |
| 93 | ** |
| 94 | ** -v|--verbose Show additional details of the merge |
| 95 | ** |
| 96 | ** -f|--force Force the merge even if it would be a no-op. |
| 97 | ** |
| 98 | ** -n|--dry-run If given, display instead of run actions |
| 99 | */ |
| 100 | void merge_cmd(void){ |
| 101 | int vid; /* Current version "V" */ |
| 102 | int mid; /* Version we are merging from "M" */ |
| 103 | int pid; /* The pivot version - most recent common ancestor P */ |
| 104 | int verboseFlag; /* True if the --verbose option is present */ |
| 105 | int pickFlag; /* True if the --cherrypick option is present */ |
| 106 | int backoutFlag; /* True if the --backout option is present */ |
| 107 | int dryRunFlag; /* True if the --dry-run or -n option is present */ |
| 108 | int forceFlag; /* True if the --force or -f option is present */ |
| 109 | const char *zBinGlob; /* The value of --binary */ |
| @@ -123,11 +123,14 @@ | |
| 123 | ** M The version being merged in |
| 124 | ** P The "pivot" - the most recent common ancestor of V and M. |
| 125 | */ |
| 126 | |
| 127 | undo_capture_command_line(); |
| 128 | verboseFlag = find_option("verbose","v",0)!=0; |
| 129 | if ( !verboseFlag ){ |
| 130 | verboseFlag = find_option("detail",0,0)!=0; |
| 131 | } |
| 132 | pickFlag = find_option("cherrypick",0,0)!=0; |
| 133 | backoutFlag = find_option("backout",0,0)!=0; |
| 134 | debugFlag = find_option("debug",0,0)!=0; |
| 135 | zBinGlob = find_option("binary",0,1); |
| 136 | dryRunFlag = find_option("dry-run","n",0)!=0; |
| @@ -248,11 +251,11 @@ | |
| 251 | if( !forceFlag && mid==pid ){ |
| 252 | fossil_print("Merge skipped because it is a no-op. " |
| 253 | " Use --force to override.\n"); |
| 254 | return; |
| 255 | } |
| 256 | if( verboseFlag ){ |
| 257 | print_checkin_description(mid, 12, "merge-from:"); |
| 258 | print_checkin_description(pid, 12, "baseline:"); |
| 259 | } |
| 260 | vfile_check_signature(vid, CKSIG_ENOTFILE); |
| 261 | db_begin_transaction(); |
| @@ -502,11 +505,11 @@ | |
| 505 | int islinkm = db_column_int(&q, 8); |
| 506 | int rc; |
| 507 | char *zFullPath; |
| 508 | Blob m, p, r; |
| 509 | /* Do a 3-way merge of idp->idm into idp->idv. The results go into idv. */ |
| 510 | if( verboseFlag ){ |
| 511 | fossil_print("MERGE %s (pivot=%d v1=%d v2=%d)\n", |
| 512 | zName, ridp, ridm, ridv); |
| 513 | }else{ |
| 514 | fossil_print("MERGE %s\n", zName); |
| 515 | } |
| 516 |
+11
-8
| --- src/stash.c | ||
| +++ src/stash.c | ||
| @@ -416,15 +416,15 @@ | ||
| 416 | 416 | ** are listed, then only stash and revert the named files. The |
| 417 | 417 | ** "save" verb can be omitted if and only if there are no other |
| 418 | 418 | ** arguments. The "snapshot" verb works the same as "save" but |
| 419 | 419 | ** omits the revert, keeping the check-out unchanged. |
| 420 | 420 | ** |
| 421 | -** fossil stash list ?-l|--detail? | |
| 422 | -** fossil stash ls ?-l|--detail? | |
| 421 | +** fossil stash list ?-v|--verbose? | |
| 422 | +** fossil stash ls ?-v|--verbose? | |
| 423 | 423 | ** |
| 424 | 424 | ** List all changes sets currently stashed. Show information about |
| 425 | -** individual files in each changeset if --detail or -l is used. | |
| 425 | +** individual files in each changeset if --verbose or -v is used. | |
| 426 | 426 | ** |
| 427 | 427 | ** fossil stash show ?STASHID? ?DIFF-FLAGS? |
| 428 | 428 | ** |
| 429 | 429 | ** Show the content of a stash |
| 430 | 430 | ** |
| @@ -457,11 +457,11 @@ | ||
| 457 | 457 | ** |
| 458 | 458 | ** SUMMARY: |
| 459 | 459 | ** fossil stash |
| 460 | 460 | ** fossil stash save ?-m|--comment COMMENT? ?FILES...? |
| 461 | 461 | ** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...? |
| 462 | -** fossil stash list|ls ?-l|--detail? | |
| 462 | +** fossil stash list|ls ?-v|--verbose? | |
| 463 | 463 | ** fossil stash show ?STASHID? ?DIFF-OPTIONS? |
| 464 | 464 | ** fossil stash pop |
| 465 | 465 | ** fossil stash apply ?STASHID? |
| 466 | 466 | ** fossil stash goto ?STASHID? |
| 467 | 467 | ** fossil stash rm|drop ?STASHID? ?-a|--all? |
| @@ -511,18 +511,21 @@ | ||
| 511 | 511 | stash_create(); |
| 512 | 512 | }else |
| 513 | 513 | if( memcmp(zCmd, "list", nCmd)==0 || memcmp(zCmd, "ls", nCmd)==0 ){ |
| 514 | 514 | Stmt q, q2; |
| 515 | 515 | int n = 0; |
| 516 | - int fDetail = find_option("detail","l",0)!=0; | |
| 516 | + int verboseFlag = find_option("verbose","v",0)!=0; | |
| 517 | + if( !verboseFlag ){ | |
| 518 | + verboseFlag = find_option("detail","l",0)!=0; | |
| 519 | + } | |
| 517 | 520 | verify_all_options(); |
| 518 | 521 | db_prepare(&q, |
| 519 | 522 | "SELECT stashid, (SELECT uuid FROM blob WHERE rid=vid)," |
| 520 | 523 | " comment, datetime(ctime) FROM stash" |
| 521 | 524 | " ORDER BY ctime DESC" |
| 522 | 525 | ); |
| 523 | - if( fDetail ){ | |
| 526 | + if( verboseFlag ){ | |
| 524 | 527 | db_prepare(&q2, "SELECT isAdded, isRemoved, origname, newname" |
| 525 | 528 | " FROM stashfile WHERE stashid=$id"); |
| 526 | 529 | } |
| 527 | 530 | while( db_step(&q)==SQLITE_ROW ){ |
| 528 | 531 | int stashid = db_column_int(&q, 0); |
| @@ -536,11 +539,11 @@ | ||
| 536 | 539 | zCom = db_column_text(&q, 2); |
| 537 | 540 | if( zCom && zCom[0] ){ |
| 538 | 541 | fossil_print(" "); |
| 539 | 542 | comment_print(zCom, 7, 79); |
| 540 | 543 | } |
| 541 | - if( fDetail ){ | |
| 544 | + if( verboseFlag ){ | |
| 542 | 545 | db_bind_int(&q2, "$id", stashid); |
| 543 | 546 | while( db_step(&q2)==SQLITE_ROW ){ |
| 544 | 547 | int isAdded = db_column_int(&q2, 0); |
| 545 | 548 | int isRemoved = db_column_int(&q2, 1); |
| 546 | 549 | const char *zOrig = db_column_text(&q2, 2); |
| @@ -557,11 +560,11 @@ | ||
| 557 | 560 | } |
| 558 | 561 | db_reset(&q2); |
| 559 | 562 | } |
| 560 | 563 | } |
| 561 | 564 | db_finalize(&q); |
| 562 | - if( fDetail ) db_finalize(&q2); | |
| 565 | + if( verboseFlag ) db_finalize(&q2); | |
| 563 | 566 | if( n==0 ) fossil_print("empty stash\n"); |
| 564 | 567 | }else |
| 565 | 568 | if( memcmp(zCmd, "drop", nCmd)==0 || memcmp(zCmd, "rm", nCmd)==0 ){ |
| 566 | 569 | int allFlag = find_option("all", "a", 0)!=0; |
| 567 | 570 | if( allFlag ){ |
| 568 | 571 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -416,15 +416,15 @@ | |
| 416 | ** are listed, then only stash and revert the named files. The |
| 417 | ** "save" verb can be omitted if and only if there are no other |
| 418 | ** arguments. The "snapshot" verb works the same as "save" but |
| 419 | ** omits the revert, keeping the check-out unchanged. |
| 420 | ** |
| 421 | ** fossil stash list ?-l|--detail? |
| 422 | ** fossil stash ls ?-l|--detail? |
| 423 | ** |
| 424 | ** List all changes sets currently stashed. Show information about |
| 425 | ** individual files in each changeset if --detail or -l is used. |
| 426 | ** |
| 427 | ** fossil stash show ?STASHID? ?DIFF-FLAGS? |
| 428 | ** |
| 429 | ** Show the content of a stash |
| 430 | ** |
| @@ -457,11 +457,11 @@ | |
| 457 | ** |
| 458 | ** SUMMARY: |
| 459 | ** fossil stash |
| 460 | ** fossil stash save ?-m|--comment COMMENT? ?FILES...? |
| 461 | ** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...? |
| 462 | ** fossil stash list|ls ?-l|--detail? |
| 463 | ** fossil stash show ?STASHID? ?DIFF-OPTIONS? |
| 464 | ** fossil stash pop |
| 465 | ** fossil stash apply ?STASHID? |
| 466 | ** fossil stash goto ?STASHID? |
| 467 | ** fossil stash rm|drop ?STASHID? ?-a|--all? |
| @@ -511,18 +511,21 @@ | |
| 511 | stash_create(); |
| 512 | }else |
| 513 | if( memcmp(zCmd, "list", nCmd)==0 || memcmp(zCmd, "ls", nCmd)==0 ){ |
| 514 | Stmt q, q2; |
| 515 | int n = 0; |
| 516 | int fDetail = find_option("detail","l",0)!=0; |
| 517 | verify_all_options(); |
| 518 | db_prepare(&q, |
| 519 | "SELECT stashid, (SELECT uuid FROM blob WHERE rid=vid)," |
| 520 | " comment, datetime(ctime) FROM stash" |
| 521 | " ORDER BY ctime DESC" |
| 522 | ); |
| 523 | if( fDetail ){ |
| 524 | db_prepare(&q2, "SELECT isAdded, isRemoved, origname, newname" |
| 525 | " FROM stashfile WHERE stashid=$id"); |
| 526 | } |
| 527 | while( db_step(&q)==SQLITE_ROW ){ |
| 528 | int stashid = db_column_int(&q, 0); |
| @@ -536,11 +539,11 @@ | |
| 536 | zCom = db_column_text(&q, 2); |
| 537 | if( zCom && zCom[0] ){ |
| 538 | fossil_print(" "); |
| 539 | comment_print(zCom, 7, 79); |
| 540 | } |
| 541 | if( fDetail ){ |
| 542 | db_bind_int(&q2, "$id", stashid); |
| 543 | while( db_step(&q2)==SQLITE_ROW ){ |
| 544 | int isAdded = db_column_int(&q2, 0); |
| 545 | int isRemoved = db_column_int(&q2, 1); |
| 546 | const char *zOrig = db_column_text(&q2, 2); |
| @@ -557,11 +560,11 @@ | |
| 557 | } |
| 558 | db_reset(&q2); |
| 559 | } |
| 560 | } |
| 561 | db_finalize(&q); |
| 562 | if( fDetail ) db_finalize(&q2); |
| 563 | if( n==0 ) fossil_print("empty stash\n"); |
| 564 | }else |
| 565 | if( memcmp(zCmd, "drop", nCmd)==0 || memcmp(zCmd, "rm", nCmd)==0 ){ |
| 566 | int allFlag = find_option("all", "a", 0)!=0; |
| 567 | if( allFlag ){ |
| 568 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -416,15 +416,15 @@ | |
| 416 | ** are listed, then only stash and revert the named files. The |
| 417 | ** "save" verb can be omitted if and only if there are no other |
| 418 | ** arguments. The "snapshot" verb works the same as "save" but |
| 419 | ** omits the revert, keeping the check-out unchanged. |
| 420 | ** |
| 421 | ** fossil stash list ?-v|--verbose? |
| 422 | ** fossil stash ls ?-v|--verbose? |
| 423 | ** |
| 424 | ** List all changes sets currently stashed. Show information about |
| 425 | ** individual files in each changeset if --verbose or -v is used. |
| 426 | ** |
| 427 | ** fossil stash show ?STASHID? ?DIFF-FLAGS? |
| 428 | ** |
| 429 | ** Show the content of a stash |
| 430 | ** |
| @@ -457,11 +457,11 @@ | |
| 457 | ** |
| 458 | ** SUMMARY: |
| 459 | ** fossil stash |
| 460 | ** fossil stash save ?-m|--comment COMMENT? ?FILES...? |
| 461 | ** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...? |
| 462 | ** fossil stash list|ls ?-v|--verbose? |
| 463 | ** fossil stash show ?STASHID? ?DIFF-OPTIONS? |
| 464 | ** fossil stash pop |
| 465 | ** fossil stash apply ?STASHID? |
| 466 | ** fossil stash goto ?STASHID? |
| 467 | ** fossil stash rm|drop ?STASHID? ?-a|--all? |
| @@ -511,18 +511,21 @@ | |
| 511 | stash_create(); |
| 512 | }else |
| 513 | if( memcmp(zCmd, "list", nCmd)==0 || memcmp(zCmd, "ls", nCmd)==0 ){ |
| 514 | Stmt q, q2; |
| 515 | int n = 0; |
| 516 | int verboseFlag = find_option("verbose","v",0)!=0; |
| 517 | if( !verboseFlag ){ |
| 518 | verboseFlag = find_option("detail","l",0)!=0; |
| 519 | } |
| 520 | verify_all_options(); |
| 521 | db_prepare(&q, |
| 522 | "SELECT stashid, (SELECT uuid FROM blob WHERE rid=vid)," |
| 523 | " comment, datetime(ctime) FROM stash" |
| 524 | " ORDER BY ctime DESC" |
| 525 | ); |
| 526 | if( verboseFlag ){ |
| 527 | db_prepare(&q2, "SELECT isAdded, isRemoved, origname, newname" |
| 528 | " FROM stashfile WHERE stashid=$id"); |
| 529 | } |
| 530 | while( db_step(&q)==SQLITE_ROW ){ |
| 531 | int stashid = db_column_int(&q, 0); |
| @@ -536,11 +539,11 @@ | |
| 539 | zCom = db_column_text(&q, 2); |
| 540 | if( zCom && zCom[0] ){ |
| 541 | fossil_print(" "); |
| 542 | comment_print(zCom, 7, 79); |
| 543 | } |
| 544 | if( verboseFlag ){ |
| 545 | db_bind_int(&q2, "$id", stashid); |
| 546 | while( db_step(&q2)==SQLITE_ROW ){ |
| 547 | int isAdded = db_column_int(&q2, 0); |
| 548 | int isRemoved = db_column_int(&q2, 1); |
| 549 | const char *zOrig = db_column_text(&q2, 2); |
| @@ -557,11 +560,11 @@ | |
| 560 | } |
| 561 | db_reset(&q2); |
| 562 | } |
| 563 | } |
| 564 | db_finalize(&q); |
| 565 | if( verboseFlag ) db_finalize(&q2); |
| 566 | if( n==0 ) fossil_print("empty stash\n"); |
| 567 | }else |
| 568 | if( memcmp(zCmd, "drop", nCmd)==0 || memcmp(zCmd, "rm", nCmd)==0 ){ |
| 569 | int allFlag = find_option("all", "a", 0)!=0; |
| 570 | if( allFlag ){ |
| 571 |
+23
-17
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -375,11 +375,11 @@ | ||
| 375 | 375 | @ (user: %z(href("%z",zLink))%h(zDispUser)</a>%s(zTagList?",":"\051") |
| 376 | 376 | }else{ |
| 377 | 377 | @ (user: %h(zDispUser)%s(zTagList?",":"\051") |
| 378 | 378 | } |
| 379 | 379 | |
| 380 | - /* Generate a "detail" link for tags. */ | |
| 380 | + /* Generate a "details" link for tags. */ | |
| 381 | 381 | if( (zType[0]=='g' || zType[0]=='w' || zType[0]=='t') && g.perm.Hyperlink ){ |
| 382 | 382 | @ [%z(href("%R/info/%S",zUuid))details</a>] |
| 383 | 383 | } |
| 384 | 384 | |
| 385 | 385 | /* Generate the "tags: TAGLIST" at the end of the comment, together |
| @@ -956,11 +956,11 @@ | ||
| 956 | 956 | ** u=USER only if belonging to this user |
| 957 | 957 | ** y=TYPE 'ci', 'w', 't', 'e' |
| 958 | 958 | ** s=TEXT string search (comment and brief) |
| 959 | 959 | ** ng Suppress the graph if present |
| 960 | 960 | ** nd Suppress "divider" lines |
| 961 | -** fc Show details of files changed | |
| 961 | +** v Show details of files changed | |
| 962 | 962 | ** f=UUID Show family (immediate parents and children) of UUID |
| 963 | 963 | ** from=UUID Path from... |
| 964 | 964 | ** to=UUID ... to this |
| 965 | 965 | ** nomerge ... avoid merge links on the path |
| 966 | 966 | ** uf=FUUID Show only checkins that use given file version |
| @@ -1071,13 +1071,13 @@ | ||
| 1071 | 1071 | timeline_temp_table(); |
| 1072 | 1072 | blob_zero(&sql); |
| 1073 | 1073 | blob_zero(&desc); |
| 1074 | 1074 | blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1); |
| 1075 | 1075 | blob_append(&sql, timeline_query_for_www(), -1); |
| 1076 | - if( P("fc")!=0 || P("detail")!=0 ){ | |
| 1076 | + if( P("v")!=0 || P("verbose")!=0 ){ | |
| 1077 | 1077 | tmFlags |= TIMELINE_FCHANGES; |
| 1078 | - url_add_parameter(&url, "fc", 0); | |
| 1078 | + url_add_parameter(&url, "v", 0); | |
| 1079 | 1079 | } |
| 1080 | 1080 | if( !useDividers ) url_add_parameter(&url, "nd", 0); |
| 1081 | 1081 | if( ((from_rid && to_rid) || (me_rid && you_rid)) && g.perm.Read ){ |
| 1082 | 1082 | /* If from= and to= are present, display all nodes on a path connecting |
| 1083 | 1083 | ** the two */ |
| @@ -1382,13 +1382,13 @@ | ||
| 1382 | 1382 | if( nEntry<200 ){ |
| 1383 | 1383 | timeline_submenu(&url, "200 Entries", "n", "200", 0); |
| 1384 | 1384 | } |
| 1385 | 1385 | if( zType[0]=='a' || zType[0]=='c' ){ |
| 1386 | 1386 | if( tmFlags & TIMELINE_FCHANGES ){ |
| 1387 | - timeline_submenu(&url, "Hide Files", "fc", 0, 0); | |
| 1387 | + timeline_submenu(&url, "Hide Files", "v", 0, 0); | |
| 1388 | 1388 | }else{ |
| 1389 | - timeline_submenu(&url, "Show Files", "fc", "", 0); | |
| 1389 | + timeline_submenu(&url, "Show Files", "v", "", 0); | |
| 1390 | 1390 | } |
| 1391 | 1391 | } |
| 1392 | 1392 | } |
| 1393 | 1393 | } |
| 1394 | 1394 | if( P("showsql") ){ |
| @@ -1418,11 +1418,11 @@ | ||
| 1418 | 1418 | ** 4. Number of non-merge children |
| 1419 | 1419 | ** 5. Number of parents |
| 1420 | 1420 | ** 6. mtime |
| 1421 | 1421 | ** 7. branch |
| 1422 | 1422 | */ |
| 1423 | -void print_timeline(Stmt *q, int mxLine, int showfiles){ | |
| 1423 | +void print_timeline(Stmt *q, int mxLine, int verboseFlag){ | |
| 1424 | 1424 | int nLine = 0; |
| 1425 | 1425 | char zPrevDate[20]; |
| 1426 | 1426 | const char *zCurrentUuid=0; |
| 1427 | 1427 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 1428 | 1428 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| @@ -1474,11 +1474,11 @@ | ||
| 1474 | 1474 | } |
| 1475 | 1475 | zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom); |
| 1476 | 1476 | nLine += comment_print(zFree, 9, 79); |
| 1477 | 1477 | sqlite3_free(zFree); |
| 1478 | 1478 | |
| 1479 | - if(showfiles){ | |
| 1479 | + if(verboseFlag){ | |
| 1480 | 1480 | if( !fchngQueryInit ){ |
| 1481 | 1481 | db_prepare(&fchngQuery, |
| 1482 | 1482 | "SELECT (pid==0) AS isnew," |
| 1483 | 1483 | " (fid==0) AS isdel," |
| 1484 | 1484 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| @@ -1573,11 +1573,11 @@ | ||
| 1573 | 1573 | ** The DATETIME should be in the ISO8601 format. For |
| 1574 | 1574 | ** examples: "2007-08-18 07:21:21". You can also say "current" |
| 1575 | 1575 | ** for the current version or "now" for the current time. |
| 1576 | 1576 | ** |
| 1577 | 1577 | ** Options: |
| 1578 | -** -f|--showfiles print the list of files changed in a checkin after | |
| 1578 | +** -v|--verbose print the list of files changed in a checkin after | |
| 1579 | 1579 | ** the checkin comment. |
| 1580 | 1580 | ** -n|--limit N display the first N changes (default 20) |
| 1581 | 1581 | ** -t|--type TYPE only display items from the give types, such as: |
| 1582 | 1582 | ** ci = file commits only |
| 1583 | 1583 | ** e = events only |
| @@ -1593,12 +1593,15 @@ | ||
| 1593 | 1593 | char *zDate; |
| 1594 | 1594 | Blob sql; |
| 1595 | 1595 | int objid = 0; |
| 1596 | 1596 | Blob uuid; |
| 1597 | 1597 | int mode = 0 ; /* 0:none 1: before 2:after 3:children 4:parents */ |
| 1598 | - int showfilesFlag = 0 ; | |
| 1599 | - showfilesFlag = find_option("showfiles","f", 0)!=0; | |
| 1598 | + int verboseFlag = 0 ; | |
| 1599 | + verboseFlag = find_option("verbose","v", 0)!=0; | |
| 1600 | + if( !verboseFlag){ | |
| 1601 | + verboseFlag = find_option("showfiles","f", 0)!=0; /* deprecated */ | |
| 1602 | + } | |
| 1600 | 1603 | db_find_and_open_repository(0, 0); |
| 1601 | 1604 | zLimit = find_option("limit","n",1); |
| 1602 | 1605 | zType = find_option("type","t",1); |
| 1603 | 1606 | if ( !zLimit ){ |
| 1604 | 1607 | zLimit = find_option("count",0,1); |
| @@ -1683,11 +1686,11 @@ | ||
| 1683 | 1686 | blob_appendf(&sql, " AND event.type=%Q ", zType); |
| 1684 | 1687 | } |
| 1685 | 1688 | blob_appendf(&sql, " ORDER BY event.mtime DESC"); |
| 1686 | 1689 | db_prepare(&q, blob_str(&sql)); |
| 1687 | 1690 | blob_reset(&sql); |
| 1688 | - print_timeline(&q, n, showfilesFlag); | |
| 1691 | + print_timeline(&q, n, verboseFlag); | |
| 1689 | 1692 | db_finalize(&q); |
| 1690 | 1693 | } |
| 1691 | 1694 | |
| 1692 | 1695 | /* |
| 1693 | 1696 | ** This is a version of the "localtime()" function from the standard |
| @@ -1717,31 +1720,34 @@ | ||
| 1717 | 1720 | |
| 1718 | 1721 | |
| 1719 | 1722 | /* |
| 1720 | 1723 | ** COMMAND: test-timewarp-list |
| 1721 | 1724 | ** |
| 1722 | -** Usage: %fossil test-timewarp-list ?--detail? | |
| 1725 | +** Usage: %fossil test-timewarp-list ?-v|--verbose? | |
| 1723 | 1726 | ** |
| 1724 | 1727 | ** Display all instances of child checkins that appear earlier in time |
| 1725 | -** than their parent. If the --detail option is provided, both the | |
| 1728 | +** than their parent. If the --verbose option is provided, both the | |
| 1726 | 1729 | ** parent and child checking and their times are shown. |
| 1727 | 1730 | */ |
| 1728 | 1731 | void test_timewarp_cmd(void){ |
| 1729 | 1732 | Stmt q; |
| 1730 | - int showDetail; | |
| 1733 | + int verboseFlag; | |
| 1731 | 1734 | |
| 1732 | 1735 | db_find_and_open_repository(0, 0); |
| 1733 | - showDetail = find_option("detail", 0, 0)!=0; | |
| 1736 | + verboseFlag = find_option("verbose", "v", 0)!=0; | |
| 1737 | + if( !verboseFlag ){ | |
| 1738 | + verboseFlag = find_option("detail", 0, 0)!=0; /* deprecated */ | |
| 1739 | + } | |
| 1734 | 1740 | db_prepare(&q, |
| 1735 | 1741 | "SELECT (SELECT uuid FROM blob WHERE rid=p.cid)," |
| 1736 | 1742 | " (SELECT uuid FROM blob WHERE rid=c.cid)," |
| 1737 | 1743 | " datetime(p.mtime), datetime(c.mtime)" |
| 1738 | 1744 | " FROM plink p, plink c" |
| 1739 | 1745 | " WHERE p.cid=c.pid AND p.mtime>c.mtime" |
| 1740 | 1746 | ); |
| 1741 | 1747 | while( db_step(&q)==SQLITE_ROW ){ |
| 1742 | - if( !showDetail ){ | |
| 1748 | + if( !verboseFlag ){ | |
| 1743 | 1749 | fossil_print("%s\n", db_column_text(&q, 1)); |
| 1744 | 1750 | }else{ |
| 1745 | 1751 | fossil_print("%.14s -> %.14s %s -> %s\n", |
| 1746 | 1752 | db_column_text(&q, 0), |
| 1747 | 1753 | db_column_text(&q, 1), |
| 1748 | 1754 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -375,11 +375,11 @@ | |
| 375 | @ (user: %z(href("%z",zLink))%h(zDispUser)</a>%s(zTagList?",":"\051") |
| 376 | }else{ |
| 377 | @ (user: %h(zDispUser)%s(zTagList?",":"\051") |
| 378 | } |
| 379 | |
| 380 | /* Generate a "detail" link for tags. */ |
| 381 | if( (zType[0]=='g' || zType[0]=='w' || zType[0]=='t') && g.perm.Hyperlink ){ |
| 382 | @ [%z(href("%R/info/%S",zUuid))details</a>] |
| 383 | } |
| 384 | |
| 385 | /* Generate the "tags: TAGLIST" at the end of the comment, together |
| @@ -956,11 +956,11 @@ | |
| 956 | ** u=USER only if belonging to this user |
| 957 | ** y=TYPE 'ci', 'w', 't', 'e' |
| 958 | ** s=TEXT string search (comment and brief) |
| 959 | ** ng Suppress the graph if present |
| 960 | ** nd Suppress "divider" lines |
| 961 | ** fc Show details of files changed |
| 962 | ** f=UUID Show family (immediate parents and children) of UUID |
| 963 | ** from=UUID Path from... |
| 964 | ** to=UUID ... to this |
| 965 | ** nomerge ... avoid merge links on the path |
| 966 | ** uf=FUUID Show only checkins that use given file version |
| @@ -1071,13 +1071,13 @@ | |
| 1071 | timeline_temp_table(); |
| 1072 | blob_zero(&sql); |
| 1073 | blob_zero(&desc); |
| 1074 | blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1); |
| 1075 | blob_append(&sql, timeline_query_for_www(), -1); |
| 1076 | if( P("fc")!=0 || P("detail")!=0 ){ |
| 1077 | tmFlags |= TIMELINE_FCHANGES; |
| 1078 | url_add_parameter(&url, "fc", 0); |
| 1079 | } |
| 1080 | if( !useDividers ) url_add_parameter(&url, "nd", 0); |
| 1081 | if( ((from_rid && to_rid) || (me_rid && you_rid)) && g.perm.Read ){ |
| 1082 | /* If from= and to= are present, display all nodes on a path connecting |
| 1083 | ** the two */ |
| @@ -1382,13 +1382,13 @@ | |
| 1382 | if( nEntry<200 ){ |
| 1383 | timeline_submenu(&url, "200 Entries", "n", "200", 0); |
| 1384 | } |
| 1385 | if( zType[0]=='a' || zType[0]=='c' ){ |
| 1386 | if( tmFlags & TIMELINE_FCHANGES ){ |
| 1387 | timeline_submenu(&url, "Hide Files", "fc", 0, 0); |
| 1388 | }else{ |
| 1389 | timeline_submenu(&url, "Show Files", "fc", "", 0); |
| 1390 | } |
| 1391 | } |
| 1392 | } |
| 1393 | } |
| 1394 | if( P("showsql") ){ |
| @@ -1418,11 +1418,11 @@ | |
| 1418 | ** 4. Number of non-merge children |
| 1419 | ** 5. Number of parents |
| 1420 | ** 6. mtime |
| 1421 | ** 7. branch |
| 1422 | */ |
| 1423 | void print_timeline(Stmt *q, int mxLine, int showfiles){ |
| 1424 | int nLine = 0; |
| 1425 | char zPrevDate[20]; |
| 1426 | const char *zCurrentUuid=0; |
| 1427 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 1428 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| @@ -1474,11 +1474,11 @@ | |
| 1474 | } |
| 1475 | zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom); |
| 1476 | nLine += comment_print(zFree, 9, 79); |
| 1477 | sqlite3_free(zFree); |
| 1478 | |
| 1479 | if(showfiles){ |
| 1480 | if( !fchngQueryInit ){ |
| 1481 | db_prepare(&fchngQuery, |
| 1482 | "SELECT (pid==0) AS isnew," |
| 1483 | " (fid==0) AS isdel," |
| 1484 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| @@ -1573,11 +1573,11 @@ | |
| 1573 | ** The DATETIME should be in the ISO8601 format. For |
| 1574 | ** examples: "2007-08-18 07:21:21". You can also say "current" |
| 1575 | ** for the current version or "now" for the current time. |
| 1576 | ** |
| 1577 | ** Options: |
| 1578 | ** -f|--showfiles print the list of files changed in a checkin after |
| 1579 | ** the checkin comment. |
| 1580 | ** -n|--limit N display the first N changes (default 20) |
| 1581 | ** -t|--type TYPE only display items from the give types, such as: |
| 1582 | ** ci = file commits only |
| 1583 | ** e = events only |
| @@ -1593,12 +1593,15 @@ | |
| 1593 | char *zDate; |
| 1594 | Blob sql; |
| 1595 | int objid = 0; |
| 1596 | Blob uuid; |
| 1597 | int mode = 0 ; /* 0:none 1: before 2:after 3:children 4:parents */ |
| 1598 | int showfilesFlag = 0 ; |
| 1599 | showfilesFlag = find_option("showfiles","f", 0)!=0; |
| 1600 | db_find_and_open_repository(0, 0); |
| 1601 | zLimit = find_option("limit","n",1); |
| 1602 | zType = find_option("type","t",1); |
| 1603 | if ( !zLimit ){ |
| 1604 | zLimit = find_option("count",0,1); |
| @@ -1683,11 +1686,11 @@ | |
| 1683 | blob_appendf(&sql, " AND event.type=%Q ", zType); |
| 1684 | } |
| 1685 | blob_appendf(&sql, " ORDER BY event.mtime DESC"); |
| 1686 | db_prepare(&q, blob_str(&sql)); |
| 1687 | blob_reset(&sql); |
| 1688 | print_timeline(&q, n, showfilesFlag); |
| 1689 | db_finalize(&q); |
| 1690 | } |
| 1691 | |
| 1692 | /* |
| 1693 | ** This is a version of the "localtime()" function from the standard |
| @@ -1717,31 +1720,34 @@ | |
| 1717 | |
| 1718 | |
| 1719 | /* |
| 1720 | ** COMMAND: test-timewarp-list |
| 1721 | ** |
| 1722 | ** Usage: %fossil test-timewarp-list ?--detail? |
| 1723 | ** |
| 1724 | ** Display all instances of child checkins that appear earlier in time |
| 1725 | ** than their parent. If the --detail option is provided, both the |
| 1726 | ** parent and child checking and their times are shown. |
| 1727 | */ |
| 1728 | void test_timewarp_cmd(void){ |
| 1729 | Stmt q; |
| 1730 | int showDetail; |
| 1731 | |
| 1732 | db_find_and_open_repository(0, 0); |
| 1733 | showDetail = find_option("detail", 0, 0)!=0; |
| 1734 | db_prepare(&q, |
| 1735 | "SELECT (SELECT uuid FROM blob WHERE rid=p.cid)," |
| 1736 | " (SELECT uuid FROM blob WHERE rid=c.cid)," |
| 1737 | " datetime(p.mtime), datetime(c.mtime)" |
| 1738 | " FROM plink p, plink c" |
| 1739 | " WHERE p.cid=c.pid AND p.mtime>c.mtime" |
| 1740 | ); |
| 1741 | while( db_step(&q)==SQLITE_ROW ){ |
| 1742 | if( !showDetail ){ |
| 1743 | fossil_print("%s\n", db_column_text(&q, 1)); |
| 1744 | }else{ |
| 1745 | fossil_print("%.14s -> %.14s %s -> %s\n", |
| 1746 | db_column_text(&q, 0), |
| 1747 | db_column_text(&q, 1), |
| 1748 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -375,11 +375,11 @@ | |
| 375 | @ (user: %z(href("%z",zLink))%h(zDispUser)</a>%s(zTagList?",":"\051") |
| 376 | }else{ |
| 377 | @ (user: %h(zDispUser)%s(zTagList?",":"\051") |
| 378 | } |
| 379 | |
| 380 | /* Generate a "details" link for tags. */ |
| 381 | if( (zType[0]=='g' || zType[0]=='w' || zType[0]=='t') && g.perm.Hyperlink ){ |
| 382 | @ [%z(href("%R/info/%S",zUuid))details</a>] |
| 383 | } |
| 384 | |
| 385 | /* Generate the "tags: TAGLIST" at the end of the comment, together |
| @@ -956,11 +956,11 @@ | |
| 956 | ** u=USER only if belonging to this user |
| 957 | ** y=TYPE 'ci', 'w', 't', 'e' |
| 958 | ** s=TEXT string search (comment and brief) |
| 959 | ** ng Suppress the graph if present |
| 960 | ** nd Suppress "divider" lines |
| 961 | ** v Show details of files changed |
| 962 | ** f=UUID Show family (immediate parents and children) of UUID |
| 963 | ** from=UUID Path from... |
| 964 | ** to=UUID ... to this |
| 965 | ** nomerge ... avoid merge links on the path |
| 966 | ** uf=FUUID Show only checkins that use given file version |
| @@ -1071,13 +1071,13 @@ | |
| 1071 | timeline_temp_table(); |
| 1072 | blob_zero(&sql); |
| 1073 | blob_zero(&desc); |
| 1074 | blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1); |
| 1075 | blob_append(&sql, timeline_query_for_www(), -1); |
| 1076 | if( P("v")!=0 || P("verbose")!=0 ){ |
| 1077 | tmFlags |= TIMELINE_FCHANGES; |
| 1078 | url_add_parameter(&url, "v", 0); |
| 1079 | } |
| 1080 | if( !useDividers ) url_add_parameter(&url, "nd", 0); |
| 1081 | if( ((from_rid && to_rid) || (me_rid && you_rid)) && g.perm.Read ){ |
| 1082 | /* If from= and to= are present, display all nodes on a path connecting |
| 1083 | ** the two */ |
| @@ -1382,13 +1382,13 @@ | |
| 1382 | if( nEntry<200 ){ |
| 1383 | timeline_submenu(&url, "200 Entries", "n", "200", 0); |
| 1384 | } |
| 1385 | if( zType[0]=='a' || zType[0]=='c' ){ |
| 1386 | if( tmFlags & TIMELINE_FCHANGES ){ |
| 1387 | timeline_submenu(&url, "Hide Files", "v", 0, 0); |
| 1388 | }else{ |
| 1389 | timeline_submenu(&url, "Show Files", "v", "", 0); |
| 1390 | } |
| 1391 | } |
| 1392 | } |
| 1393 | } |
| 1394 | if( P("showsql") ){ |
| @@ -1418,11 +1418,11 @@ | |
| 1418 | ** 4. Number of non-merge children |
| 1419 | ** 5. Number of parents |
| 1420 | ** 6. mtime |
| 1421 | ** 7. branch |
| 1422 | */ |
| 1423 | void print_timeline(Stmt *q, int mxLine, int verboseFlag){ |
| 1424 | int nLine = 0; |
| 1425 | char zPrevDate[20]; |
| 1426 | const char *zCurrentUuid=0; |
| 1427 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 1428 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| @@ -1474,11 +1474,11 @@ | |
| 1474 | } |
| 1475 | zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom); |
| 1476 | nLine += comment_print(zFree, 9, 79); |
| 1477 | sqlite3_free(zFree); |
| 1478 | |
| 1479 | if(verboseFlag){ |
| 1480 | if( !fchngQueryInit ){ |
| 1481 | db_prepare(&fchngQuery, |
| 1482 | "SELECT (pid==0) AS isnew," |
| 1483 | " (fid==0) AS isdel," |
| 1484 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| @@ -1573,11 +1573,11 @@ | |
| 1573 | ** The DATETIME should be in the ISO8601 format. For |
| 1574 | ** examples: "2007-08-18 07:21:21". You can also say "current" |
| 1575 | ** for the current version or "now" for the current time. |
| 1576 | ** |
| 1577 | ** Options: |
| 1578 | ** -v|--verbose print the list of files changed in a checkin after |
| 1579 | ** the checkin comment. |
| 1580 | ** -n|--limit N display the first N changes (default 20) |
| 1581 | ** -t|--type TYPE only display items from the give types, such as: |
| 1582 | ** ci = file commits only |
| 1583 | ** e = events only |
| @@ -1593,12 +1593,15 @@ | |
| 1593 | char *zDate; |
| 1594 | Blob sql; |
| 1595 | int objid = 0; |
| 1596 | Blob uuid; |
| 1597 | int mode = 0 ; /* 0:none 1: before 2:after 3:children 4:parents */ |
| 1598 | int verboseFlag = 0 ; |
| 1599 | verboseFlag = find_option("verbose","v", 0)!=0; |
| 1600 | if( !verboseFlag){ |
| 1601 | verboseFlag = find_option("showfiles","f", 0)!=0; /* deprecated */ |
| 1602 | } |
| 1603 | db_find_and_open_repository(0, 0); |
| 1604 | zLimit = find_option("limit","n",1); |
| 1605 | zType = find_option("type","t",1); |
| 1606 | if ( !zLimit ){ |
| 1607 | zLimit = find_option("count",0,1); |
| @@ -1683,11 +1686,11 @@ | |
| 1686 | blob_appendf(&sql, " AND event.type=%Q ", zType); |
| 1687 | } |
| 1688 | blob_appendf(&sql, " ORDER BY event.mtime DESC"); |
| 1689 | db_prepare(&q, blob_str(&sql)); |
| 1690 | blob_reset(&sql); |
| 1691 | print_timeline(&q, n, verboseFlag); |
| 1692 | db_finalize(&q); |
| 1693 | } |
| 1694 | |
| 1695 | /* |
| 1696 | ** This is a version of the "localtime()" function from the standard |
| @@ -1717,31 +1720,34 @@ | |
| 1720 | |
| 1721 | |
| 1722 | /* |
| 1723 | ** COMMAND: test-timewarp-list |
| 1724 | ** |
| 1725 | ** Usage: %fossil test-timewarp-list ?-v|--verbose? |
| 1726 | ** |
| 1727 | ** Display all instances of child checkins that appear earlier in time |
| 1728 | ** than their parent. If the --verbose option is provided, both the |
| 1729 | ** parent and child checking and their times are shown. |
| 1730 | */ |
| 1731 | void test_timewarp_cmd(void){ |
| 1732 | Stmt q; |
| 1733 | int verboseFlag; |
| 1734 | |
| 1735 | db_find_and_open_repository(0, 0); |
| 1736 | verboseFlag = find_option("verbose", "v", 0)!=0; |
| 1737 | if( !verboseFlag ){ |
| 1738 | verboseFlag = find_option("detail", 0, 0)!=0; /* deprecated */ |
| 1739 | } |
| 1740 | db_prepare(&q, |
| 1741 | "SELECT (SELECT uuid FROM blob WHERE rid=p.cid)," |
| 1742 | " (SELECT uuid FROM blob WHERE rid=c.cid)," |
| 1743 | " datetime(p.mtime), datetime(c.mtime)" |
| 1744 | " FROM plink p, plink c" |
| 1745 | " WHERE p.cid=c.pid AND p.mtime>c.mtime" |
| 1746 | ); |
| 1747 | while( db_step(&q)==SQLITE_ROW ){ |
| 1748 | if( !verboseFlag ){ |
| 1749 | fossil_print("%s\n", db_column_text(&q, 1)); |
| 1750 | }else{ |
| 1751 | fossil_print("%.14s -> %.14s %s -> %s\n", |
| 1752 | db_column_text(&q, 0), |
| 1753 | db_column_text(&q, 1), |
| 1754 |