Fossil SCM
Some more -v|--verbose additions. Old options names are deprecated, but still work.
Commit
e3f7ba556b9e8ca3df670de77aa84fc801d6bab0
Parent
1162df8e4125f7a…
9 files changed
+1
-1
+1
-1
+11
-8
+11
-8
+6
-3
+2
+2
+10
-7
+10
-7
+1
-1
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -30,11 +30,11 @@ | ||
| 30 | 30 | */ |
| 31 | 31 | #define DIFF_CONTEXT_MASK ((u64)0x0000ffff) /* Lines of context. Default if 0 */ |
| 32 | 32 | #define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */ |
| 33 | 33 | #define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */ |
| 34 | 34 | #define DIFF_SIDEBYSIDE ((u64)0x02000000) /* Generate a side-by-side diff */ |
| 35 | -#define DIFF_NEWFILE ((u64)0x04000000) /* Missing shown as empty files */ | |
| 35 | +#define DIFF_VERBOSE ((u64)0x04000000) /* Missing shown as empty files */ | |
| 36 | 36 | #define DIFF_BRIEF ((u64)0x08000000) /* Show filenames only */ |
| 37 | 37 | #define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */ |
| 38 | 38 | #define DIFF_HTML ((u64)0x10000000) /* Render for HTML */ |
| 39 | 39 | #define DIFF_LINENO ((u64)0x20000000) /* Show line numbers */ |
| 40 | 40 | #define DIFF_WS_WARNING ((u64)0x40000000) /* Warn about whitespace */ |
| 41 | 41 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -30,11 +30,11 @@ | |
| 30 | */ |
| 31 | #define DIFF_CONTEXT_MASK ((u64)0x0000ffff) /* Lines of context. Default if 0 */ |
| 32 | #define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */ |
| 33 | #define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */ |
| 34 | #define DIFF_SIDEBYSIDE ((u64)0x02000000) /* Generate a side-by-side diff */ |
| 35 | #define DIFF_NEWFILE ((u64)0x04000000) /* Missing shown as empty files */ |
| 36 | #define DIFF_BRIEF ((u64)0x08000000) /* Show filenames only */ |
| 37 | #define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */ |
| 38 | #define DIFF_HTML ((u64)0x10000000) /* Render for HTML */ |
| 39 | #define DIFF_LINENO ((u64)0x20000000) /* Show line numbers */ |
| 40 | #define DIFF_WS_WARNING ((u64)0x40000000) /* Warn about whitespace */ |
| 41 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -30,11 +30,11 @@ | |
| 30 | */ |
| 31 | #define DIFF_CONTEXT_MASK ((u64)0x0000ffff) /* Lines of context. Default if 0 */ |
| 32 | #define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */ |
| 33 | #define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */ |
| 34 | #define DIFF_SIDEBYSIDE ((u64)0x02000000) /* Generate a side-by-side diff */ |
| 35 | #define DIFF_VERBOSE ((u64)0x04000000) /* Missing shown as empty files */ |
| 36 | #define DIFF_BRIEF ((u64)0x08000000) /* Show filenames only */ |
| 37 | #define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */ |
| 38 | #define DIFF_HTML ((u64)0x10000000) /* Render for HTML */ |
| 39 | #define DIFF_LINENO ((u64)0x20000000) /* Show line numbers */ |
| 40 | #define DIFF_WS_WARNING ((u64)0x40000000) /* Warn about whitespace */ |
| 41 |
+1
-1
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -30,11 +30,11 @@ | ||
| 30 | 30 | */ |
| 31 | 31 | #define DIFF_CONTEXT_MASK ((u64)0x0000ffff) /* Lines of context. Default if 0 */ |
| 32 | 32 | #define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */ |
| 33 | 33 | #define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */ |
| 34 | 34 | #define DIFF_SIDEBYSIDE ((u64)0x02000000) /* Generate a side-by-side diff */ |
| 35 | -#define DIFF_NEWFILE ((u64)0x04000000) /* Missing shown as empty files */ | |
| 35 | +#define DIFF_VERBOSE ((u64)0x04000000) /* Missing shown as empty files */ | |
| 36 | 36 | #define DIFF_BRIEF ((u64)0x08000000) /* Show filenames only */ |
| 37 | 37 | #define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */ |
| 38 | 38 | #define DIFF_HTML ((u64)0x10000000) /* Render for HTML */ |
| 39 | 39 | #define DIFF_LINENO ((u64)0x20000000) /* Show line numbers */ |
| 40 | 40 | #define DIFF_WS_WARNING ((u64)0x40000000) /* Warn about whitespace */ |
| 41 | 41 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -30,11 +30,11 @@ | |
| 30 | */ |
| 31 | #define DIFF_CONTEXT_MASK ((u64)0x0000ffff) /* Lines of context. Default if 0 */ |
| 32 | #define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */ |
| 33 | #define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */ |
| 34 | #define DIFF_SIDEBYSIDE ((u64)0x02000000) /* Generate a side-by-side diff */ |
| 35 | #define DIFF_NEWFILE ((u64)0x04000000) /* Missing shown as empty files */ |
| 36 | #define DIFF_BRIEF ((u64)0x08000000) /* Show filenames only */ |
| 37 | #define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */ |
| 38 | #define DIFF_HTML ((u64)0x10000000) /* Render for HTML */ |
| 39 | #define DIFF_LINENO ((u64)0x20000000) /* Show line numbers */ |
| 40 | #define DIFF_WS_WARNING ((u64)0x40000000) /* Warn about whitespace */ |
| 41 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -30,11 +30,11 @@ | |
| 30 | */ |
| 31 | #define DIFF_CONTEXT_MASK ((u64)0x0000ffff) /* Lines of context. Default if 0 */ |
| 32 | #define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */ |
| 33 | #define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */ |
| 34 | #define DIFF_SIDEBYSIDE ((u64)0x02000000) /* Generate a side-by-side diff */ |
| 35 | #define DIFF_VERBOSE ((u64)0x04000000) /* Missing shown as empty files */ |
| 36 | #define DIFF_BRIEF ((u64)0x08000000) /* Show filenames only */ |
| 37 | #define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */ |
| 38 | #define DIFF_HTML ((u64)0x10000000) /* Render for HTML */ |
| 39 | #define DIFF_LINENO ((u64)0x20000000) /* Show line numbers */ |
| 40 | #define DIFF_WS_WARNING ((u64)0x40000000) /* Warn about whitespace */ |
| 41 |
+11
-8
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -320,11 +320,11 @@ | ||
| 320 | 320 | int vid; |
| 321 | 321 | Blob sql; |
| 322 | 322 | Stmt q; |
| 323 | 323 | int asNewFile; /* Treat non-existant files as empty files */ |
| 324 | 324 | |
| 325 | - asNewFile = (diffFlags & DIFF_NEWFILE)!=0; | |
| 325 | + asNewFile = (diffFlags & DIFF_VERBOSE)!=0; | |
| 326 | 326 | vid = db_lget_int("checkout", 0); |
| 327 | 327 | vfile_check_signature(vid, CKSIG_ENOTFILE); |
| 328 | 328 | blob_zero(&sql); |
| 329 | 329 | db_begin_transaction(); |
| 330 | 330 | if( zFrom ){ |
| @@ -522,11 +522,11 @@ | ||
| 522 | 522 | int fIncludeBinary, |
| 523 | 523 | u64 diffFlags |
| 524 | 524 | ){ |
| 525 | 525 | Manifest *pFrom, *pTo; |
| 526 | 526 | ManifestFile *pFromFile, *pToFile; |
| 527 | - int asNewFlag = (diffFlags & DIFF_NEWFILE)!=0 ? 1 : 0; | |
| 527 | + int asNewFlag = (diffFlags & DIFF_VERBOSE)!=0 ? 1 : 0; | |
| 528 | 528 | |
| 529 | 529 | pFrom = manifest_get_by_name(zFrom, 0); |
| 530 | 530 | manifest_file_rewind(pFrom); |
| 531 | 531 | pFromFile = manifest_file_next(pFrom,0); |
| 532 | 532 | pTo = manifest_get_by_name(zTo, 0); |
| @@ -743,21 +743,21 @@ | ||
| 743 | 743 | ** --brief Show filenames only |
| 744 | 744 | ** --context|-c N Use N lines of context |
| 745 | 745 | ** --diff-binary BOOL Include binary files when using external commands |
| 746 | 746 | ** --from|-r VERSION select VERSION as source for the diff |
| 747 | 747 | ** --internal|-i use internal diff logic |
| 748 | -** --new-file|-N output complete text of added or deleted files | |
| 749 | 748 | ** --side-by-side|-y side-by-side diff |
| 750 | 749 | ** --tk Launch a Tcl/Tk GUI for display |
| 751 | 750 | ** --to VERSION select VERSION as target for the diff |
| 752 | 751 | ** --unified unified diff |
| 753 | -** --width|-W N Width of lines in side-by-side diff | |
| 752 | +** -v|--verbose output complete text of added or deleted files | |
| 753 | +** -W|--width Width of lines in side-by-side diff | |
| 754 | 754 | */ |
| 755 | 755 | void diff_cmd(void){ |
| 756 | 756 | int isGDiff; /* True for gdiff. False for normal diff */ |
| 757 | 757 | 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 */ | |
| 759 | 759 | const char *zFrom; /* Source version number */ |
| 760 | 760 | const char *zTo; /* Target version number */ |
| 761 | 761 | const char *zBranch; /* Branch to diff */ |
| 762 | 762 | const char *zDiffCmd = 0; /* External diff command. NULL for internal diff */ |
| 763 | 763 | const char *zBinGlob = 0; /* Treat file names matching this as binary */ |
| @@ -773,12 +773,15 @@ | ||
| 773 | 773 | isInternDiff = find_option("internal","i",0)!=0; |
| 774 | 774 | zFrom = find_option("from", "r", 1); |
| 775 | 775 | zTo = find_option("to", 0, 1); |
| 776 | 776 | zBranch = find_option("branch", 0, 1); |
| 777 | 777 | 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; /* deprecated */ | |
| 781 | + } | |
| 782 | + if( verboseFlag ) diffFlags |= DIFF_VERBOSE; | |
| 780 | 783 | |
| 781 | 784 | if( zBranch ){ |
| 782 | 785 | if( zTo || zFrom ){ |
| 783 | 786 | fossil_fatal("cannot use --from or --to with --branch"); |
| 784 | 787 | } |
| @@ -834,7 +837,7 @@ | ||
| 834 | 837 | login_check_credentials(); |
| 835 | 838 | if( !g.perm.Read ){ login_needed(); return; } |
| 836 | 839 | if( zFrom==0 || zTo==0 ) fossil_redirect_home(); |
| 837 | 840 | |
| 838 | 841 | cgi_set_content_type("text/plain"); |
| 839 | - diff_all_two_versions(zFrom, zTo, 0, 0, 0, DIFF_NEWFILE); | |
| 842 | + diff_all_two_versions(zFrom, zTo, 0, 0, 0, DIFF_VERBOSE); | |
| 840 | 843 | } |
| 841 | 844 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -320,11 +320,11 @@ | |
| 320 | int vid; |
| 321 | Blob sql; |
| 322 | Stmt q; |
| 323 | int asNewFile; /* Treat non-existant files as empty files */ |
| 324 | |
| 325 | asNewFile = (diffFlags & DIFF_NEWFILE)!=0; |
| 326 | vid = db_lget_int("checkout", 0); |
| 327 | vfile_check_signature(vid, CKSIG_ENOTFILE); |
| 328 | blob_zero(&sql); |
| 329 | db_begin_transaction(); |
| 330 | if( zFrom ){ |
| @@ -522,11 +522,11 @@ | |
| 522 | int fIncludeBinary, |
| 523 | u64 diffFlags |
| 524 | ){ |
| 525 | Manifest *pFrom, *pTo; |
| 526 | ManifestFile *pFromFile, *pToFile; |
| 527 | int asNewFlag = (diffFlags & DIFF_NEWFILE)!=0 ? 1 : 0; |
| 528 | |
| 529 | pFrom = manifest_get_by_name(zFrom, 0); |
| 530 | manifest_file_rewind(pFrom); |
| 531 | pFromFile = manifest_file_next(pFrom,0); |
| 532 | pTo = manifest_get_by_name(zTo, 0); |
| @@ -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 | } |
| @@ -834,7 +837,7 @@ | |
| 834 | login_check_credentials(); |
| 835 | if( !g.perm.Read ){ login_needed(); return; } |
| 836 | if( zFrom==0 || zTo==0 ) fossil_redirect_home(); |
| 837 | |
| 838 | cgi_set_content_type("text/plain"); |
| 839 | diff_all_two_versions(zFrom, zTo, 0, 0, 0, DIFF_NEWFILE); |
| 840 | } |
| 841 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -320,11 +320,11 @@ | |
| 320 | int vid; |
| 321 | Blob sql; |
| 322 | Stmt q; |
| 323 | int asNewFile; /* Treat non-existant files as empty files */ |
| 324 | |
| 325 | asNewFile = (diffFlags & DIFF_VERBOSE)!=0; |
| 326 | vid = db_lget_int("checkout", 0); |
| 327 | vfile_check_signature(vid, CKSIG_ENOTFILE); |
| 328 | blob_zero(&sql); |
| 329 | db_begin_transaction(); |
| 330 | if( zFrom ){ |
| @@ -522,11 +522,11 @@ | |
| 522 | int fIncludeBinary, |
| 523 | u64 diffFlags |
| 524 | ){ |
| 525 | Manifest *pFrom, *pTo; |
| 526 | ManifestFile *pFromFile, *pToFile; |
| 527 | int asNewFlag = (diffFlags & DIFF_VERBOSE)!=0 ? 1 : 0; |
| 528 | |
| 529 | pFrom = manifest_get_by_name(zFrom, 0); |
| 530 | manifest_file_rewind(pFrom); |
| 531 | pFromFile = manifest_file_next(pFrom,0); |
| 532 | pTo = manifest_get_by_name(zTo, 0); |
| @@ -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 | ** --side-by-side|-y side-by-side diff |
| 749 | ** --tk Launch a Tcl/Tk GUI for display |
| 750 | ** --to VERSION select VERSION as target for the diff |
| 751 | ** --unified unified diff |
| 752 | ** -v|--verbose output complete text of added or deleted files |
| 753 | ** -W|--width 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; /* deprecated */ |
| 781 | } |
| 782 | if( verboseFlag ) diffFlags |= DIFF_VERBOSE; |
| 783 | |
| 784 | if( zBranch ){ |
| 785 | if( zTo || zFrom ){ |
| 786 | fossil_fatal("cannot use --from or --to with --branch"); |
| 787 | } |
| @@ -834,7 +837,7 @@ | |
| 837 | login_check_credentials(); |
| 838 | if( !g.perm.Read ){ login_needed(); return; } |
| 839 | if( zFrom==0 || zTo==0 ) fossil_redirect_home(); |
| 840 | |
| 841 | cgi_set_content_type("text/plain"); |
| 842 | diff_all_two_versions(zFrom, zTo, 0, 0, 0, DIFF_VERBOSE); |
| 843 | } |
| 844 |
+11
-8
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -320,11 +320,11 @@ | ||
| 320 | 320 | int vid; |
| 321 | 321 | Blob sql; |
| 322 | 322 | Stmt q; |
| 323 | 323 | int asNewFile; /* Treat non-existant files as empty files */ |
| 324 | 324 | |
| 325 | - asNewFile = (diffFlags & DIFF_NEWFILE)!=0; | |
| 325 | + asNewFile = (diffFlags & DIFF_VERBOSE)!=0; | |
| 326 | 326 | vid = db_lget_int("checkout", 0); |
| 327 | 327 | vfile_check_signature(vid, CKSIG_ENOTFILE); |
| 328 | 328 | blob_zero(&sql); |
| 329 | 329 | db_begin_transaction(); |
| 330 | 330 | if( zFrom ){ |
| @@ -522,11 +522,11 @@ | ||
| 522 | 522 | int fIncludeBinary, |
| 523 | 523 | u64 diffFlags |
| 524 | 524 | ){ |
| 525 | 525 | Manifest *pFrom, *pTo; |
| 526 | 526 | ManifestFile *pFromFile, *pToFile; |
| 527 | - int asNewFlag = (diffFlags & DIFF_NEWFILE)!=0 ? 1 : 0; | |
| 527 | + int asNewFlag = (diffFlags & DIFF_VERBOSE)!=0 ? 1 : 0; | |
| 528 | 528 | |
| 529 | 529 | pFrom = manifest_get_by_name(zFrom, 0); |
| 530 | 530 | manifest_file_rewind(pFrom); |
| 531 | 531 | pFromFile = manifest_file_next(pFrom,0); |
| 532 | 532 | pTo = manifest_get_by_name(zTo, 0); |
| @@ -743,21 +743,21 @@ | ||
| 743 | 743 | ** --brief Show filenames only |
| 744 | 744 | ** --context|-c N Use N lines of context |
| 745 | 745 | ** --diff-binary BOOL Include binary files when using external commands |
| 746 | 746 | ** --from|-r VERSION select VERSION as source for the diff |
| 747 | 747 | ** --internal|-i use internal diff logic |
| 748 | -** --new-file|-N output complete text of added or deleted files | |
| 749 | 748 | ** --side-by-side|-y side-by-side diff |
| 750 | 749 | ** --tk Launch a Tcl/Tk GUI for display |
| 751 | 750 | ** --to VERSION select VERSION as target for the diff |
| 752 | 751 | ** --unified unified diff |
| 753 | -** --width|-W N Width of lines in side-by-side diff | |
| 752 | +** -v|--verbose output complete text of added or deleted files | |
| 753 | +** -W|--width Width of lines in side-by-side diff | |
| 754 | 754 | */ |
| 755 | 755 | void diff_cmd(void){ |
| 756 | 756 | int isGDiff; /* True for gdiff. False for normal diff */ |
| 757 | 757 | 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 */ | |
| 759 | 759 | const char *zFrom; /* Source version number */ |
| 760 | 760 | const char *zTo; /* Target version number */ |
| 761 | 761 | const char *zBranch; /* Branch to diff */ |
| 762 | 762 | const char *zDiffCmd = 0; /* External diff command. NULL for internal diff */ |
| 763 | 763 | const char *zBinGlob = 0; /* Treat file names matching this as binary */ |
| @@ -773,12 +773,15 @@ | ||
| 773 | 773 | isInternDiff = find_option("internal","i",0)!=0; |
| 774 | 774 | zFrom = find_option("from", "r", 1); |
| 775 | 775 | zTo = find_option("to", 0, 1); |
| 776 | 776 | zBranch = find_option("branch", 0, 1); |
| 777 | 777 | 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; /* deprecated */ | |
| 781 | + } | |
| 782 | + if( verboseFlag ) diffFlags |= DIFF_VERBOSE; | |
| 780 | 783 | |
| 781 | 784 | if( zBranch ){ |
| 782 | 785 | if( zTo || zFrom ){ |
| 783 | 786 | fossil_fatal("cannot use --from or --to with --branch"); |
| 784 | 787 | } |
| @@ -834,7 +837,7 @@ | ||
| 834 | 837 | login_check_credentials(); |
| 835 | 838 | if( !g.perm.Read ){ login_needed(); return; } |
| 836 | 839 | if( zFrom==0 || zTo==0 ) fossil_redirect_home(); |
| 837 | 840 | |
| 838 | 841 | cgi_set_content_type("text/plain"); |
| 839 | - diff_all_two_versions(zFrom, zTo, 0, 0, 0, DIFF_NEWFILE); | |
| 842 | + diff_all_two_versions(zFrom, zTo, 0, 0, 0, DIFF_VERBOSE); | |
| 840 | 843 | } |
| 841 | 844 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -320,11 +320,11 @@ | |
| 320 | int vid; |
| 321 | Blob sql; |
| 322 | Stmt q; |
| 323 | int asNewFile; /* Treat non-existant files as empty files */ |
| 324 | |
| 325 | asNewFile = (diffFlags & DIFF_NEWFILE)!=0; |
| 326 | vid = db_lget_int("checkout", 0); |
| 327 | vfile_check_signature(vid, CKSIG_ENOTFILE); |
| 328 | blob_zero(&sql); |
| 329 | db_begin_transaction(); |
| 330 | if( zFrom ){ |
| @@ -522,11 +522,11 @@ | |
| 522 | int fIncludeBinary, |
| 523 | u64 diffFlags |
| 524 | ){ |
| 525 | Manifest *pFrom, *pTo; |
| 526 | ManifestFile *pFromFile, *pToFile; |
| 527 | int asNewFlag = (diffFlags & DIFF_NEWFILE)!=0 ? 1 : 0; |
| 528 | |
| 529 | pFrom = manifest_get_by_name(zFrom, 0); |
| 530 | manifest_file_rewind(pFrom); |
| 531 | pFromFile = manifest_file_next(pFrom,0); |
| 532 | pTo = manifest_get_by_name(zTo, 0); |
| @@ -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 | } |
| @@ -834,7 +837,7 @@ | |
| 834 | login_check_credentials(); |
| 835 | if( !g.perm.Read ){ login_needed(); return; } |
| 836 | if( zFrom==0 || zTo==0 ) fossil_redirect_home(); |
| 837 | |
| 838 | cgi_set_content_type("text/plain"); |
| 839 | diff_all_two_versions(zFrom, zTo, 0, 0, 0, DIFF_NEWFILE); |
| 840 | } |
| 841 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -320,11 +320,11 @@ | |
| 320 | int vid; |
| 321 | Blob sql; |
| 322 | Stmt q; |
| 323 | int asNewFile; /* Treat non-existant files as empty files */ |
| 324 | |
| 325 | asNewFile = (diffFlags & DIFF_VERBOSE)!=0; |
| 326 | vid = db_lget_int("checkout", 0); |
| 327 | vfile_check_signature(vid, CKSIG_ENOTFILE); |
| 328 | blob_zero(&sql); |
| 329 | db_begin_transaction(); |
| 330 | if( zFrom ){ |
| @@ -522,11 +522,11 @@ | |
| 522 | int fIncludeBinary, |
| 523 | u64 diffFlags |
| 524 | ){ |
| 525 | Manifest *pFrom, *pTo; |
| 526 | ManifestFile *pFromFile, *pToFile; |
| 527 | int asNewFlag = (diffFlags & DIFF_VERBOSE)!=0 ? 1 : 0; |
| 528 | |
| 529 | pFrom = manifest_get_by_name(zFrom, 0); |
| 530 | manifest_file_rewind(pFrom); |
| 531 | pFromFile = manifest_file_next(pFrom,0); |
| 532 | pTo = manifest_get_by_name(zTo, 0); |
| @@ -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 | ** --side-by-side|-y side-by-side diff |
| 749 | ** --tk Launch a Tcl/Tk GUI for display |
| 750 | ** --to VERSION select VERSION as target for the diff |
| 751 | ** --unified unified diff |
| 752 | ** -v|--verbose output complete text of added or deleted files |
| 753 | ** -W|--width 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; /* deprecated */ |
| 781 | } |
| 782 | if( verboseFlag ) diffFlags |= DIFF_VERBOSE; |
| 783 | |
| 784 | if( zBranch ){ |
| 785 | if( zTo || zFrom ){ |
| 786 | fossil_fatal("cannot use --from or --to with --branch"); |
| 787 | } |
| @@ -834,7 +837,7 @@ | |
| 837 | login_check_credentials(); |
| 838 | if( !g.perm.Read ){ login_needed(); return; } |
| 839 | if( zFrom==0 || zTo==0 ) fossil_redirect_home(); |
| 840 | |
| 841 | cgi_set_content_type("text/plain"); |
| 842 | diff_all_two_versions(zFrom, zTo, 0, 0, 0, DIFF_VERBOSE); |
| 843 | } |
| 844 |
+6
-3
| --- src/json_timeline.c | ||
| +++ src/json_timeline.c | ||
| @@ -426,11 +426,11 @@ | ||
| 426 | 426 | cson_object * pay = NULL; |
| 427 | 427 | cson_value * tmp = NULL; |
| 428 | 428 | cson_value * listV = NULL; |
| 429 | 429 | cson_array * list = NULL; |
| 430 | 430 | int check = 0; |
| 431 | - char showFiles = -1/*magic number*/; | |
| 431 | + char verboseFlag; | |
| 432 | 432 | Stmt q = empty_Stmt; |
| 433 | 433 | char warnRowToJsonFailed = 0; |
| 434 | 434 | Blob sql = empty_blob; |
| 435 | 435 | if( !g.perm.Hyperlink ){ |
| 436 | 436 | /* Reminder to self: HTML impl requires 'o' (Read) |
| @@ -437,11 +437,14 @@ | ||
| 437 | 437 | rights. |
| 438 | 438 | */ |
| 439 | 439 | json_set_err( FSL_JSON_E_DENIED, "Checkin timeline requires 'h' access." ); |
| 440 | 440 | return NULL; |
| 441 | 441 | } |
| 442 | - showFiles = json_find_option_bool("files",NULL,"f",0); | |
| 442 | + verboseFlag = json_find_option_bool("verbose",NULL,"v",0); | |
| 443 | + if( !verboseFlag ){ | |
| 444 | + verboseFlag = json_find_option_bool("files",NULL,"f",0); | |
| 445 | + } | |
| 443 | 446 | payV = cson_value_new_object(); |
| 444 | 447 | pay = cson_value_get_object(payV); |
| 445 | 448 | check = json_timeline_setup_sql( "ci", &sql, pay ); |
| 446 | 449 | if(check){ |
| 447 | 450 | json_set_err(check, "Query initialization failed."); |
| @@ -470,11 +473,11 @@ | ||
| 470 | 473 | tmp = listV; |
| 471 | 474 | SET("timeline"); |
| 472 | 475 | while( (SQLITE_ROW == db_step(&q) )){ |
| 473 | 476 | /* convert each row into a JSON object...*/ |
| 474 | 477 | int const rid = db_column_int(&q,0); |
| 475 | - cson_value * rowV = json_artifact_for_ci(rid, showFiles); | |
| 478 | + cson_value * rowV = json_artifact_for_ci(rid, verboseFlag); | |
| 476 | 479 | cson_object * row = cson_value_get_object(rowV); |
| 477 | 480 | if(!row){ |
| 478 | 481 | if( !warnRowToJsonFailed ){ |
| 479 | 482 | warnRowToJsonFailed = 1; |
| 480 | 483 | json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED, |
| 481 | 484 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -426,11 +426,11 @@ | |
| 426 | cson_object * pay = NULL; |
| 427 | cson_value * tmp = NULL; |
| 428 | cson_value * listV = NULL; |
| 429 | cson_array * list = NULL; |
| 430 | int check = 0; |
| 431 | char showFiles = -1/*magic number*/; |
| 432 | Stmt q = empty_Stmt; |
| 433 | char warnRowToJsonFailed = 0; |
| 434 | Blob sql = empty_blob; |
| 435 | if( !g.perm.Hyperlink ){ |
| 436 | /* Reminder to self: HTML impl requires 'o' (Read) |
| @@ -437,11 +437,14 @@ | |
| 437 | rights. |
| 438 | */ |
| 439 | json_set_err( FSL_JSON_E_DENIED, "Checkin timeline requires 'h' access." ); |
| 440 | return NULL; |
| 441 | } |
| 442 | showFiles = json_find_option_bool("files",NULL,"f",0); |
| 443 | payV = cson_value_new_object(); |
| 444 | pay = cson_value_get_object(payV); |
| 445 | check = json_timeline_setup_sql( "ci", &sql, pay ); |
| 446 | if(check){ |
| 447 | json_set_err(check, "Query initialization failed."); |
| @@ -470,11 +473,11 @@ | |
| 470 | tmp = listV; |
| 471 | SET("timeline"); |
| 472 | while( (SQLITE_ROW == db_step(&q) )){ |
| 473 | /* convert each row into a JSON object...*/ |
| 474 | int const rid = db_column_int(&q,0); |
| 475 | cson_value * rowV = json_artifact_for_ci(rid, showFiles); |
| 476 | cson_object * row = cson_value_get_object(rowV); |
| 477 | if(!row){ |
| 478 | if( !warnRowToJsonFailed ){ |
| 479 | warnRowToJsonFailed = 1; |
| 480 | json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED, |
| 481 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -426,11 +426,11 @@ | |
| 426 | cson_object * pay = NULL; |
| 427 | cson_value * tmp = NULL; |
| 428 | cson_value * listV = NULL; |
| 429 | cson_array * list = NULL; |
| 430 | int check = 0; |
| 431 | char verboseFlag; |
| 432 | Stmt q = empty_Stmt; |
| 433 | char warnRowToJsonFailed = 0; |
| 434 | Blob sql = empty_blob; |
| 435 | if( !g.perm.Hyperlink ){ |
| 436 | /* Reminder to self: HTML impl requires 'o' (Read) |
| @@ -437,11 +437,14 @@ | |
| 437 | rights. |
| 438 | */ |
| 439 | json_set_err( FSL_JSON_E_DENIED, "Checkin timeline requires 'h' access." ); |
| 440 | return NULL; |
| 441 | } |
| 442 | verboseFlag = json_find_option_bool("verbose",NULL,"v",0); |
| 443 | if( !verboseFlag ){ |
| 444 | verboseFlag = json_find_option_bool("files",NULL,"f",0); |
| 445 | } |
| 446 | payV = cson_value_new_object(); |
| 447 | pay = cson_value_get_object(payV); |
| 448 | check = json_timeline_setup_sql( "ci", &sql, pay ); |
| 449 | if(check){ |
| 450 | json_set_err(check, "Query initialization failed."); |
| @@ -470,11 +473,11 @@ | |
| 473 | tmp = listV; |
| 474 | SET("timeline"); |
| 475 | while( (SQLITE_ROW == db_step(&q) )){ |
| 476 | /* convert each row into a JSON object...*/ |
| 477 | int const rid = db_column_int(&q,0); |
| 478 | cson_value * rowV = json_artifact_for_ci(rid, verboseFlag); |
| 479 | cson_object * row = cson_value_get_object(rowV); |
| 480 | if(!row){ |
| 481 | if( !warnRowToJsonFailed ){ |
| 482 | warnRowToJsonFailed = 1; |
| 483 | json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED, |
| 484 |
+2
| --- src/merge.c | ||
| +++ src/merge.c | ||
| @@ -88,10 +88,12 @@ | ||
| 88 | 88 | ** option overrides the "binary-glob" setting. |
| 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 | +** | |
| 94 | +** -v|--verbose Show additional details of the merge | |
| 93 | 95 | ** |
| 94 | 96 | ** -f|--force Force the merge even if it would be a no-op. |
| 95 | 97 | ** |
| 96 | 98 | ** -n|--dry-run If given, display instead of run actions |
| 97 | 99 | ** |
| 98 | 100 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -88,10 +88,12 @@ | |
| 88 | ** option overrides the "binary-glob" setting. |
| 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 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -88,10 +88,12 @@ | |
| 88 | ** option overrides the "binary-glob" setting. |
| 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 | ** -v|--verbose 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 |
+2
| --- src/merge.c | ||
| +++ src/merge.c | ||
| @@ -88,10 +88,12 @@ | ||
| 88 | 88 | ** option overrides the "binary-glob" setting. |
| 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 | +** | |
| 94 | +** -v|--verbose Show additional details of the merge | |
| 93 | 95 | ** |
| 94 | 96 | ** -f|--force Force the merge even if it would be a no-op. |
| 95 | 97 | ** |
| 96 | 98 | ** -n|--dry-run If given, display instead of run actions |
| 97 | 99 | ** |
| 98 | 100 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -88,10 +88,12 @@ | |
| 88 | ** option overrides the "binary-glob" setting. |
| 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 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -88,10 +88,12 @@ | |
| 88 | ** option overrides the "binary-glob" setting. |
| 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 | ** -v|--verbose 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 |
+10
-7
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1467,11 +1467,11 @@ | ||
| 1467 | 1467 | ** 4. Number of non-merge children |
| 1468 | 1468 | ** 5. Number of parents |
| 1469 | 1469 | ** 6. mtime |
| 1470 | 1470 | ** 7. branch |
| 1471 | 1471 | */ |
| 1472 | -void print_timeline(Stmt *q, int mxLine, int showfiles){ | |
| 1472 | +void print_timeline(Stmt *q, int mxLine, int verboseFlag){ | |
| 1473 | 1473 | int nLine = 0; |
| 1474 | 1474 | char zPrevDate[20]; |
| 1475 | 1475 | const char *zCurrentUuid=0; |
| 1476 | 1476 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 1477 | 1477 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| @@ -1523,11 +1523,11 @@ | ||
| 1523 | 1523 | } |
| 1524 | 1524 | zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom); |
| 1525 | 1525 | nLine += comment_print(zFree, 9, 79); |
| 1526 | 1526 | sqlite3_free(zFree); |
| 1527 | 1527 | |
| 1528 | - if(showfiles){ | |
| 1528 | + if(verboseFlag){ | |
| 1529 | 1529 | if( !fchngQueryInit ){ |
| 1530 | 1530 | db_prepare(&fchngQuery, |
| 1531 | 1531 | "SELECT (pid==0) AS isnew," |
| 1532 | 1532 | " (fid==0) AS isdel," |
| 1533 | 1533 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| @@ -1622,18 +1622,18 @@ | ||
| 1622 | 1622 | ** The DATETIME should be in the ISO8601 format. For |
| 1623 | 1623 | ** examples: "2007-08-18 07:21:21". You can also say "current" |
| 1624 | 1624 | ** for the current version or "now" for the current time. |
| 1625 | 1625 | ** |
| 1626 | 1626 | ** Options: |
| 1627 | -** -f|--showfiles print the list of files changed in a checkin after | |
| 1628 | -** the checkin comment. | |
| 1629 | 1627 | ** -n|--limit N display the first N changes (default 20) |
| 1630 | 1628 | ** -t|--type TYPE only display items from the give types, such as: |
| 1631 | 1629 | ** ci = file commits only |
| 1632 | 1630 | ** e = events only |
| 1633 | 1631 | ** t = tickets only |
| 1634 | 1632 | ** w = wiki commits only |
| 1633 | +** -v|--verbose print the list of files changed in a checkin after | |
| 1634 | +** the checkin comment. | |
| 1635 | 1635 | */ |
| 1636 | 1636 | void timeline_cmd(void){ |
| 1637 | 1637 | Stmt q; |
| 1638 | 1638 | int n, k; |
| 1639 | 1639 | const char *zLimit; |
| @@ -1642,12 +1642,15 @@ | ||
| 1642 | 1642 | char *zDate; |
| 1643 | 1643 | Blob sql; |
| 1644 | 1644 | int objid = 0; |
| 1645 | 1645 | Blob uuid; |
| 1646 | 1646 | int mode = 0 ; /* 0:none 1: before 2:after 3:children 4:parents */ |
| 1647 | - int showfilesFlag = 0 ; | |
| 1648 | - showfilesFlag = find_option("showfiles","f", 0)!=0; | |
| 1647 | + int verboseFlag = 0 ; | |
| 1648 | + verboseFlag = find_option("verbose","v", 0)!=0; | |
| 1649 | + if( !verboseFlag){ | |
| 1650 | + verboseFlag = find_option("showfiles","f", 0)!=0; /* deprecated */ | |
| 1651 | + } | |
| 1649 | 1652 | db_find_and_open_repository(0, 0); |
| 1650 | 1653 | zLimit = find_option("limit","n",1); |
| 1651 | 1654 | zType = find_option("type","t",1); |
| 1652 | 1655 | if ( !zLimit ){ |
| 1653 | 1656 | zLimit = find_option("count",0,1); |
| @@ -1732,11 +1735,11 @@ | ||
| 1732 | 1735 | blob_appendf(&sql, " AND event.type=%Q ", zType); |
| 1733 | 1736 | } |
| 1734 | 1737 | blob_appendf(&sql, " ORDER BY event.mtime DESC"); |
| 1735 | 1738 | db_prepare(&q, blob_str(&sql)); |
| 1736 | 1739 | blob_reset(&sql); |
| 1737 | - print_timeline(&q, n, showfilesFlag); | |
| 1740 | + print_timeline(&q, n, verboseFlag); | |
| 1738 | 1741 | db_finalize(&q); |
| 1739 | 1742 | } |
| 1740 | 1743 | |
| 1741 | 1744 | /* |
| 1742 | 1745 | ** This is a version of the "localtime()" function from the standard |
| 1743 | 1746 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1467,11 +1467,11 @@ | |
| 1467 | ** 4. Number of non-merge children |
| 1468 | ** 5. Number of parents |
| 1469 | ** 6. mtime |
| 1470 | ** 7. branch |
| 1471 | */ |
| 1472 | void print_timeline(Stmt *q, int mxLine, int showfiles){ |
| 1473 | int nLine = 0; |
| 1474 | char zPrevDate[20]; |
| 1475 | const char *zCurrentUuid=0; |
| 1476 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 1477 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| @@ -1523,11 +1523,11 @@ | |
| 1523 | } |
| 1524 | zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom); |
| 1525 | nLine += comment_print(zFree, 9, 79); |
| 1526 | sqlite3_free(zFree); |
| 1527 | |
| 1528 | if(showfiles){ |
| 1529 | if( !fchngQueryInit ){ |
| 1530 | db_prepare(&fchngQuery, |
| 1531 | "SELECT (pid==0) AS isnew," |
| 1532 | " (fid==0) AS isdel," |
| 1533 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| @@ -1622,18 +1622,18 @@ | |
| 1622 | ** The DATETIME should be in the ISO8601 format. For |
| 1623 | ** examples: "2007-08-18 07:21:21". You can also say "current" |
| 1624 | ** for the current version or "now" for the current time. |
| 1625 | ** |
| 1626 | ** Options: |
| 1627 | ** -f|--showfiles print the list of files changed in a checkin after |
| 1628 | ** the checkin comment. |
| 1629 | ** -n|--limit N display the first N changes (default 20) |
| 1630 | ** -t|--type TYPE only display items from the give types, such as: |
| 1631 | ** ci = file commits only |
| 1632 | ** e = events only |
| 1633 | ** t = tickets only |
| 1634 | ** w = wiki commits only |
| 1635 | */ |
| 1636 | void timeline_cmd(void){ |
| 1637 | Stmt q; |
| 1638 | int n, k; |
| 1639 | const char *zLimit; |
| @@ -1642,12 +1642,15 @@ | |
| 1642 | char *zDate; |
| 1643 | Blob sql; |
| 1644 | int objid = 0; |
| 1645 | Blob uuid; |
| 1646 | int mode = 0 ; /* 0:none 1: before 2:after 3:children 4:parents */ |
| 1647 | int showfilesFlag = 0 ; |
| 1648 | showfilesFlag = find_option("showfiles","f", 0)!=0; |
| 1649 | db_find_and_open_repository(0, 0); |
| 1650 | zLimit = find_option("limit","n",1); |
| 1651 | zType = find_option("type","t",1); |
| 1652 | if ( !zLimit ){ |
| 1653 | zLimit = find_option("count",0,1); |
| @@ -1732,11 +1735,11 @@ | |
| 1732 | blob_appendf(&sql, " AND event.type=%Q ", zType); |
| 1733 | } |
| 1734 | blob_appendf(&sql, " ORDER BY event.mtime DESC"); |
| 1735 | db_prepare(&q, blob_str(&sql)); |
| 1736 | blob_reset(&sql); |
| 1737 | print_timeline(&q, n, showfilesFlag); |
| 1738 | db_finalize(&q); |
| 1739 | } |
| 1740 | |
| 1741 | /* |
| 1742 | ** This is a version of the "localtime()" function from the standard |
| 1743 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1467,11 +1467,11 @@ | |
| 1467 | ** 4. Number of non-merge children |
| 1468 | ** 5. Number of parents |
| 1469 | ** 6. mtime |
| 1470 | ** 7. branch |
| 1471 | */ |
| 1472 | void print_timeline(Stmt *q, int mxLine, int verboseFlag){ |
| 1473 | int nLine = 0; |
| 1474 | char zPrevDate[20]; |
| 1475 | const char *zCurrentUuid=0; |
| 1476 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 1477 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| @@ -1523,11 +1523,11 @@ | |
| 1523 | } |
| 1524 | zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom); |
| 1525 | nLine += comment_print(zFree, 9, 79); |
| 1526 | sqlite3_free(zFree); |
| 1527 | |
| 1528 | if(verboseFlag){ |
| 1529 | if( !fchngQueryInit ){ |
| 1530 | db_prepare(&fchngQuery, |
| 1531 | "SELECT (pid==0) AS isnew," |
| 1532 | " (fid==0) AS isdel," |
| 1533 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| @@ -1622,18 +1622,18 @@ | |
| 1622 | ** The DATETIME should be in the ISO8601 format. For |
| 1623 | ** examples: "2007-08-18 07:21:21". You can also say "current" |
| 1624 | ** for the current version or "now" for the current time. |
| 1625 | ** |
| 1626 | ** Options: |
| 1627 | ** -n|--limit N display the first N changes (default 20) |
| 1628 | ** -t|--type TYPE only display items from the give types, such as: |
| 1629 | ** ci = file commits only |
| 1630 | ** e = events only |
| 1631 | ** t = tickets only |
| 1632 | ** w = wiki commits only |
| 1633 | ** -v|--verbose print the list of files changed in a checkin after |
| 1634 | ** the checkin comment. |
| 1635 | */ |
| 1636 | void timeline_cmd(void){ |
| 1637 | Stmt q; |
| 1638 | int n, k; |
| 1639 | const char *zLimit; |
| @@ -1642,12 +1642,15 @@ | |
| 1642 | char *zDate; |
| 1643 | Blob sql; |
| 1644 | int objid = 0; |
| 1645 | Blob uuid; |
| 1646 | int mode = 0 ; /* 0:none 1: before 2:after 3:children 4:parents */ |
| 1647 | int verboseFlag = 0 ; |
| 1648 | verboseFlag = find_option("verbose","v", 0)!=0; |
| 1649 | if( !verboseFlag){ |
| 1650 | verboseFlag = find_option("showfiles","f", 0)!=0; /* deprecated */ |
| 1651 | } |
| 1652 | db_find_and_open_repository(0, 0); |
| 1653 | zLimit = find_option("limit","n",1); |
| 1654 | zType = find_option("type","t",1); |
| 1655 | if ( !zLimit ){ |
| 1656 | zLimit = find_option("count",0,1); |
| @@ -1732,11 +1735,11 @@ | |
| 1735 | blob_appendf(&sql, " AND event.type=%Q ", zType); |
| 1736 | } |
| 1737 | blob_appendf(&sql, " ORDER BY event.mtime DESC"); |
| 1738 | db_prepare(&q, blob_str(&sql)); |
| 1739 | blob_reset(&sql); |
| 1740 | print_timeline(&q, n, verboseFlag); |
| 1741 | db_finalize(&q); |
| 1742 | } |
| 1743 | |
| 1744 | /* |
| 1745 | ** This is a version of the "localtime()" function from the standard |
| 1746 |
+10
-7
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1467,11 +1467,11 @@ | ||
| 1467 | 1467 | ** 4. Number of non-merge children |
| 1468 | 1468 | ** 5. Number of parents |
| 1469 | 1469 | ** 6. mtime |
| 1470 | 1470 | ** 7. branch |
| 1471 | 1471 | */ |
| 1472 | -void print_timeline(Stmt *q, int mxLine, int showfiles){ | |
| 1472 | +void print_timeline(Stmt *q, int mxLine, int verboseFlag){ | |
| 1473 | 1473 | int nLine = 0; |
| 1474 | 1474 | char zPrevDate[20]; |
| 1475 | 1475 | const char *zCurrentUuid=0; |
| 1476 | 1476 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 1477 | 1477 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| @@ -1523,11 +1523,11 @@ | ||
| 1523 | 1523 | } |
| 1524 | 1524 | zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom); |
| 1525 | 1525 | nLine += comment_print(zFree, 9, 79); |
| 1526 | 1526 | sqlite3_free(zFree); |
| 1527 | 1527 | |
| 1528 | - if(showfiles){ | |
| 1528 | + if(verboseFlag){ | |
| 1529 | 1529 | if( !fchngQueryInit ){ |
| 1530 | 1530 | db_prepare(&fchngQuery, |
| 1531 | 1531 | "SELECT (pid==0) AS isnew," |
| 1532 | 1532 | " (fid==0) AS isdel," |
| 1533 | 1533 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| @@ -1622,18 +1622,18 @@ | ||
| 1622 | 1622 | ** The DATETIME should be in the ISO8601 format. For |
| 1623 | 1623 | ** examples: "2007-08-18 07:21:21". You can also say "current" |
| 1624 | 1624 | ** for the current version or "now" for the current time. |
| 1625 | 1625 | ** |
| 1626 | 1626 | ** Options: |
| 1627 | -** -f|--showfiles print the list of files changed in a checkin after | |
| 1628 | -** the checkin comment. | |
| 1629 | 1627 | ** -n|--limit N display the first N changes (default 20) |
| 1630 | 1628 | ** -t|--type TYPE only display items from the give types, such as: |
| 1631 | 1629 | ** ci = file commits only |
| 1632 | 1630 | ** e = events only |
| 1633 | 1631 | ** t = tickets only |
| 1634 | 1632 | ** w = wiki commits only |
| 1633 | +** -v|--verbose print the list of files changed in a checkin after | |
| 1634 | +** the checkin comment. | |
| 1635 | 1635 | */ |
| 1636 | 1636 | void timeline_cmd(void){ |
| 1637 | 1637 | Stmt q; |
| 1638 | 1638 | int n, k; |
| 1639 | 1639 | const char *zLimit; |
| @@ -1642,12 +1642,15 @@ | ||
| 1642 | 1642 | char *zDate; |
| 1643 | 1643 | Blob sql; |
| 1644 | 1644 | int objid = 0; |
| 1645 | 1645 | Blob uuid; |
| 1646 | 1646 | int mode = 0 ; /* 0:none 1: before 2:after 3:children 4:parents */ |
| 1647 | - int showfilesFlag = 0 ; | |
| 1648 | - showfilesFlag = find_option("showfiles","f", 0)!=0; | |
| 1647 | + int verboseFlag = 0 ; | |
| 1648 | + verboseFlag = find_option("verbose","v", 0)!=0; | |
| 1649 | + if( !verboseFlag){ | |
| 1650 | + verboseFlag = find_option("showfiles","f", 0)!=0; /* deprecated */ | |
| 1651 | + } | |
| 1649 | 1652 | db_find_and_open_repository(0, 0); |
| 1650 | 1653 | zLimit = find_option("limit","n",1); |
| 1651 | 1654 | zType = find_option("type","t",1); |
| 1652 | 1655 | if ( !zLimit ){ |
| 1653 | 1656 | zLimit = find_option("count",0,1); |
| @@ -1732,11 +1735,11 @@ | ||
| 1732 | 1735 | blob_appendf(&sql, " AND event.type=%Q ", zType); |
| 1733 | 1736 | } |
| 1734 | 1737 | blob_appendf(&sql, " ORDER BY event.mtime DESC"); |
| 1735 | 1738 | db_prepare(&q, blob_str(&sql)); |
| 1736 | 1739 | blob_reset(&sql); |
| 1737 | - print_timeline(&q, n, showfilesFlag); | |
| 1740 | + print_timeline(&q, n, verboseFlag); | |
| 1738 | 1741 | db_finalize(&q); |
| 1739 | 1742 | } |
| 1740 | 1743 | |
| 1741 | 1744 | /* |
| 1742 | 1745 | ** This is a version of the "localtime()" function from the standard |
| 1743 | 1746 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1467,11 +1467,11 @@ | |
| 1467 | ** 4. Number of non-merge children |
| 1468 | ** 5. Number of parents |
| 1469 | ** 6. mtime |
| 1470 | ** 7. branch |
| 1471 | */ |
| 1472 | void print_timeline(Stmt *q, int mxLine, int showfiles){ |
| 1473 | int nLine = 0; |
| 1474 | char zPrevDate[20]; |
| 1475 | const char *zCurrentUuid=0; |
| 1476 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 1477 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| @@ -1523,11 +1523,11 @@ | |
| 1523 | } |
| 1524 | zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom); |
| 1525 | nLine += comment_print(zFree, 9, 79); |
| 1526 | sqlite3_free(zFree); |
| 1527 | |
| 1528 | if(showfiles){ |
| 1529 | if( !fchngQueryInit ){ |
| 1530 | db_prepare(&fchngQuery, |
| 1531 | "SELECT (pid==0) AS isnew," |
| 1532 | " (fid==0) AS isdel," |
| 1533 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| @@ -1622,18 +1622,18 @@ | |
| 1622 | ** The DATETIME should be in the ISO8601 format. For |
| 1623 | ** examples: "2007-08-18 07:21:21". You can also say "current" |
| 1624 | ** for the current version or "now" for the current time. |
| 1625 | ** |
| 1626 | ** Options: |
| 1627 | ** -f|--showfiles print the list of files changed in a checkin after |
| 1628 | ** the checkin comment. |
| 1629 | ** -n|--limit N display the first N changes (default 20) |
| 1630 | ** -t|--type TYPE only display items from the give types, such as: |
| 1631 | ** ci = file commits only |
| 1632 | ** e = events only |
| 1633 | ** t = tickets only |
| 1634 | ** w = wiki commits only |
| 1635 | */ |
| 1636 | void timeline_cmd(void){ |
| 1637 | Stmt q; |
| 1638 | int n, k; |
| 1639 | const char *zLimit; |
| @@ -1642,12 +1642,15 @@ | |
| 1642 | char *zDate; |
| 1643 | Blob sql; |
| 1644 | int objid = 0; |
| 1645 | Blob uuid; |
| 1646 | int mode = 0 ; /* 0:none 1: before 2:after 3:children 4:parents */ |
| 1647 | int showfilesFlag = 0 ; |
| 1648 | showfilesFlag = find_option("showfiles","f", 0)!=0; |
| 1649 | db_find_and_open_repository(0, 0); |
| 1650 | zLimit = find_option("limit","n",1); |
| 1651 | zType = find_option("type","t",1); |
| 1652 | if ( !zLimit ){ |
| 1653 | zLimit = find_option("count",0,1); |
| @@ -1732,11 +1735,11 @@ | |
| 1732 | blob_appendf(&sql, " AND event.type=%Q ", zType); |
| 1733 | } |
| 1734 | blob_appendf(&sql, " ORDER BY event.mtime DESC"); |
| 1735 | db_prepare(&q, blob_str(&sql)); |
| 1736 | blob_reset(&sql); |
| 1737 | print_timeline(&q, n, showfilesFlag); |
| 1738 | db_finalize(&q); |
| 1739 | } |
| 1740 | |
| 1741 | /* |
| 1742 | ** This is a version of the "localtime()" function from the standard |
| 1743 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1467,11 +1467,11 @@ | |
| 1467 | ** 4. Number of non-merge children |
| 1468 | ** 5. Number of parents |
| 1469 | ** 6. mtime |
| 1470 | ** 7. branch |
| 1471 | */ |
| 1472 | void print_timeline(Stmt *q, int mxLine, int verboseFlag){ |
| 1473 | int nLine = 0; |
| 1474 | char zPrevDate[20]; |
| 1475 | const char *zCurrentUuid=0; |
| 1476 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 1477 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| @@ -1523,11 +1523,11 @@ | |
| 1523 | } |
| 1524 | zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom); |
| 1525 | nLine += comment_print(zFree, 9, 79); |
| 1526 | sqlite3_free(zFree); |
| 1527 | |
| 1528 | if(verboseFlag){ |
| 1529 | if( !fchngQueryInit ){ |
| 1530 | db_prepare(&fchngQuery, |
| 1531 | "SELECT (pid==0) AS isnew," |
| 1532 | " (fid==0) AS isdel," |
| 1533 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| @@ -1622,18 +1622,18 @@ | |
| 1622 | ** The DATETIME should be in the ISO8601 format. For |
| 1623 | ** examples: "2007-08-18 07:21:21". You can also say "current" |
| 1624 | ** for the current version or "now" for the current time. |
| 1625 | ** |
| 1626 | ** Options: |
| 1627 | ** -n|--limit N display the first N changes (default 20) |
| 1628 | ** -t|--type TYPE only display items from the give types, such as: |
| 1629 | ** ci = file commits only |
| 1630 | ** e = events only |
| 1631 | ** t = tickets only |
| 1632 | ** w = wiki commits only |
| 1633 | ** -v|--verbose print the list of files changed in a checkin after |
| 1634 | ** the checkin comment. |
| 1635 | */ |
| 1636 | void timeline_cmd(void){ |
| 1637 | Stmt q; |
| 1638 | int n, k; |
| 1639 | const char *zLimit; |
| @@ -1642,12 +1642,15 @@ | |
| 1642 | char *zDate; |
| 1643 | Blob sql; |
| 1644 | int objid = 0; |
| 1645 | Blob uuid; |
| 1646 | int mode = 0 ; /* 0:none 1: before 2:after 3:children 4:parents */ |
| 1647 | int verboseFlag = 0 ; |
| 1648 | verboseFlag = find_option("verbose","v", 0)!=0; |
| 1649 | if( !verboseFlag){ |
| 1650 | verboseFlag = find_option("showfiles","f", 0)!=0; /* deprecated */ |
| 1651 | } |
| 1652 | db_find_and_open_repository(0, 0); |
| 1653 | zLimit = find_option("limit","n",1); |
| 1654 | zType = find_option("type","t",1); |
| 1655 | if ( !zLimit ){ |
| 1656 | zLimit = find_option("count",0,1); |
| @@ -1732,11 +1735,11 @@ | |
| 1735 | blob_appendf(&sql, " AND event.type=%Q ", zType); |
| 1736 | } |
| 1737 | blob_appendf(&sql, " ORDER BY event.mtime DESC"); |
| 1738 | db_prepare(&q, blob_str(&sql)); |
| 1739 | blob_reset(&sql); |
| 1740 | print_timeline(&q, n, verboseFlag); |
| 1741 | db_finalize(&q); |
| 1742 | } |
| 1743 | |
| 1744 | /* |
| 1745 | ** This is a version of the "localtime()" function from the standard |
| 1746 |