Fossil SCM

Prevent error-message for "fossil diff --tk" in combination with -v/--verbose/--interactive/--side-by-side (which are already implied by --tk)

jan.nijtmans 2014-05-19 09:16 trunk
Commit c060947196baef2d37b8cc40718779a2a6a7ef31
1 file changed +8 -13
+8 -13
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -1010,25 +1010,20 @@
10101010
char *zTempFile = 0;
10111011
char *zCmd;
10121012
blob_zero(&script);
10131013
blob_appendf(&script, "set fossilcmd {| \"%/\" %s --html -y -i -v",
10141014
g.nameOfExe, zSubCmd);
1015
+ find_option("html",0,0);
1016
+ find_option("side-by-side","y",0);
1017
+ find_option("internal","i",0);
1018
+ find_option("verbose","v",0);
1019
+ /* The undocumented --script FILENAME option causes the Tk script to
1020
+ ** be written into the FILENAME instead of being run. This is used
1021
+ ** for testing and debugging. */
1022
+ zTempFile = find_option("script",0,1);
10151023
for(i=firstArg; i<g.argc; i++){
10161024
const char *z = g.argv[i];
1017
- if( z[0]=='-' ){
1018
- if( strglob("*-html",z) ) continue;
1019
- if( strglob("*-y",z) ) continue;
1020
- if( strglob("*-i",z) ) continue;
1021
- /* The undocumented --script FILENAME option causes the Tk script to
1022
- ** be written into the FILENAME instead of being run. This is used
1023
- ** for testing and debugging. */
1024
- if( strglob("*-script",z) && i<g.argc-1 ){
1025
- i++;
1026
- zTempFile = g.argv[i];
1027
- continue;
1028
- }
1029
- }
10301025
if( sqlite3_strglob("*}*",z) ){
10311026
blob_appendf(&script, " {%/}", z);
10321027
}else{
10331028
int j;
10341029
blob_append(&script, " ", 1);
10351030
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -1010,25 +1010,20 @@
1010 char *zTempFile = 0;
1011 char *zCmd;
1012 blob_zero(&script);
1013 blob_appendf(&script, "set fossilcmd {| \"%/\" %s --html -y -i -v",
1014 g.nameOfExe, zSubCmd);
 
 
 
 
 
 
 
 
1015 for(i=firstArg; i<g.argc; i++){
1016 const char *z = g.argv[i];
1017 if( z[0]=='-' ){
1018 if( strglob("*-html",z) ) continue;
1019 if( strglob("*-y",z) ) continue;
1020 if( strglob("*-i",z) ) continue;
1021 /* The undocumented --script FILENAME option causes the Tk script to
1022 ** be written into the FILENAME instead of being run. This is used
1023 ** for testing and debugging. */
1024 if( strglob("*-script",z) && i<g.argc-1 ){
1025 i++;
1026 zTempFile = g.argv[i];
1027 continue;
1028 }
1029 }
1030 if( sqlite3_strglob("*}*",z) ){
1031 blob_appendf(&script, " {%/}", z);
1032 }else{
1033 int j;
1034 blob_append(&script, " ", 1);
1035
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -1010,25 +1010,20 @@
1010 char *zTempFile = 0;
1011 char *zCmd;
1012 blob_zero(&script);
1013 blob_appendf(&script, "set fossilcmd {| \"%/\" %s --html -y -i -v",
1014 g.nameOfExe, zSubCmd);
1015 find_option("html",0,0);
1016 find_option("side-by-side","y",0);
1017 find_option("internal","i",0);
1018 find_option("verbose","v",0);
1019 /* The undocumented --script FILENAME option causes the Tk script to
1020 ** be written into the FILENAME instead of being run. This is used
1021 ** for testing and debugging. */
1022 zTempFile = find_option("script",0,1);
1023 for(i=firstArg; i<g.argc; i++){
1024 const char *z = g.argv[i];
 
 
 
 
 
 
 
 
 
 
 
 
 
1025 if( sqlite3_strglob("*}*",z) ){
1026 blob_appendf(&script, " {%/}", z);
1027 }else{
1028 int j;
1029 blob_append(&script, " ", 1);
1030

Keyboard Shortcuts

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