Fossil SCM

Change /vdiff page (used when clicking on 2 nodes on /timeline), so it honor the show-version-diffs settings. Just like the /ci page. Also add the "Hide diff" button to hide the diffs manually. The /vdiff page can have a lot of files to diff depending on which version are selected, so the capability to show only list of files that change is very convenient to spot interesting files.

mgagnon 2013-10-19 06:47 UTC trunk
Commit d7dc41586fc0d78576c0194f499f4bb273ee431c
2 files changed +5 +6 -1
+5
--- src/info.c
+++ src/info.c
@@ -965,10 +965,15 @@
965965
}
966966
verboseFlag = (zVerbose!=0) && !is_false(zVerbose);
967967
if( !verboseFlag && sideBySide ) verboseFlag = 1;
968968
zFrom = P("from");
969969
zTo = P("to");
970
+ if( sideBySide || verboseFlag){
971
+ style_submenu_element("Hide Diff", "hidediff",
972
+ "%R/vdiff?from=%T&to=%T&sbs=0",
973
+ zFrom, zTo);
974
+ }
970975
if( !sideBySide ){
971976
style_submenu_element("Side-by-side Diff", "sbsdiff",
972977
"%R/vdiff?from=%T&to=%T&sbs=1",
973978
zFrom, zTo);
974979
}
975980
--- src/info.c
+++ src/info.c
@@ -965,10 +965,15 @@
965 }
966 verboseFlag = (zVerbose!=0) && !is_false(zVerbose);
967 if( !verboseFlag && sideBySide ) verboseFlag = 1;
968 zFrom = P("from");
969 zTo = P("to");
 
 
 
 
 
970 if( !sideBySide ){
971 style_submenu_element("Side-by-side Diff", "sbsdiff",
972 "%R/vdiff?from=%T&to=%T&sbs=1",
973 zFrom, zTo);
974 }
975
--- src/info.c
+++ src/info.c
@@ -965,10 +965,15 @@
965 }
966 verboseFlag = (zVerbose!=0) && !is_false(zVerbose);
967 if( !verboseFlag && sideBySide ) verboseFlag = 1;
968 zFrom = P("from");
969 zTo = P("to");
970 if( sideBySide || verboseFlag){
971 style_submenu_element("Hide Diff", "hidediff",
972 "%R/vdiff?from=%T&to=%T&sbs=0",
973 zFrom, zTo);
974 }
975 if( !sideBySide ){
976 style_submenu_element("Side-by-side Diff", "sbsdiff",
977 "%R/vdiff?from=%T&to=%T&sbs=1",
978 zFrom, zTo);
979 }
980
+6 -1
--- src/timeline.c
+++ src/timeline.c
@@ -589,10 +589,11 @@
589589
){
590590
if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
591591
GraphRow *pRow;
592592
int i;
593593
char cSep;
594
+
594595
@ <script type="text/JavaScript">
595596
@ /* <![CDATA[ */
596597
@ var railPitch=%d(pGraph->iRailPitch);
597598
598599
/* the rowinfo[] array contains all the information needed to generate
@@ -850,11 +851,15 @@
850851
@ selRow = null;
851852
@ }else{
852853
if( fileDiff ){
853854
@ location.href="%R/fdiff?v1="+selRow.h+"&v2="+p.h+"&sbs=1";
854855
}else{
855
- @ location.href="%R/vdiff?from="+selRow.h+"&to="+p.h+"&sbs=1";
856
+ if( db_get_boolean("show-version-diffs", 0) == 0 ){
857
+ @ location.href="%R/vdiff?from="+selRow.h+"&to="+p.h+"&sbs=0";
858
+ }else{
859
+ @ location.href="%R/vdiff?from="+selRow.h+"&to="+p.h+"&sbs=1";
860
+ }
856861
}
857862
@ }
858863
@ }
859864
@ var lastId = "m"+rowinfo[rowinfo.length-1].id;
860865
@ var lastY = 0;
861866
--- src/timeline.c
+++ src/timeline.c
@@ -589,10 +589,11 @@
589 ){
590 if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
591 GraphRow *pRow;
592 int i;
593 char cSep;
 
594 @ <script type="text/JavaScript">
595 @ /* <![CDATA[ */
596 @ var railPitch=%d(pGraph->iRailPitch);
597
598 /* the rowinfo[] array contains all the information needed to generate
@@ -850,11 +851,15 @@
850 @ selRow = null;
851 @ }else{
852 if( fileDiff ){
853 @ location.href="%R/fdiff?v1="+selRow.h+"&v2="+p.h+"&sbs=1";
854 }else{
855 @ location.href="%R/vdiff?from="+selRow.h+"&to="+p.h+"&sbs=1";
 
 
 
 
856 }
857 @ }
858 @ }
859 @ var lastId = "m"+rowinfo[rowinfo.length-1].id;
860 @ var lastY = 0;
861
--- src/timeline.c
+++ src/timeline.c
@@ -589,10 +589,11 @@
589 ){
590 if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
591 GraphRow *pRow;
592 int i;
593 char cSep;
594
595 @ <script type="text/JavaScript">
596 @ /* <![CDATA[ */
597 @ var railPitch=%d(pGraph->iRailPitch);
598
599 /* the rowinfo[] array contains all the information needed to generate
@@ -850,11 +851,15 @@
851 @ selRow = null;
852 @ }else{
853 if( fileDiff ){
854 @ location.href="%R/fdiff?v1="+selRow.h+"&v2="+p.h+"&sbs=1";
855 }else{
856 if( db_get_boolean("show-version-diffs", 0) == 0 ){
857 @ location.href="%R/vdiff?from="+selRow.h+"&to="+p.h+"&sbs=0";
858 }else{
859 @ location.href="%R/vdiff?from="+selRow.h+"&to="+p.h+"&sbs=1";
860 }
861 }
862 @ }
863 @ }
864 @ var lastId = "m"+rowinfo[rowinfo.length-1].id;
865 @ var lastY = 0;
866

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button