Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Updates to the /vdiff page with the branch=BRANCH query parameter so that it uses merge-in: instead of root: and thus excludes merge-in check-ins from the diff. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | vdiff-improvements |
| Files: | files | file ages | folders |
| SHA3-256: |
b36dc6f1215d6833be46dd6892b06f88 |
| User & Date: | drh 2019-08-27 02:07:29.588 |
Context
|
2019-08-27
| ||
| 02:08 | Minor wording change in the header of /vdiff. check-in: 69adb45da0 user: drh tags: vdiff-improvements | |
| 02:07 | Updates to the /vdiff page with the branch=BRANCH query parameter so that it uses merge-in: instead of root: and thus excludes merge-in check-ins from the diff. check-in: b36dc6f121 user: drh tags: vdiff-improvements | |
| 01:47 | Add the "merge-in:NAME" name type, similar to "root:NAME" except that it finds the youngest anscestor of NAME that is in the branch from which the branch of NAME derived. check-in: dcd8f1d8f4 user: drh tags: vdiff-improvements | |
Changes
Changes to src/info.c.
| ︙ | ︙ | |||
1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 |
const char *zBranch;
const char *zFrom;
const char *zTo;
const char *zRe;
const char *zW;
const char *zGlob;
char *zQuery;
ReCompiled *pRe = 0;
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
login_anonymous_available();
load_control();
cookie_link_parameter("diff","diff","2");
diffType = atoi(PD("diff","2"));
cookie_render();
zRe = P("regex");
if( zRe ) re_compile(&pRe, zRe, 0);
zBranch = P("branch");
if( zBranch && zBranch[0]==0 ) zBranch = 0;
if( zBranch ){
zQuery = mprintf("branch=%T", zBranch);
| > > | | 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 |
const char *zBranch;
const char *zFrom;
const char *zTo;
const char *zRe;
const char *zW;
const char *zGlob;
char *zQuery;
char *zMergeOrigin = 0;
ReCompiled *pRe = 0;
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
login_anonymous_available();
load_control();
cookie_link_parameter("diff","diff","2");
diffType = atoi(PD("diff","2"));
cookie_render();
zRe = P("regex");
if( zRe ) re_compile(&pRe, zRe, 0);
zBranch = P("branch");
if( zBranch && zBranch[0]==0 ) zBranch = 0;
if( zBranch ){
zQuery = mprintf("branch=%T", zBranch);
zMergeOrigin = mprintf("merge-in:%s", zBranch);
cgi_replace_parameter("from", zMergeOrigin);
cgi_replace_parameter("to", zBranch);
}else{
zQuery = mprintf("from=%T&to=%T",PD("from",""),PD("to",""));
}
pTo = vdiff_parse_manifest("to", &ridTo);
if( pTo==0 ) return;
pFrom = vdiff_parse_manifest("from", &ridFrom);
|
| ︙ | ︙ | |||
1270 1271 1272 1273 1274 1275 1276 |
"%R/vdiff?%s&%s", zQuery, zW);
}else{
style_submenu_element("Patch", "%R/vpatch?from=%T&to=%T%s", zFrom, zTo, zW);
}
if( diffType!=0 ){
style_submenu_checkbox("w", "Ignore Whitespace", 0, 0);
}
| > > > | > > > > > > > > > > > > > > > > > | | | | > | 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 |
"%R/vdiff?%s&%s", zQuery, zW);
}else{
style_submenu_element("Patch", "%R/vpatch?from=%T&to=%T%s", zFrom, zTo, zW);
}
if( diffType!=0 ){
style_submenu_checkbox("w", "Ignore Whitespace", 0, 0);
}
if( zBranch ){
style_header("Changes On Branch %h", zBranch);
}else{
style_header("Check-in Differences");
}
if( P("nohdr")==0 ){
if( zBranch ){
char *zRealBranch = branch_of_rid(ridTo);
char *zToUuid = rid_to_uuid(ridTo);
char *zFromUuid = rid_to_uuid(ridFrom);
@ <h2>Changes In Branch \
@ %z(href("%R/timeline?r=%T",zRealBranch))%h(zRealBranch)</a>
if( strcmp(zRealBranch,zBranch)!=0 ){
@ Through %z(href("%R/info/%!S",zToUuid))[%S(zToUuid)]</a>
}
@ Excluding Merge-Ins</h2>
@ <p>This is equivalent to a difference from
@ <span class='timelineSelected'>\
@ %z(href("%R/info/%!S",zFromUuid))%S(zFromUuid)</a></span>
@ to <span class='timelineSelected timelineSecondary'>\
@ %z(href("%R/info/%!S",zToUuid))%S(zToUuid)</a></span></p>
}else{
@ <h2>Difference From <span class='timelineSelected'>\
@ %z(href("%R/info/%h",zFrom))%h(zFrom)</a></span>
@ To <span class='timelineSelected timelineSecondary'>\
@ %z(href("%R/info/%h",zTo))%h(zTo)</a></span></h2>
}
render_checkin_context(ridFrom, ridTo, 0);
if( pRe ){
@ <p><b>Only differences that match regular expression "%h(zRe)"
@ are shown.</b></p>
}
if( zGlob ){
@ <p><b>Only files matching the glob "%h(zGlob)" are shown.</b></p>
|
| ︙ | ︙ |