Fossil SCM

Some more -v|--verbose additions. Old options names are deprecated, but still work.

jan.nijtmans 2013-05-15 08:13 trunk merge
Commit e3f7ba556b9e8ca3df670de77aa84fc801d6bab0
+1 -1
--- src/diff.c
+++ src/diff.c
@@ -30,11 +30,11 @@
3030
*/
3131
#define DIFF_CONTEXT_MASK ((u64)0x0000ffff) /* Lines of context. Default if 0 */
3232
#define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */
3333
#define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */
3434
#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 */
3636
#define DIFF_BRIEF ((u64)0x08000000) /* Show filenames only */
3737
#define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */
3838
#define DIFF_HTML ((u64)0x10000000) /* Render for HTML */
3939
#define DIFF_LINENO ((u64)0x20000000) /* Show line numbers */
4040
#define DIFF_WS_WARNING ((u64)0x40000000) /* Warn about whitespace */
4141
--- 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 @@
3030
*/
3131
#define DIFF_CONTEXT_MASK ((u64)0x0000ffff) /* Lines of context. Default if 0 */
3232
#define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */
3333
#define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */
3434
#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 */
3636
#define DIFF_BRIEF ((u64)0x08000000) /* Show filenames only */
3737
#define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */
3838
#define DIFF_HTML ((u64)0x10000000) /* Render for HTML */
3939
#define DIFF_LINENO ((u64)0x20000000) /* Show line numbers */
4040
#define DIFF_WS_WARNING ((u64)0x40000000) /* Warn about whitespace */
4141
--- 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 @@
320320
int vid;
321321
Blob sql;
322322
Stmt q;
323323
int asNewFile; /* Treat non-existant files as empty files */
324324
325
- asNewFile = (diffFlags & DIFF_NEWFILE)!=0;
325
+ asNewFile = (diffFlags & DIFF_VERBOSE)!=0;
326326
vid = db_lget_int("checkout", 0);
327327
vfile_check_signature(vid, CKSIG_ENOTFILE);
328328
blob_zero(&sql);
329329
db_begin_transaction();
330330
if( zFrom ){
@@ -522,11 +522,11 @@
522522
int fIncludeBinary,
523523
u64 diffFlags
524524
){
525525
Manifest *pFrom, *pTo;
526526
ManifestFile *pFromFile, *pToFile;
527
- int asNewFlag = (diffFlags & DIFF_NEWFILE)!=0 ? 1 : 0;
527
+ int asNewFlag = (diffFlags & DIFF_VERBOSE)!=0 ? 1 : 0;
528528
529529
pFrom = manifest_get_by_name(zFrom, 0);
530530
manifest_file_rewind(pFrom);
531531
pFromFile = manifest_file_next(pFrom,0);
532532
pTo = manifest_get_by_name(zTo, 0);
@@ -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
749748
** --side-by-side|-y side-by-side diff
750749
** --tk Launch a Tcl/Tk GUI for display
751750
** --to VERSION select VERSION as target for the diff
752751
** --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
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; /* deprecated */
781
+ }
782
+ if( verboseFlag ) diffFlags |= DIFF_VERBOSE;
780783
781784
if( zBranch ){
782785
if( zTo || zFrom ){
783786
fossil_fatal("cannot use --from or --to with --branch");
784787
}
@@ -834,7 +837,7 @@
834837
login_check_credentials();
835838
if( !g.perm.Read ){ login_needed(); return; }
836839
if( zFrom==0 || zTo==0 ) fossil_redirect_home();
837840
838841
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);
840843
}
841844
--- 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 @@
320320
int vid;
321321
Blob sql;
322322
Stmt q;
323323
int asNewFile; /* Treat non-existant files as empty files */
324324
325
- asNewFile = (diffFlags & DIFF_NEWFILE)!=0;
325
+ asNewFile = (diffFlags & DIFF_VERBOSE)!=0;
326326
vid = db_lget_int("checkout", 0);
327327
vfile_check_signature(vid, CKSIG_ENOTFILE);
328328
blob_zero(&sql);
329329
db_begin_transaction();
330330
if( zFrom ){
@@ -522,11 +522,11 @@
522522
int fIncludeBinary,
523523
u64 diffFlags
524524
){
525525
Manifest *pFrom, *pTo;
526526
ManifestFile *pFromFile, *pToFile;
527
- int asNewFlag = (diffFlags & DIFF_NEWFILE)!=0 ? 1 : 0;
527
+ int asNewFlag = (diffFlags & DIFF_VERBOSE)!=0 ? 1 : 0;
528528
529529
pFrom = manifest_get_by_name(zFrom, 0);
530530
manifest_file_rewind(pFrom);
531531
pFromFile = manifest_file_next(pFrom,0);
532532
pTo = manifest_get_by_name(zTo, 0);
@@ -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
749748
** --side-by-side|-y side-by-side diff
750749
** --tk Launch a Tcl/Tk GUI for display
751750
** --to VERSION select VERSION as target for the diff
752751
** --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
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; /* deprecated */
781
+ }
782
+ if( verboseFlag ) diffFlags |= DIFF_VERBOSE;
780783
781784
if( zBranch ){
782785
if( zTo || zFrom ){
783786
fossil_fatal("cannot use --from or --to with --branch");
784787
}
@@ -834,7 +837,7 @@
834837
login_check_credentials();
835838
if( !g.perm.Read ){ login_needed(); return; }
836839
if( zFrom==0 || zTo==0 ) fossil_redirect_home();
837840
838841
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);
840843
}
841844
--- 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
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -426,11 +426,11 @@
426426
cson_object * pay = NULL;
427427
cson_value * tmp = NULL;
428428
cson_value * listV = NULL;
429429
cson_array * list = NULL;
430430
int check = 0;
431
- char showFiles = -1/*magic number*/;
431
+ char verboseFlag;
432432
Stmt q = empty_Stmt;
433433
char warnRowToJsonFailed = 0;
434434
Blob sql = empty_blob;
435435
if( !g.perm.Hyperlink ){
436436
/* Reminder to self: HTML impl requires 'o' (Read)
@@ -437,11 +437,14 @@
437437
rights.
438438
*/
439439
json_set_err( FSL_JSON_E_DENIED, "Checkin timeline requires 'h' access." );
440440
return NULL;
441441
}
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
+ }
443446
payV = cson_value_new_object();
444447
pay = cson_value_get_object(payV);
445448
check = json_timeline_setup_sql( "ci", &sql, pay );
446449
if(check){
447450
json_set_err(check, "Query initialization failed.");
@@ -470,11 +473,11 @@
470473
tmp = listV;
471474
SET("timeline");
472475
while( (SQLITE_ROW == db_step(&q) )){
473476
/* convert each row into a JSON object...*/
474477
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);
476479
cson_object * row = cson_value_get_object(rowV);
477480
if(!row){
478481
if( !warnRowToJsonFailed ){
479482
warnRowToJsonFailed = 1;
480483
json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED,
481484
--- 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
--- src/merge.c
+++ src/merge.c
@@ -88,10 +88,12 @@
8888
** option overrides the "binary-glob" setting.
8989
**
9090
** --case-sensitive BOOL Override the case-sensitive setting. If false,
9191
** files whose names differ only in case are taken
9292
** to be the same file.
93
+**
94
+** -v|--verbose Show additional details of the merge
9395
**
9496
** -f|--force Force the merge even if it would be a no-op.
9597
**
9698
** -n|--dry-run If given, display instead of run actions
9799
**
98100
--- 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
--- src/merge.c
+++ src/merge.c
@@ -88,10 +88,12 @@
8888
** option overrides the "binary-glob" setting.
8989
**
9090
** --case-sensitive BOOL Override the case-sensitive setting. If false,
9191
** files whose names differ only in case are taken
9292
** to be the same file.
93
+**
94
+** -v|--verbose Show additional details of the merge
9395
**
9496
** -f|--force Force the merge even if it would be a no-op.
9597
**
9698
** -n|--dry-run If given, display instead of run actions
9799
**
98100
--- 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 @@
14671467
** 4. Number of non-merge children
14681468
** 5. Number of parents
14691469
** 6. mtime
14701470
** 7. branch
14711471
*/
1472
-void print_timeline(Stmt *q, int mxLine, int showfiles){
1472
+void print_timeline(Stmt *q, int mxLine, int verboseFlag){
14731473
int nLine = 0;
14741474
char zPrevDate[20];
14751475
const char *zCurrentUuid=0;
14761476
int fchngQueryInit = 0; /* True if fchngQuery is initialized */
14771477
Stmt fchngQuery; /* Query for file changes on check-ins */
@@ -1523,11 +1523,11 @@
15231523
}
15241524
zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom);
15251525
nLine += comment_print(zFree, 9, 79);
15261526
sqlite3_free(zFree);
15271527
1528
- if(showfiles){
1528
+ if(verboseFlag){
15291529
if( !fchngQueryInit ){
15301530
db_prepare(&fchngQuery,
15311531
"SELECT (pid==0) AS isnew,"
15321532
" (fid==0) AS isdel,"
15331533
" (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name,"
@@ -1622,18 +1622,18 @@
16221622
** The DATETIME should be in the ISO8601 format. For
16231623
** examples: "2007-08-18 07:21:21". You can also say "current"
16241624
** for the current version or "now" for the current time.
16251625
**
16261626
** Options:
1627
-** -f|--showfiles print the list of files changed in a checkin after
1628
-** the checkin comment.
16291627
** -n|--limit N display the first N changes (default 20)
16301628
** -t|--type TYPE only display items from the give types, such as:
16311629
** ci = file commits only
16321630
** e = events only
16331631
** t = tickets only
16341632
** w = wiki commits only
1633
+** -v|--verbose print the list of files changed in a checkin after
1634
+** the checkin comment.
16351635
*/
16361636
void timeline_cmd(void){
16371637
Stmt q;
16381638
int n, k;
16391639
const char *zLimit;
@@ -1642,12 +1642,15 @@
16421642
char *zDate;
16431643
Blob sql;
16441644
int objid = 0;
16451645
Blob uuid;
16461646
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
+ }
16491652
db_find_and_open_repository(0, 0);
16501653
zLimit = find_option("limit","n",1);
16511654
zType = find_option("type","t",1);
16521655
if ( !zLimit ){
16531656
zLimit = find_option("count",0,1);
@@ -1732,11 +1735,11 @@
17321735
blob_appendf(&sql, " AND event.type=%Q ", zType);
17331736
}
17341737
blob_appendf(&sql, " ORDER BY event.mtime DESC");
17351738
db_prepare(&q, blob_str(&sql));
17361739
blob_reset(&sql);
1737
- print_timeline(&q, n, showfilesFlag);
1740
+ print_timeline(&q, n, verboseFlag);
17381741
db_finalize(&q);
17391742
}
17401743
17411744
/*
17421745
** This is a version of the "localtime()" function from the standard
17431746
--- 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 @@
14671467
** 4. Number of non-merge children
14681468
** 5. Number of parents
14691469
** 6. mtime
14701470
** 7. branch
14711471
*/
1472
-void print_timeline(Stmt *q, int mxLine, int showfiles){
1472
+void print_timeline(Stmt *q, int mxLine, int verboseFlag){
14731473
int nLine = 0;
14741474
char zPrevDate[20];
14751475
const char *zCurrentUuid=0;
14761476
int fchngQueryInit = 0; /* True if fchngQuery is initialized */
14771477
Stmt fchngQuery; /* Query for file changes on check-ins */
@@ -1523,11 +1523,11 @@
15231523
}
15241524
zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom);
15251525
nLine += comment_print(zFree, 9, 79);
15261526
sqlite3_free(zFree);
15271527
1528
- if(showfiles){
1528
+ if(verboseFlag){
15291529
if( !fchngQueryInit ){
15301530
db_prepare(&fchngQuery,
15311531
"SELECT (pid==0) AS isnew,"
15321532
" (fid==0) AS isdel,"
15331533
" (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name,"
@@ -1622,18 +1622,18 @@
16221622
** The DATETIME should be in the ISO8601 format. For
16231623
** examples: "2007-08-18 07:21:21". You can also say "current"
16241624
** for the current version or "now" for the current time.
16251625
**
16261626
** Options:
1627
-** -f|--showfiles print the list of files changed in a checkin after
1628
-** the checkin comment.
16291627
** -n|--limit N display the first N changes (default 20)
16301628
** -t|--type TYPE only display items from the give types, such as:
16311629
** ci = file commits only
16321630
** e = events only
16331631
** t = tickets only
16341632
** w = wiki commits only
1633
+** -v|--verbose print the list of files changed in a checkin after
1634
+** the checkin comment.
16351635
*/
16361636
void timeline_cmd(void){
16371637
Stmt q;
16381638
int n, k;
16391639
const char *zLimit;
@@ -1642,12 +1642,15 @@
16421642
char *zDate;
16431643
Blob sql;
16441644
int objid = 0;
16451645
Blob uuid;
16461646
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
+ }
16491652
db_find_and_open_repository(0, 0);
16501653
zLimit = find_option("limit","n",1);
16511654
zType = find_option("type","t",1);
16521655
if ( !zLimit ){
16531656
zLimit = find_option("count",0,1);
@@ -1732,11 +1735,11 @@
17321735
blob_appendf(&sql, " AND event.type=%Q ", zType);
17331736
}
17341737
blob_appendf(&sql, " ORDER BY event.mtime DESC");
17351738
db_prepare(&q, blob_str(&sql));
17361739
blob_reset(&sql);
1737
- print_timeline(&q, n, showfilesFlag);
1740
+ print_timeline(&q, n, verboseFlag);
17381741
db_finalize(&q);
17391742
}
17401743
17411744
/*
17421745
** This is a version of the "localtime()" function from the standard
17431746
--- 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

Keyboard Shortcuts

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