Fossil SCM

One more: --new-file makes the diff command much more verbose. Fix /event?v=

jan.nijtmans 2013-04-26 09:29 UTC verbose
Commit 0a5abbee920b75202c3866f38ef5f894eac3bd98
2 files changed +7 -4 +1 -1
+7 -4
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -743,21 +743,21 @@
743743
** --brief Show filenames only
744744
** --context|-c N Use N lines of context
745745
** --diff-binary BOOL Include binary files when using external commands
746746
** --from|-r VERSION select VERSION as source for the diff
747747
** --internal|-i use internal diff logic
748
-** --new-file|-N output complete text of added or deleted files
748
+** --verbose|-v output complete text of added or deleted files
749749
** --side-by-side|-y side-by-side diff
750750
** --tk Launch a Tcl/Tk GUI for display
751751
** --to VERSION select VERSION as target for the diff
752752
** --unified unified diff
753753
** --width|-W N Width of lines in side-by-side diff
754754
*/
755755
void diff_cmd(void){
756756
int isGDiff; /* True for gdiff. False for normal diff */
757757
int isInternDiff; /* True for internal diff */
758
- int hasNFlag; /* True if -N or --new-file flag is used */
758
+ int verboseFlag; /* True if -v or --verbose flag is used */
759759
const char *zFrom; /* Source version number */
760760
const char *zTo; /* Target version number */
761761
const char *zBranch; /* Branch to diff */
762762
const char *zDiffCmd = 0; /* External diff command. NULL for internal diff */
763763
const char *zBinGlob = 0; /* Treat file names matching this as binary */
@@ -773,12 +773,15 @@
773773
isInternDiff = find_option("internal","i",0)!=0;
774774
zFrom = find_option("from", "r", 1);
775775
zTo = find_option("to", 0, 1);
776776
zBranch = find_option("branch", 0, 1);
777777
diffFlags = diff_options();
778
- hasNFlag = find_option("new-file","N",0)!=0;
779
- if( hasNFlag ) diffFlags |= DIFF_NEWFILE;
778
+ verboseFlag = find_option("verbose","v",0)!=0;
779
+ if( !verboseFlag ){
780
+ verboseFlag = find_option("new-file","N",0)!=0;
781
+ }
782
+ if( verboseFlag ) diffFlags |= DIFF_NEWFILE;
780783
781784
if( zBranch ){
782785
if( zTo || zFrom ){
783786
fossil_fatal("cannot use --from or --to with --branch");
784787
}
785788
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -743,21 +743,21 @@
743 ** --brief Show filenames only
744 ** --context|-c N Use N lines of context
745 ** --diff-binary BOOL Include binary files when using external commands
746 ** --from|-r VERSION select VERSION as source for the diff
747 ** --internal|-i use internal diff logic
748 ** --new-file|-N output complete text of added or deleted files
749 ** --side-by-side|-y side-by-side diff
750 ** --tk Launch a Tcl/Tk GUI for display
751 ** --to VERSION select VERSION as target for the diff
752 ** --unified unified diff
753 ** --width|-W N Width of lines in side-by-side diff
754 */
755 void diff_cmd(void){
756 int isGDiff; /* True for gdiff. False for normal diff */
757 int isInternDiff; /* True for internal diff */
758 int hasNFlag; /* True if -N or --new-file flag is used */
759 const char *zFrom; /* Source version number */
760 const char *zTo; /* Target version number */
761 const char *zBranch; /* Branch to diff */
762 const char *zDiffCmd = 0; /* External diff command. NULL for internal diff */
763 const char *zBinGlob = 0; /* Treat file names matching this as binary */
@@ -773,12 +773,15 @@
773 isInternDiff = find_option("internal","i",0)!=0;
774 zFrom = find_option("from", "r", 1);
775 zTo = find_option("to", 0, 1);
776 zBranch = find_option("branch", 0, 1);
777 diffFlags = diff_options();
778 hasNFlag = find_option("new-file","N",0)!=0;
779 if( hasNFlag ) diffFlags |= DIFF_NEWFILE;
 
 
 
780
781 if( zBranch ){
782 if( zTo || zFrom ){
783 fossil_fatal("cannot use --from or --to with --branch");
784 }
785
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -743,21 +743,21 @@
743 ** --brief Show filenames only
744 ** --context|-c N Use N lines of context
745 ** --diff-binary BOOL Include binary files when using external commands
746 ** --from|-r VERSION select VERSION as source for the diff
747 ** --internal|-i use internal diff logic
748 ** --verbose|-v output complete text of added or deleted files
749 ** --side-by-side|-y side-by-side diff
750 ** --tk Launch a Tcl/Tk GUI for display
751 ** --to VERSION select VERSION as target for the diff
752 ** --unified unified diff
753 ** --width|-W N Width of lines in side-by-side diff
754 */
755 void diff_cmd(void){
756 int isGDiff; /* True for gdiff. False for normal diff */
757 int isInternDiff; /* True for internal diff */
758 int verboseFlag; /* True if -v or --verbose flag is used */
759 const char *zFrom; /* Source version number */
760 const char *zTo; /* Target version number */
761 const char *zBranch; /* Branch to diff */
762 const char *zDiffCmd = 0; /* External diff command. NULL for internal diff */
763 const char *zBinGlob = 0; /* Treat file names matching this as binary */
@@ -773,12 +773,15 @@
773 isInternDiff = find_option("internal","i",0)!=0;
774 zFrom = find_option("from", "r", 1);
775 zTo = find_option("to", 0, 1);
776 zBranch = find_option("branch", 0, 1);
777 diffFlags = diff_options();
778 verboseFlag = find_option("verbose","v",0)!=0;
779 if( !verboseFlag ){
780 verboseFlag = find_option("new-file","N",0)!=0;
781 }
782 if( verboseFlag ) diffFlags |= DIFF_NEWFILE;
783
784 if( zBranch ){
785 if( zTo || zFrom ){
786 fossil_fatal("cannot use --from or --to with --branch");
787 }
788
+1 -1
--- src/event.c
+++ src/event.c
@@ -101,11 +101,11 @@
101101
@ Cannot locate specified event
102102
style_footer();
103103
return;
104104
}
105105
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
106
- verboseFlag = atoi(PD("verbose","0"));
106
+ verboseFlag = atoi(PD("v","0"));
107107
108108
/* Extract the event content.
109109
*/
110110
pEvent = manifest_get(rid, CFTYPE_EVENT);
111111
if( pEvent==0 ){
112112
--- src/event.c
+++ src/event.c
@@ -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 ){
112
--- src/event.c
+++ src/event.c
@@ -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("v","0"));
107
108 /* Extract the event content.
109 */
110 pEvent = manifest_get(rid, CFTYPE_EVENT);
111 if( pEvent==0 ){
112

Keyboard Shortcuts

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