Fossil SCM
Add -v|--verbose as alternative to "-l|--detail" everywhere. And "v=" and "verbose=" as alternative to the "detail=" URL parameter.
Commit
5214a2a8b894b7b62c0d433366446c2109ec666a
Parent
f2b6459ef1da096…
8 files changed
+5
-5
+16
-8
+33
-22
+1
-1
+9
-6
+3
-3
+11
-8
+13
-10
+5
-5
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -149,28 +149,28 @@ | ||
| 149 | 149 | ** --rel-paths Display pathnames relative to the current working |
| 150 | 150 | ** directory. |
| 151 | 151 | ** --sha1sum Verify file status using SHA1 hashing rather |
| 152 | 152 | ** than relying on file mtimes. |
| 153 | 153 | ** --header Identify the repository if there are changes |
| 154 | -** -v Say "(none)" if there are no changes | |
| 154 | +** -v|--verbose Say "(none)" if there are no changes | |
| 155 | 155 | ** |
| 156 | 156 | ** See also: extra, ls, status |
| 157 | 157 | */ |
| 158 | 158 | void changes_cmd(void){ |
| 159 | 159 | Blob report; |
| 160 | 160 | int vid; |
| 161 | 161 | int useSha1sum = find_option("sha1sum", 0, 0)!=0; |
| 162 | 162 | int showHdr = find_option("header",0,0)!=0; |
| 163 | - int verbose = find_option("verbose","v",0)!=0; | |
| 163 | + int verboseFlag = find_option("verbose","v",0)!=0; | |
| 164 | 164 | int cwdRelative = 0; |
| 165 | 165 | db_must_be_within_tree(); |
| 166 | 166 | cwdRelative = determine_cwd_relative_option(); |
| 167 | 167 | blob_zero(&report); |
| 168 | 168 | vid = db_lget_int("checkout", 0); |
| 169 | 169 | vfile_check_signature(vid, useSha1sum ? CKSIG_SHA1 : 0); |
| 170 | 170 | status_report(&report, "", 0, cwdRelative); |
| 171 | - if( verbose && blob_size(&report)==0 ){ | |
| 171 | + if( verboseFlag && blob_size(&report)==0 ){ | |
| 172 | 172 | blob_append(&report, " (none)\n", -1); |
| 173 | 173 | } |
| 174 | 174 | if( showHdr && blob_size(&report)>0 ){ |
| 175 | 175 | fossil_print("Changes for %s at %s:\n", db_get("project-name","???"), |
| 176 | 176 | g.zLocalRoot); |
| @@ -1125,13 +1125,13 @@ | ||
| 1125 | 1125 | ** --allow-older allow a commit older than its ancestor |
| 1126 | 1126 | ** --baseline use a baseline manifest in the commit process |
| 1127 | 1127 | ** --bgcolor COLOR apply COLOR to this one check-in only |
| 1128 | 1128 | ** --branch NEW-BRANCH-NAME check in to this new branch |
| 1129 | 1129 | ** --branchcolor COLOR apply given COLOR to the branch |
| 1130 | -** --comment|-m COMMENT-TEXT use COMMENT-TEXT as commit comment | |
| 1131 | 1130 | ** --delta use a delta manifest in the commit process |
| 1132 | -** --message-file|-M FILE read the commit comment from given file | |
| 1131 | +** -m|--comment COMMENT-TEXT use COMMENT-TEXT as commit comment | |
| 1132 | +** -M|--message-file FILE read the commit comment from given file | |
| 1133 | 1133 | ** --mimetype MIMETYPE mimetype of check-in comment |
| 1134 | 1134 | ** -n|--dry-run If given, display instead of run actions |
| 1135 | 1135 | ** --no-warnings omit all warnings about file contents |
| 1136 | 1136 | ** --nosign do not attempt to sign this commit with gpg |
| 1137 | 1137 | ** --private do not sync changes and their descendants |
| 1138 | 1138 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -149,28 +149,28 @@ | |
| 149 | ** --rel-paths Display pathnames relative to the current working |
| 150 | ** directory. |
| 151 | ** --sha1sum Verify file status using SHA1 hashing rather |
| 152 | ** than relying on file mtimes. |
| 153 | ** --header Identify the repository if there are changes |
| 154 | ** -v Say "(none)" if there are no changes |
| 155 | ** |
| 156 | ** See also: extra, ls, status |
| 157 | */ |
| 158 | void changes_cmd(void){ |
| 159 | Blob report; |
| 160 | int vid; |
| 161 | int useSha1sum = find_option("sha1sum", 0, 0)!=0; |
| 162 | int showHdr = find_option("header",0,0)!=0; |
| 163 | int verbose = find_option("verbose","v",0)!=0; |
| 164 | int cwdRelative = 0; |
| 165 | db_must_be_within_tree(); |
| 166 | cwdRelative = determine_cwd_relative_option(); |
| 167 | blob_zero(&report); |
| 168 | vid = db_lget_int("checkout", 0); |
| 169 | vfile_check_signature(vid, useSha1sum ? CKSIG_SHA1 : 0); |
| 170 | status_report(&report, "", 0, cwdRelative); |
| 171 | if( verbose && blob_size(&report)==0 ){ |
| 172 | blob_append(&report, " (none)\n", -1); |
| 173 | } |
| 174 | if( showHdr && blob_size(&report)>0 ){ |
| 175 | fossil_print("Changes for %s at %s:\n", db_get("project-name","???"), |
| 176 | g.zLocalRoot); |
| @@ -1125,13 +1125,13 @@ | |
| 1125 | ** --allow-older allow a commit older than its ancestor |
| 1126 | ** --baseline use a baseline manifest in the commit process |
| 1127 | ** --bgcolor COLOR apply COLOR to this one check-in only |
| 1128 | ** --branch NEW-BRANCH-NAME check in to this new branch |
| 1129 | ** --branchcolor COLOR apply given COLOR to the branch |
| 1130 | ** --comment|-m COMMENT-TEXT use COMMENT-TEXT as commit comment |
| 1131 | ** --delta use a delta manifest in the commit process |
| 1132 | ** --message-file|-M FILE read the commit comment from given file |
| 1133 | ** --mimetype MIMETYPE mimetype of check-in comment |
| 1134 | ** -n|--dry-run If given, display instead of run actions |
| 1135 | ** --no-warnings omit all warnings about file contents |
| 1136 | ** --nosign do not attempt to sign this commit with gpg |
| 1137 | ** --private do not sync changes and their descendants |
| 1138 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -149,28 +149,28 @@ | |
| 149 | ** --rel-paths Display pathnames relative to the current working |
| 150 | ** directory. |
| 151 | ** --sha1sum Verify file status using SHA1 hashing rather |
| 152 | ** than relying on file mtimes. |
| 153 | ** --header Identify the repository if there are changes |
| 154 | ** -v|--verbose Say "(none)" if there are no changes |
| 155 | ** |
| 156 | ** See also: extra, ls, status |
| 157 | */ |
| 158 | void changes_cmd(void){ |
| 159 | Blob report; |
| 160 | int vid; |
| 161 | int useSha1sum = find_option("sha1sum", 0, 0)!=0; |
| 162 | int showHdr = find_option("header",0,0)!=0; |
| 163 | int verboseFlag = find_option("verbose","v",0)!=0; |
| 164 | int cwdRelative = 0; |
| 165 | db_must_be_within_tree(); |
| 166 | cwdRelative = determine_cwd_relative_option(); |
| 167 | blob_zero(&report); |
| 168 | vid = db_lget_int("checkout", 0); |
| 169 | vfile_check_signature(vid, useSha1sum ? CKSIG_SHA1 : 0); |
| 170 | status_report(&report, "", 0, cwdRelative); |
| 171 | if( verboseFlag && blob_size(&report)==0 ){ |
| 172 | blob_append(&report, " (none)\n", -1); |
| 173 | } |
| 174 | if( showHdr && blob_size(&report)>0 ){ |
| 175 | fossil_print("Changes for %s at %s:\n", db_get("project-name","???"), |
| 176 | g.zLocalRoot); |
| @@ -1125,13 +1125,13 @@ | |
| 1125 | ** --allow-older allow a commit older than its ancestor |
| 1126 | ** --baseline use a baseline manifest in the commit process |
| 1127 | ** --bgcolor COLOR apply COLOR to this one check-in only |
| 1128 | ** --branch NEW-BRANCH-NAME check in to this new branch |
| 1129 | ** --branchcolor COLOR apply given COLOR to the branch |
| 1130 | ** --delta use a delta manifest in the commit process |
| 1131 | ** -m|--comment COMMENT-TEXT use COMMENT-TEXT as commit comment |
| 1132 | ** -M|--message-file FILE read the commit comment from given file |
| 1133 | ** --mimetype MIMETYPE mimetype of check-in comment |
| 1134 | ** -n|--dry-run If given, display instead of run actions |
| 1135 | ** --no-warnings omit all warnings about file contents |
| 1136 | ** --nosign do not attempt to sign this commit with gpg |
| 1137 | ** --private do not sync changes and their descendants |
| 1138 |
+16
-8
| --- src/event.c | ||
| +++ src/event.c | ||
| @@ -43,29 +43,30 @@ | ||
| 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. | |
| 49 | 48 | ** aid=ARTIFACTID // Which specific version of the event. Optional. |
| 49 | +** v=BOOLEAN // Show details if TRUE. Default is FALSE. Optional. | |
| 50 | 50 | ** |
| 51 | 51 | ** Display an existing event identified by EVENTID |
| 52 | 52 | */ |
| 53 | 53 | void event_page(void){ |
| 54 | 54 | int rid = 0; /* rid of the event artifact */ |
| 55 | 55 | char *zUuid; /* UUID corresponding to rid */ |
| 56 | 56 | const char *zEventId; /* Event identifier */ |
| 57 | + const char *zVerbose; /* Value of verbose option */ | |
| 57 | 58 | char *zETime; /* Time of the event */ |
| 58 | 59 | char *zATime; /* Time the artifact was created */ |
| 59 | 60 | int specRid; /* rid specified by aid= parameter */ |
| 60 | 61 | int prevRid, nextRid; /* Previous or next edits of this event */ |
| 61 | 62 | Manifest *pEvent; /* Parsed event artifact */ |
| 62 | 63 | Blob fullbody; /* Complete content of the event body */ |
| 63 | 64 | Blob title; /* Title extracted from the event body */ |
| 64 | 65 | Blob tail; /* Event body that comes after the title */ |
| 65 | 66 | Stmt q1; /* Query to search for the event */ |
| 66 | - int showDetail; /* True to show details */ | |
| 67 | + int verboseFlag; /* True to show details */ | |
| 67 | 68 | |
| 68 | 69 | |
| 69 | 70 | /* wiki-read privilege is needed in order to read events. |
| 70 | 71 | */ |
| 71 | 72 | login_check_credentials(); |
| @@ -101,11 +102,18 @@ | ||
| 101 | 102 | @ Cannot locate specified event |
| 102 | 103 | style_footer(); |
| 103 | 104 | return; |
| 104 | 105 | } |
| 105 | 106 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 106 | - showDetail = atoi(PD("detail","0")); | |
| 107 | + zVerbose = P("v"); | |
| 108 | + if( !zVerbose ){ | |
| 109 | + zVerbose = P("verbose"); | |
| 110 | + } | |
| 111 | + if( !zVerbose ){ | |
| 112 | + zVerbose = P("detail"); /* deprecated */ | |
| 113 | + } | |
| 114 | + verboseFlag = (zVerbose!=0) && (*zVerbose!=0) && !is_false(zVerbose); | |
| 107 | 115 | |
| 108 | 116 | /* Extract the event content. |
| 109 | 117 | */ |
| 110 | 118 | pEvent = manifest_get(rid, CFTYPE_EVENT); |
| 111 | 119 | if( pEvent==0 ){ |
| @@ -124,37 +132,37 @@ | ||
| 124 | 132 | } |
| 125 | 133 | zETime = db_text(0, "SELECT datetime(%.17g)", pEvent->rEventDate); |
| 126 | 134 | style_submenu_element("Context", "Context", "%s/timeline?c=%T", |
| 127 | 135 | g.zTop, zETime); |
| 128 | 136 | if( g.perm.Hyperlink ){ |
| 129 | - if( showDetail ){ | |
| 137 | + if( verboseFlag ){ | |
| 130 | 138 | style_submenu_element("Plain", "Plain", "%s/event?name=%s&aid=%s", |
| 131 | 139 | g.zTop, zEventId, zUuid); |
| 132 | 140 | if( nextRid ){ |
| 133 | 141 | char *zNext; |
| 134 | 142 | zNext = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nextRid); |
| 135 | 143 | style_submenu_element("Next", "Next", |
| 136 | - "%s/event?name=%s&aid=%s&detail=1", | |
| 144 | + "%s/event?name=%s&aid=%s&v=1", | |
| 137 | 145 | g.zTop, zEventId, zNext); |
| 138 | 146 | free(zNext); |
| 139 | 147 | } |
| 140 | 148 | if( prevRid ){ |
| 141 | 149 | char *zPrev; |
| 142 | 150 | zPrev = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", prevRid); |
| 143 | 151 | style_submenu_element("Prev", "Prev", |
| 144 | - "%s/event?name=%s&aid=%s&detail=1", | |
| 152 | + "%s/event?name=%s&aid=%s&v=1", | |
| 145 | 153 | g.zTop, zEventId, zPrev); |
| 146 | 154 | free(zPrev); |
| 147 | 155 | } |
| 148 | 156 | }else{ |
| 149 | 157 | style_submenu_element("Detail", "Detail", |
| 150 | - "%s/event?name=%s&aid=%s&detail=1", | |
| 158 | + "%s/event?name=%s&aid=%s&v=1", | |
| 151 | 159 | g.zTop, zEventId, zUuid); |
| 152 | 160 | } |
| 153 | 161 | } |
| 154 | 162 | |
| 155 | - if( showDetail && g.perm.Hyperlink ){ | |
| 163 | + if( verboseFlag && g.perm.Hyperlink ){ | |
| 156 | 164 | int i; |
| 157 | 165 | const char *zClr = 0; |
| 158 | 166 | Blob comment; |
| 159 | 167 | |
| 160 | 168 | zATime = db_text(0, "SELECT datetime(%.17g)", pEvent->rDate); |
| 161 | 169 |
| --- src/event.c | |
| +++ src/event.c | |
| @@ -43,29 +43,30 @@ | |
| 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){ |
| 54 | int rid = 0; /* rid of the event artifact */ |
| 55 | char *zUuid; /* UUID corresponding to rid */ |
| 56 | const char *zEventId; /* Event identifier */ |
| 57 | char *zETime; /* Time of the event */ |
| 58 | char *zATime; /* Time the artifact was created */ |
| 59 | int specRid; /* rid specified by aid= parameter */ |
| 60 | int prevRid, nextRid; /* Previous or next edits of this event */ |
| 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 +102,18 @@ | |
| 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 +132,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,29 +43,30 @@ | |
| 43 | ** WEBPAGE: event |
| 44 | ** URL: /event |
| 45 | ** PARAMETERS: |
| 46 | ** |
| 47 | ** name=EVENTID // Identify the event to display EVENTID must be complete |
| 48 | ** aid=ARTIFACTID // Which specific version of the event. Optional. |
| 49 | ** v=BOOLEAN // Show details if TRUE. Default is FALSE. Optional. |
| 50 | ** |
| 51 | ** Display an existing event identified by EVENTID |
| 52 | */ |
| 53 | void event_page(void){ |
| 54 | int rid = 0; /* rid of the event artifact */ |
| 55 | char *zUuid; /* UUID corresponding to rid */ |
| 56 | const char *zEventId; /* Event identifier */ |
| 57 | const char *zVerbose; /* Value of verbose option */ |
| 58 | char *zETime; /* Time of the event */ |
| 59 | char *zATime; /* Time the artifact was created */ |
| 60 | int specRid; /* rid specified by aid= parameter */ |
| 61 | int prevRid, nextRid; /* Previous or next edits of this event */ |
| 62 | Manifest *pEvent; /* Parsed event artifact */ |
| 63 | Blob fullbody; /* Complete content of the event body */ |
| 64 | Blob title; /* Title extracted from the event body */ |
| 65 | Blob tail; /* Event body that comes after the title */ |
| 66 | Stmt q1; /* Query to search for the event */ |
| 67 | int verboseFlag; /* True to show details */ |
| 68 | |
| 69 | |
| 70 | /* wiki-read privilege is needed in order to read events. |
| 71 | */ |
| 72 | login_check_credentials(); |
| @@ -101,11 +102,18 @@ | |
| 102 | @ Cannot locate specified event |
| 103 | style_footer(); |
| 104 | return; |
| 105 | } |
| 106 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 107 | zVerbose = P("v"); |
| 108 | if( !zVerbose ){ |
| 109 | zVerbose = P("verbose"); |
| 110 | } |
| 111 | if( !zVerbose ){ |
| 112 | zVerbose = P("detail"); /* deprecated */ |
| 113 | } |
| 114 | verboseFlag = (zVerbose!=0) && (*zVerbose!=0) && !is_false(zVerbose); |
| 115 | |
| 116 | /* Extract the event content. |
| 117 | */ |
| 118 | pEvent = manifest_get(rid, CFTYPE_EVENT); |
| 119 | if( pEvent==0 ){ |
| @@ -124,37 +132,37 @@ | |
| 132 | } |
| 133 | zETime = db_text(0, "SELECT datetime(%.17g)", pEvent->rEventDate); |
| 134 | style_submenu_element("Context", "Context", "%s/timeline?c=%T", |
| 135 | g.zTop, zETime); |
| 136 | if( g.perm.Hyperlink ){ |
| 137 | if( verboseFlag ){ |
| 138 | style_submenu_element("Plain", "Plain", "%s/event?name=%s&aid=%s", |
| 139 | g.zTop, zEventId, zUuid); |
| 140 | if( nextRid ){ |
| 141 | char *zNext; |
| 142 | zNext = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nextRid); |
| 143 | style_submenu_element("Next", "Next", |
| 144 | "%s/event?name=%s&aid=%s&v=1", |
| 145 | g.zTop, zEventId, zNext); |
| 146 | free(zNext); |
| 147 | } |
| 148 | if( prevRid ){ |
| 149 | char *zPrev; |
| 150 | zPrev = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", prevRid); |
| 151 | style_submenu_element("Prev", "Prev", |
| 152 | "%s/event?name=%s&aid=%s&v=1", |
| 153 | g.zTop, zEventId, zPrev); |
| 154 | free(zPrev); |
| 155 | } |
| 156 | }else{ |
| 157 | style_submenu_element("Detail", "Detail", |
| 158 | "%s/event?name=%s&aid=%s&v=1", |
| 159 | g.zTop, zEventId, zUuid); |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | if( verboseFlag && g.perm.Hyperlink ){ |
| 164 | int i; |
| 165 | const char *zClr = 0; |
| 166 | Blob comment; |
| 167 | |
| 168 | zATime = db_text(0, "SELECT datetime(%.17g)", pEvent->rDate); |
| 169 |
+33
-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,27 +878,28 @@ | ||
| 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; |
| 894 | 897 | const char *zFrom; |
| 895 | 898 | const char *zTo; |
| 896 | 899 | const char *zRe; |
| 900 | + const char *zVerbose; | |
| 897 | 901 | ReCompiled *pRe = 0; |
| 898 | 902 | |
| 899 | 903 | login_check_credentials(); |
| 900 | 904 | if( !g.perm.Read ){ login_needed(); return; } |
| 901 | 905 | login_anonymous_available(); |
| @@ -910,26 +914,33 @@ | ||
| 910 | 914 | pTo = vdiff_parse_manifest("to", &ridTo); |
| 911 | 915 | if( pTo==0 ) return; |
| 912 | 916 | pFrom = vdiff_parse_manifest("from", &ridFrom); |
| 913 | 917 | if( pFrom==0 ) return; |
| 914 | 918 | sideBySide = atoi(PD("sbs","1")); |
| 915 | - showDetail = atoi(PD("detail","0")); | |
| 916 | - if( !showDetail && sideBySide ) showDetail = 1; | |
| 919 | + zVerbose = P("v"); | |
| 920 | + if( !zVerbose ){ | |
| 921 | + zVerbose = P("verbose"); | |
| 922 | + } | |
| 923 | + if( !zVerbose ){ | |
| 924 | + zVerbose = P("detail"); /* deprecated */ | |
| 925 | + } | |
| 926 | + verboseFlag = (zVerbose!=0) && (*zVerbose!=0) && !is_false(zVerbose); | |
| 927 | + if( !verboseFlag && sideBySide ) verboseFlag = 1; | |
| 917 | 928 | zFrom = P("from"); |
| 918 | 929 | zTo = P("to"); |
| 919 | 930 | if( !sideBySide ){ |
| 920 | 931 | style_submenu_element("Side-by-side Diff", "sbsdiff", |
| 921 | - "%R/vdiff?from=%T&to=%T&detail=%d&sbs=1", | |
| 922 | - zFrom, zTo, showDetail); | |
| 932 | + "%R/vdiff?from=%T&to=%T%s&sbs=1", | |
| 933 | + zFrom, zTo, verboseFlag?"&v=1":""); | |
| 923 | 934 | }else{ |
| 924 | 935 | style_submenu_element("Unified Diff", "udiff", |
| 925 | - "%R/vdiff?from=%T&to=%T&detail=%d&sbs=0", | |
| 926 | - zFrom, zTo, showDetail); | |
| 936 | + "%R/vdiff?from=%T&to=%T%s&sbs=0", | |
| 937 | + zFrom, zTo, verboseFlag?"&v=1":""); | |
| 927 | 938 | } |
| 928 | 939 | style_submenu_element("Invert", "invert", |
| 929 | - "%R/vdiff?from=%T&to=%T&detail=%d&sbs=%d", | |
| 930 | - zTo, zFrom, showDetail, sideBySide); | |
| 940 | + "%R/vdiff?from=%T&to=%T%s&sbs=%d", | |
| 941 | + zTo, zFrom, verboseFlag?"&v=1":"", sideBySide); | |
| 931 | 942 | style_header("Check-in Differences"); |
| 932 | 943 | @ <h2>Difference From:</h2><blockquote> |
| 933 | 944 | checkin_description(ridFrom); |
| 934 | 945 | @ </blockquote><h2>To:</h2><blockquote> |
| 935 | 946 | checkin_description(ridTo); |
| @@ -942,11 +953,11 @@ | ||
| 942 | 953 | |
| 943 | 954 | manifest_file_rewind(pFrom); |
| 944 | 955 | pFileFrom = manifest_file_next(pFrom, 0); |
| 945 | 956 | manifest_file_rewind(pTo); |
| 946 | 957 | pFileTo = manifest_file_next(pTo, 0); |
| 947 | - diffFlags = construct_diff_flags(showDetail, sideBySide); | |
| 958 | + diffFlags = construct_diff_flags(verboseFlag, sideBySide); | |
| 948 | 959 | while( pFileFrom || pFileTo ){ |
| 949 | 960 | int cmp; |
| 950 | 961 | if( pFileFrom==0 ){ |
| 951 | 962 | cmp = +1; |
| 952 | 963 | }else if( pFileTo==0 ){ |
| 953 | 964 |
| --- 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,27 +878,28 @@ | |
| 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; |
| 894 | const char *zFrom; |
| 895 | const char *zTo; |
| 896 | const char *zRe; |
| 897 | ReCompiled *pRe = 0; |
| 898 | |
| 899 | login_check_credentials(); |
| 900 | if( !g.perm.Read ){ login_needed(); return; } |
| 901 | login_anonymous_available(); |
| @@ -910,26 +914,33 @@ | |
| 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 +953,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,27 +878,28 @@ | |
| 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; |
| 897 | const char *zFrom; |
| 898 | const char *zTo; |
| 899 | const char *zRe; |
| 900 | const char *zVerbose; |
| 901 | ReCompiled *pRe = 0; |
| 902 | |
| 903 | login_check_credentials(); |
| 904 | if( !g.perm.Read ){ login_needed(); return; } |
| 905 | login_anonymous_available(); |
| @@ -910,26 +914,33 @@ | |
| 914 | pTo = vdiff_parse_manifest("to", &ridTo); |
| 915 | if( pTo==0 ) return; |
| 916 | pFrom = vdiff_parse_manifest("from", &ridFrom); |
| 917 | if( pFrom==0 ) return; |
| 918 | sideBySide = atoi(PD("sbs","1")); |
| 919 | zVerbose = P("v"); |
| 920 | if( !zVerbose ){ |
| 921 | zVerbose = P("verbose"); |
| 922 | } |
| 923 | if( !zVerbose ){ |
| 924 | zVerbose = P("detail"); /* deprecated */ |
| 925 | } |
| 926 | verboseFlag = (zVerbose!=0) && (*zVerbose!=0) && !is_false(zVerbose); |
| 927 | if( !verboseFlag && sideBySide ) verboseFlag = 1; |
| 928 | zFrom = P("from"); |
| 929 | zTo = P("to"); |
| 930 | if( !sideBySide ){ |
| 931 | style_submenu_element("Side-by-side Diff", "sbsdiff", |
| 932 | "%R/vdiff?from=%T&to=%T%s&sbs=1", |
| 933 | zFrom, zTo, verboseFlag?"&v=1":""); |
| 934 | }else{ |
| 935 | style_submenu_element("Unified Diff", "udiff", |
| 936 | "%R/vdiff?from=%T&to=%T%s&sbs=0", |
| 937 | zFrom, zTo, verboseFlag?"&v=1":""); |
| 938 | } |
| 939 | style_submenu_element("Invert", "invert", |
| 940 | "%R/vdiff?from=%T&to=%T%s&sbs=%d", |
| 941 | zTo, zFrom, verboseFlag?"&v=1":"", sideBySide); |
| 942 | style_header("Check-in Differences"); |
| 943 | @ <h2>Difference From:</h2><blockquote> |
| 944 | checkin_description(ridFrom); |
| 945 | @ </blockquote><h2>To:</h2><blockquote> |
| 946 | checkin_description(ridTo); |
| @@ -942,11 +953,11 @@ | |
| 953 | |
| 954 | manifest_file_rewind(pFrom); |
| 955 | pFileFrom = manifest_file_next(pFrom, 0); |
| 956 | manifest_file_rewind(pTo); |
| 957 | pFileTo = manifest_file_next(pTo, 0); |
| 958 | diffFlags = construct_diff_flags(verboseFlag, sideBySide); |
| 959 | while( pFileFrom || pFileTo ){ |
| 960 | int cmp; |
| 961 | if( pFileFrom==0 ){ |
| 962 | cmp = +1; |
| 963 | }else if( pFileTo==0 ){ |
| 964 |
+1
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -811,11 +811,11 @@ | ||
| 811 | 811 | char const * zCmdOrPagePlural; |
| 812 | 812 | if( g.argc<3 ){ |
| 813 | 813 | z = g.argv[0]; |
| 814 | 814 | fossil_print( |
| 815 | 815 | "Usage: %s help COMMAND\n" |
| 816 | - "Common COMMANDs: (use \"%s help --all\" for a complete list)\n", | |
| 816 | + "Common COMMANDs: (use \"%s help -a|--all\" for a complete list)\n", | |
| 817 | 817 | z, z); |
| 818 | 818 | command_list(0, CMDFLAG_1ST_TIER); |
| 819 | 819 | version_cmd(); |
| 820 | 820 | return; |
| 821 | 821 | } |
| 822 | 822 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -811,11 +811,11 @@ | |
| 811 | char const * zCmdOrPagePlural; |
| 812 | if( g.argc<3 ){ |
| 813 | z = g.argv[0]; |
| 814 | fossil_print( |
| 815 | "Usage: %s help COMMAND\n" |
| 816 | "Common COMMANDs: (use \"%s help --all\" for a complete list)\n", |
| 817 | z, z); |
| 818 | command_list(0, CMDFLAG_1ST_TIER); |
| 819 | version_cmd(); |
| 820 | return; |
| 821 | } |
| 822 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -811,11 +811,11 @@ | |
| 811 | char const * zCmdOrPagePlural; |
| 812 | if( g.argc<3 ){ |
| 813 | z = g.argv[0]; |
| 814 | fossil_print( |
| 815 | "Usage: %s help COMMAND\n" |
| 816 | "Common COMMANDs: (use \"%s help -a|--all\" for a complete list)\n", |
| 817 | z, z); |
| 818 | command_list(0, CMDFLAG_1ST_TIER); |
| 819 | version_cmd(); |
| 820 | return; |
| 821 | } |
| 822 |
+9
-6
| --- 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 | |
| 95 | -** | |
| 96 | 94 | ** -f|--force Force the merge even if it would be a no-op. |
| 97 | 95 | ** |
| 98 | 96 | ** -n|--dry-run If given, display instead of run actions |
| 97 | +** | |
| 98 | +** -v|--verbose Show additional details of the merge | |
| 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 -v|--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; /* deprecated */ | |
| 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 | ** -f|--force Force the merge even if it would be a no-op. |
| 95 | ** |
| 96 | ** -n|--dry-run If given, display instead of run actions |
| 97 | ** |
| 98 | ** -v|--verbose Show additional details of the merge |
| 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 -v|--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; /* deprecated */ |
| 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 |
+3
-3
| --- src/name.c | ||
| +++ src/name.c | ||
| @@ -442,13 +442,13 @@ | ||
| 442 | 442 | ** plays. |
| 443 | 443 | */ |
| 444 | 444 | void whatis_cmd(void){ |
| 445 | 445 | int rid; |
| 446 | 446 | const char *zName; |
| 447 | - int fExtra; | |
| 447 | + int verboseFlag; | |
| 448 | 448 | db_find_and_open_repository(0,0); |
| 449 | - fExtra = find_option("verbose","v",0)!=0; | |
| 449 | + verboseFlag = find_option("verbose","v",0)!=0; | |
| 450 | 450 | if( g.argc!=3 ) usage("whatis NAME"); |
| 451 | 451 | zName = g.argv[2]; |
| 452 | 452 | rid = symbolic_name_to_rid(zName, 0); |
| 453 | 453 | if( rid<0 ){ |
| 454 | 454 | fossil_print("Ambiguous artifact name prefix: %s\n", zName); |
| @@ -465,11 +465,11 @@ | ||
| 465 | 465 | " WHERE rid=%d" |
| 466 | 466 | " AND rcvfrom.rcvid=blob.rcvid", |
| 467 | 467 | rid); |
| 468 | 468 | if( db_step(&q)==SQLITE_ROW ){ |
| 469 | 469 | const char *zTagList = db_column_text(&q, 4); |
| 470 | - if( fExtra ){ | |
| 470 | + if( verboseFlag ){ | |
| 471 | 471 | fossil_print("artifact: %s (%d)\n", db_column_text(&q,0), rid); |
| 472 | 472 | fossil_print("size: %d bytes\n", db_column_int(&q,1)); |
| 473 | 473 | fossil_print("received: %s from %s\n", |
| 474 | 474 | db_column_text(&q, 2), |
| 475 | 475 | db_column_text(&q, 3)); |
| 476 | 476 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -442,13 +442,13 @@ | |
| 442 | ** plays. |
| 443 | */ |
| 444 | void whatis_cmd(void){ |
| 445 | int rid; |
| 446 | const char *zName; |
| 447 | int fExtra; |
| 448 | db_find_and_open_repository(0,0); |
| 449 | fExtra = find_option("verbose","v",0)!=0; |
| 450 | if( g.argc!=3 ) usage("whatis NAME"); |
| 451 | zName = g.argv[2]; |
| 452 | rid = symbolic_name_to_rid(zName, 0); |
| 453 | if( rid<0 ){ |
| 454 | fossil_print("Ambiguous artifact name prefix: %s\n", zName); |
| @@ -465,11 +465,11 @@ | |
| 465 | " WHERE rid=%d" |
| 466 | " AND rcvfrom.rcvid=blob.rcvid", |
| 467 | rid); |
| 468 | if( db_step(&q)==SQLITE_ROW ){ |
| 469 | const char *zTagList = db_column_text(&q, 4); |
| 470 | if( fExtra ){ |
| 471 | fossil_print("artifact: %s (%d)\n", db_column_text(&q,0), rid); |
| 472 | fossil_print("size: %d bytes\n", db_column_int(&q,1)); |
| 473 | fossil_print("received: %s from %s\n", |
| 474 | db_column_text(&q, 2), |
| 475 | db_column_text(&q, 3)); |
| 476 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -442,13 +442,13 @@ | |
| 442 | ** plays. |
| 443 | */ |
| 444 | void whatis_cmd(void){ |
| 445 | int rid; |
| 446 | const char *zName; |
| 447 | int verboseFlag; |
| 448 | db_find_and_open_repository(0,0); |
| 449 | verboseFlag = find_option("verbose","v",0)!=0; |
| 450 | if( g.argc!=3 ) usage("whatis NAME"); |
| 451 | zName = g.argv[2]; |
| 452 | rid = symbolic_name_to_rid(zName, 0); |
| 453 | if( rid<0 ){ |
| 454 | fossil_print("Ambiguous artifact name prefix: %s\n", zName); |
| @@ -465,11 +465,11 @@ | |
| 465 | " WHERE rid=%d" |
| 466 | " AND rcvfrom.rcvid=blob.rcvid", |
| 467 | rid); |
| 468 | if( db_step(&q)==SQLITE_ROW ){ |
| 469 | const char *zTagList = db_column_text(&q, 4); |
| 470 | if( verboseFlag ){ |
| 471 | fossil_print("artifact: %s (%d)\n", db_column_text(&q,0), rid); |
| 472 | fossil_print("size: %d bytes\n", db_column_int(&q,1)); |
| 473 | fossil_print("received: %s from %s\n", |
| 474 | db_column_text(&q, 2), |
| 475 | db_column_text(&q, 3)); |
| 476 |
+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 -v or --verbose 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; /* deprecated */ | |
| 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 -v or --verbose 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; /* deprecated */ |
| 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 |
+13
-10
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -995,11 +995,11 @@ | ||
| 995 | 995 | ** u=USER only if belonging to this user |
| 996 | 996 | ** y=TYPE 'ci', 'w', 't', 'e' |
| 997 | 997 | ** s=TEXT string search (comment and brief) |
| 998 | 998 | ** ng Suppress the graph if present |
| 999 | 999 | ** nd Suppress "divider" lines |
| 1000 | -** fc Show details of files changed | |
| 1000 | +** v Show details of files changed | |
| 1001 | 1001 | ** f=UUID Show family (immediate parents and children) of UUID |
| 1002 | 1002 | ** from=UUID Path from... |
| 1003 | 1003 | ** to=UUID ... to this |
| 1004 | 1004 | ** nomerge ... avoid merge links on the path |
| 1005 | 1005 | ** uf=FUUID Show only checkins that use given file version |
| @@ -1110,13 +1110,13 @@ | ||
| 1110 | 1110 | timeline_temp_table(); |
| 1111 | 1111 | blob_zero(&sql); |
| 1112 | 1112 | blob_zero(&desc); |
| 1113 | 1113 | blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1); |
| 1114 | 1114 | blob_append(&sql, timeline_query_for_www(), -1); |
| 1115 | - if( P("fc")!=0 || P("detail")!=0 ){ | |
| 1115 | + if( P("fc")!=0 || P("v")!=0 || P("detail")!=0 ){ | |
| 1116 | 1116 | tmFlags |= TIMELINE_FCHANGES; |
| 1117 | - url_add_parameter(&url, "fc", 0); | |
| 1117 | + url_add_parameter(&url, "v", 0); | |
| 1118 | 1118 | } |
| 1119 | 1119 | if( !useDividers ) url_add_parameter(&url, "nd", 0); |
| 1120 | 1120 | if( ((from_rid && to_rid) || (me_rid && you_rid)) && g.perm.Read ){ |
| 1121 | 1121 | /* If from= and to= are present, display all nodes on a path connecting |
| 1122 | 1122 | ** the two */ |
| @@ -1421,13 +1421,13 @@ | ||
| 1421 | 1421 | if( nEntry<200 ){ |
| 1422 | 1422 | timeline_submenu(&url, "200 Entries", "n", "200", 0); |
| 1423 | 1423 | } |
| 1424 | 1424 | if( zType[0]=='a' || zType[0]=='c' ){ |
| 1425 | 1425 | if( tmFlags & TIMELINE_FCHANGES ){ |
| 1426 | - timeline_submenu(&url, "Hide Files", "fc", 0, 0); | |
| 1426 | + timeline_submenu(&url, "Hide Files", "v", 0, 0); | |
| 1427 | 1427 | }else{ |
| 1428 | - timeline_submenu(&url, "Show Files", "fc", "", 0); | |
| 1428 | + timeline_submenu(&url, "Show Files", "v", "", 0); | |
| 1429 | 1429 | } |
| 1430 | 1430 | } |
| 1431 | 1431 | } |
| 1432 | 1432 | } |
| 1433 | 1433 | if( P("showsql") ){ |
| @@ -1756,31 +1756,34 @@ | ||
| 1756 | 1756 | |
| 1757 | 1757 | |
| 1758 | 1758 | /* |
| 1759 | 1759 | ** COMMAND: test-timewarp-list |
| 1760 | 1760 | ** |
| 1761 | -** Usage: %fossil test-timewarp-list ?--detail? | |
| 1761 | +** Usage: %fossil test-timewarp-list ?-v|---verbose? | |
| 1762 | 1762 | ** |
| 1763 | 1763 | ** Display all instances of child checkins that appear earlier in time |
| 1764 | -** than their parent. If the --detail option is provided, both the | |
| 1764 | +** than their parent. If the -v|--verbose option is provided, both the | |
| 1765 | 1765 | ** parent and child checking and their times are shown. |
| 1766 | 1766 | */ |
| 1767 | 1767 | void test_timewarp_cmd(void){ |
| 1768 | 1768 | Stmt q; |
| 1769 | - int showDetail; | |
| 1769 | + int verboseFlag; | |
| 1770 | 1770 | |
| 1771 | 1771 | db_find_and_open_repository(0, 0); |
| 1772 | - showDetail = find_option("detail", 0, 0)!=0; | |
| 1772 | + verboseFlag = find_option("verbose", "v", 0)!=0; | |
| 1773 | + if( !verboseFlag ){ | |
| 1774 | + verboseFlag = find_option("detail", 0, 0)!=0; /* deprecated */ | |
| 1775 | + } | |
| 1773 | 1776 | db_prepare(&q, |
| 1774 | 1777 | "SELECT (SELECT uuid FROM blob WHERE rid=p.cid)," |
| 1775 | 1778 | " (SELECT uuid FROM blob WHERE rid=c.cid)," |
| 1776 | 1779 | " datetime(p.mtime), datetime(c.mtime)" |
| 1777 | 1780 | " FROM plink p, plink c" |
| 1778 | 1781 | " WHERE p.cid=c.pid AND p.mtime>c.mtime" |
| 1779 | 1782 | ); |
| 1780 | 1783 | while( db_step(&q)==SQLITE_ROW ){ |
| 1781 | - if( !showDetail ){ | |
| 1784 | + if( !verboseFlag ){ | |
| 1782 | 1785 | fossil_print("%s\n", db_column_text(&q, 1)); |
| 1783 | 1786 | }else{ |
| 1784 | 1787 | fossil_print("%.14s -> %.14s %s -> %s\n", |
| 1785 | 1788 | db_column_text(&q, 0), |
| 1786 | 1789 | db_column_text(&q, 1), |
| 1787 | 1790 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -995,11 +995,11 @@ | |
| 995 | ** u=USER only if belonging to this user |
| 996 | ** y=TYPE 'ci', 'w', 't', 'e' |
| 997 | ** s=TEXT string search (comment and brief) |
| 998 | ** ng Suppress the graph if present |
| 999 | ** nd Suppress "divider" lines |
| 1000 | ** fc Show details of files changed |
| 1001 | ** f=UUID Show family (immediate parents and children) of UUID |
| 1002 | ** from=UUID Path from... |
| 1003 | ** to=UUID ... to this |
| 1004 | ** nomerge ... avoid merge links on the path |
| 1005 | ** uf=FUUID Show only checkins that use given file version |
| @@ -1110,13 +1110,13 @@ | |
| 1110 | timeline_temp_table(); |
| 1111 | blob_zero(&sql); |
| 1112 | blob_zero(&desc); |
| 1113 | blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1); |
| 1114 | blob_append(&sql, timeline_query_for_www(), -1); |
| 1115 | if( P("fc")!=0 || P("detail")!=0 ){ |
| 1116 | tmFlags |= TIMELINE_FCHANGES; |
| 1117 | url_add_parameter(&url, "fc", 0); |
| 1118 | } |
| 1119 | if( !useDividers ) url_add_parameter(&url, "nd", 0); |
| 1120 | if( ((from_rid && to_rid) || (me_rid && you_rid)) && g.perm.Read ){ |
| 1121 | /* If from= and to= are present, display all nodes on a path connecting |
| 1122 | ** the two */ |
| @@ -1421,13 +1421,13 @@ | |
| 1421 | if( nEntry<200 ){ |
| 1422 | timeline_submenu(&url, "200 Entries", "n", "200", 0); |
| 1423 | } |
| 1424 | if( zType[0]=='a' || zType[0]=='c' ){ |
| 1425 | if( tmFlags & TIMELINE_FCHANGES ){ |
| 1426 | timeline_submenu(&url, "Hide Files", "fc", 0, 0); |
| 1427 | }else{ |
| 1428 | timeline_submenu(&url, "Show Files", "fc", "", 0); |
| 1429 | } |
| 1430 | } |
| 1431 | } |
| 1432 | } |
| 1433 | if( P("showsql") ){ |
| @@ -1756,31 +1756,34 @@ | |
| 1756 | |
| 1757 | |
| 1758 | /* |
| 1759 | ** COMMAND: test-timewarp-list |
| 1760 | ** |
| 1761 | ** Usage: %fossil test-timewarp-list ?--detail? |
| 1762 | ** |
| 1763 | ** Display all instances of child checkins that appear earlier in time |
| 1764 | ** than their parent. If the --detail option is provided, both the |
| 1765 | ** parent and child checking and their times are shown. |
| 1766 | */ |
| 1767 | void test_timewarp_cmd(void){ |
| 1768 | Stmt q; |
| 1769 | int showDetail; |
| 1770 | |
| 1771 | db_find_and_open_repository(0, 0); |
| 1772 | showDetail = find_option("detail", 0, 0)!=0; |
| 1773 | db_prepare(&q, |
| 1774 | "SELECT (SELECT uuid FROM blob WHERE rid=p.cid)," |
| 1775 | " (SELECT uuid FROM blob WHERE rid=c.cid)," |
| 1776 | " datetime(p.mtime), datetime(c.mtime)" |
| 1777 | " FROM plink p, plink c" |
| 1778 | " WHERE p.cid=c.pid AND p.mtime>c.mtime" |
| 1779 | ); |
| 1780 | while( db_step(&q)==SQLITE_ROW ){ |
| 1781 | if( !showDetail ){ |
| 1782 | fossil_print("%s\n", db_column_text(&q, 1)); |
| 1783 | }else{ |
| 1784 | fossil_print("%.14s -> %.14s %s -> %s\n", |
| 1785 | db_column_text(&q, 0), |
| 1786 | db_column_text(&q, 1), |
| 1787 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -995,11 +995,11 @@ | |
| 995 | ** u=USER only if belonging to this user |
| 996 | ** y=TYPE 'ci', 'w', 't', 'e' |
| 997 | ** s=TEXT string search (comment and brief) |
| 998 | ** ng Suppress the graph if present |
| 999 | ** nd Suppress "divider" lines |
| 1000 | ** v Show details of files changed |
| 1001 | ** f=UUID Show family (immediate parents and children) of UUID |
| 1002 | ** from=UUID Path from... |
| 1003 | ** to=UUID ... to this |
| 1004 | ** nomerge ... avoid merge links on the path |
| 1005 | ** uf=FUUID Show only checkins that use given file version |
| @@ -1110,13 +1110,13 @@ | |
| 1110 | timeline_temp_table(); |
| 1111 | blob_zero(&sql); |
| 1112 | blob_zero(&desc); |
| 1113 | blob_append(&sql, "INSERT OR IGNORE INTO timeline ", -1); |
| 1114 | blob_append(&sql, timeline_query_for_www(), -1); |
| 1115 | if( P("fc")!=0 || P("v")!=0 || P("detail")!=0 ){ |
| 1116 | tmFlags |= TIMELINE_FCHANGES; |
| 1117 | url_add_parameter(&url, "v", 0); |
| 1118 | } |
| 1119 | if( !useDividers ) url_add_parameter(&url, "nd", 0); |
| 1120 | if( ((from_rid && to_rid) || (me_rid && you_rid)) && g.perm.Read ){ |
| 1121 | /* If from= and to= are present, display all nodes on a path connecting |
| 1122 | ** the two */ |
| @@ -1421,13 +1421,13 @@ | |
| 1421 | if( nEntry<200 ){ |
| 1422 | timeline_submenu(&url, "200 Entries", "n", "200", 0); |
| 1423 | } |
| 1424 | if( zType[0]=='a' || zType[0]=='c' ){ |
| 1425 | if( tmFlags & TIMELINE_FCHANGES ){ |
| 1426 | timeline_submenu(&url, "Hide Files", "v", 0, 0); |
| 1427 | }else{ |
| 1428 | timeline_submenu(&url, "Show Files", "v", "", 0); |
| 1429 | } |
| 1430 | } |
| 1431 | } |
| 1432 | } |
| 1433 | if( P("showsql") ){ |
| @@ -1756,31 +1756,34 @@ | |
| 1756 | |
| 1757 | |
| 1758 | /* |
| 1759 | ** COMMAND: test-timewarp-list |
| 1760 | ** |
| 1761 | ** Usage: %fossil test-timewarp-list ?-v|---verbose? |
| 1762 | ** |
| 1763 | ** Display all instances of child checkins that appear earlier in time |
| 1764 | ** than their parent. If the -v|--verbose option is provided, both the |
| 1765 | ** parent and child checking and their times are shown. |
| 1766 | */ |
| 1767 | void test_timewarp_cmd(void){ |
| 1768 | Stmt q; |
| 1769 | int verboseFlag; |
| 1770 | |
| 1771 | db_find_and_open_repository(0, 0); |
| 1772 | verboseFlag = find_option("verbose", "v", 0)!=0; |
| 1773 | if( !verboseFlag ){ |
| 1774 | verboseFlag = find_option("detail", 0, 0)!=0; /* deprecated */ |
| 1775 | } |
| 1776 | db_prepare(&q, |
| 1777 | "SELECT (SELECT uuid FROM blob WHERE rid=p.cid)," |
| 1778 | " (SELECT uuid FROM blob WHERE rid=c.cid)," |
| 1779 | " datetime(p.mtime), datetime(c.mtime)" |
| 1780 | " FROM plink p, plink c" |
| 1781 | " WHERE p.cid=c.pid AND p.mtime>c.mtime" |
| 1782 | ); |
| 1783 | while( db_step(&q)==SQLITE_ROW ){ |
| 1784 | if( !verboseFlag ){ |
| 1785 | fossil_print("%s\n", db_column_text(&q, 1)); |
| 1786 | }else{ |
| 1787 | fossil_print("%.14s -> %.14s %s -> %s\n", |
| 1788 | db_column_text(&q, 0), |
| 1789 | db_column_text(&q, 1), |
| 1790 |