Fossil SCM

Merge trunk. Add the "-W|--width WIDTH" option to "fossil timeline". Default is 80.

jan.nijtmans 2013-10-25 12:42 UTC timeline_cmd_dash_n_fix merge
Commit 3710f2ac5bddee0559065866d7f0bd788a4f3799
+15 -8
--- src/checkin.c
+++ src/checkin.c
@@ -990,16 +990,18 @@
990990
const char *zColor; /* Modified value of p->zColor */
991991
992992
assert( pBaseline==0 || pBaseline->zBaseline==0 );
993993
assert( pBaseline==0 || zBaselineUuid!=0 );
994994
blob_zero(pOut);
995
- zParentUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d AND "
996
- "EXISTS(SELECT 1 FROM event WHERE event.type='ci' and event.objid=%d)",
997
- vid, vid);
998
- if( !zParentUuid ){
999
- fossil_fatal("Could not find a valid check-in for RID %d. "
1000
- "Possible checkout/repo mismatch.", vid);
995
+ if( vid ){
996
+ zParentUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d AND "
997
+ "EXISTS(SELECT 1 FROM event WHERE event.type='ci' and event.objid=%d)",
998
+ vid, vid);
999
+ if( !zParentUuid ){
1000
+ fossil_fatal("Could not find a valid check-in for RID %d. "
1001
+ "Possible checkout/repo mismatch.", vid);
1002
+ }
10011003
}
10021004
if( pBaseline ){
10031005
blob_appendf(pOut, "B %s\n", zBaselineUuid);
10041006
manifest_file_rewind(pBaseline);
10051007
pFile = manifest_file_next(pBaseline, 0);
@@ -1091,11 +1093,11 @@
10911093
nFBcard++;
10921094
}
10931095
if( p->zMimetype && p->zMimetype[0] ){
10941096
blob_appendf(pOut, "N %F\n", p->zMimetype);
10951097
}
1096
- if( zParentUuid ){
1098
+ if( vid ){
10971099
blob_appendf(pOut, "P %s", zParentUuid);
10981100
if( p->verifyDate ) checkin_verify_younger(vid, zParentUuid, zDate);
10991101
free(zParentUuid);
11001102
db_prepare(&q, "SELECT merge FROM vmerge WHERE id=0 OR id<-2");
11011103
while( db_step(&q)==SQLITE_ROW ){
@@ -1610,12 +1612,17 @@
16101612
}
16111613
16121614
/*
16131615
** Do not allow a commit that will cause a fork unless the --allow-fork
16141616
** or --force flags is used, or unless this is a private check-in.
1617
+ ** The initial commit MUST have tags "trunk" and "sym-trunk".
16151618
*/
1616
- if( sCiInfo.zBranch==0 && allowFork==0 && forceFlag==0
1619
+ if( !vid ){
1620
+ if( sCiInfo.zBranch==0 ){
1621
+ sCiInfo.zBranch = db_get("main-branch", "trunk");
1622
+ }
1623
+ }else if( sCiInfo.zBranch==0 && allowFork==0 && forceFlag==0
16171624
&& g.markPrivate==0 && !is_a_leaf(vid)
16181625
){
16191626
fossil_fatal("would fork. \"update\" first or use --allow-fork.");
16201627
}
16211628
16221629
--- src/checkin.c
+++ src/checkin.c
@@ -990,16 +990,18 @@
990 const char *zColor; /* Modified value of p->zColor */
991
992 assert( pBaseline==0 || pBaseline->zBaseline==0 );
993 assert( pBaseline==0 || zBaselineUuid!=0 );
994 blob_zero(pOut);
995 zParentUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d AND "
996 "EXISTS(SELECT 1 FROM event WHERE event.type='ci' and event.objid=%d)",
997 vid, vid);
998 if( !zParentUuid ){
999 fossil_fatal("Could not find a valid check-in for RID %d. "
1000 "Possible checkout/repo mismatch.", vid);
 
 
1001 }
1002 if( pBaseline ){
1003 blob_appendf(pOut, "B %s\n", zBaselineUuid);
1004 manifest_file_rewind(pBaseline);
1005 pFile = manifest_file_next(pBaseline, 0);
@@ -1091,11 +1093,11 @@
1091 nFBcard++;
1092 }
1093 if( p->zMimetype && p->zMimetype[0] ){
1094 blob_appendf(pOut, "N %F\n", p->zMimetype);
1095 }
1096 if( zParentUuid ){
1097 blob_appendf(pOut, "P %s", zParentUuid);
1098 if( p->verifyDate ) checkin_verify_younger(vid, zParentUuid, zDate);
1099 free(zParentUuid);
1100 db_prepare(&q, "SELECT merge FROM vmerge WHERE id=0 OR id<-2");
1101 while( db_step(&q)==SQLITE_ROW ){
@@ -1610,12 +1612,17 @@
1610 }
1611
1612 /*
1613 ** Do not allow a commit that will cause a fork unless the --allow-fork
1614 ** or --force flags is used, or unless this is a private check-in.
 
1615 */
1616 if( sCiInfo.zBranch==0 && allowFork==0 && forceFlag==0
 
 
 
 
1617 && g.markPrivate==0 && !is_a_leaf(vid)
1618 ){
1619 fossil_fatal("would fork. \"update\" first or use --allow-fork.");
1620 }
1621
1622
--- src/checkin.c
+++ src/checkin.c
@@ -990,16 +990,18 @@
990 const char *zColor; /* Modified value of p->zColor */
991
992 assert( pBaseline==0 || pBaseline->zBaseline==0 );
993 assert( pBaseline==0 || zBaselineUuid!=0 );
994 blob_zero(pOut);
995 if( vid ){
996 zParentUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d AND "
997 "EXISTS(SELECT 1 FROM event WHERE event.type='ci' and event.objid=%d)",
998 vid, vid);
999 if( !zParentUuid ){
1000 fossil_fatal("Could not find a valid check-in for RID %d. "
1001 "Possible checkout/repo mismatch.", vid);
1002 }
1003 }
1004 if( pBaseline ){
1005 blob_appendf(pOut, "B %s\n", zBaselineUuid);
1006 manifest_file_rewind(pBaseline);
1007 pFile = manifest_file_next(pBaseline, 0);
@@ -1091,11 +1093,11 @@
1093 nFBcard++;
1094 }
1095 if( p->zMimetype && p->zMimetype[0] ){
1096 blob_appendf(pOut, "N %F\n", p->zMimetype);
1097 }
1098 if( vid ){
1099 blob_appendf(pOut, "P %s", zParentUuid);
1100 if( p->verifyDate ) checkin_verify_younger(vid, zParentUuid, zDate);
1101 free(zParentUuid);
1102 db_prepare(&q, "SELECT merge FROM vmerge WHERE id=0 OR id<-2");
1103 while( db_step(&q)==SQLITE_ROW ){
@@ -1610,12 +1612,17 @@
1612 }
1613
1614 /*
1615 ** Do not allow a commit that will cause a fork unless the --allow-fork
1616 ** or --force flags is used, or unless this is a private check-in.
1617 ** The initial commit MUST have tags "trunk" and "sym-trunk".
1618 */
1619 if( !vid ){
1620 if( sCiInfo.zBranch==0 ){
1621 sCiInfo.zBranch = db_get("main-branch", "trunk");
1622 }
1623 }else if( sCiInfo.zBranch==0 && allowFork==0 && forceFlag==0
1624 && g.markPrivate==0 && !is_a_leaf(vid)
1625 ){
1626 fossil_fatal("would fork. \"update\" first or use --allow-fork.");
1627 }
1628
1629
+3 -4
--- src/comformat.c
+++ src/comformat.c
@@ -26,31 +26,30 @@
2626
** Given a comment string zText, format that string for printing
2727
** on a TTY. Assume that the output cursors is indent spaces from
2828
** the left margin and that a single line can contain no more than
2929
** lineLength characters. Indent all subsequent lines by indent.
3030
**
31
-** lineLength must be less than 400.
32
-**
3331
** Return the number of newlines that are output.
3432
*/
3533
int comment_print(const char *zText, int indent, int lineLength){
3634
int tlen = lineLength - indent;
3735
int si, sk, i, k;
3836
int doIndent = 0;
39
- char zBuf[400];
37
+ char *zBuf = fossil_malloc(strlen(zText)+400);
4038
int lineCnt = 0;
4139
4240
for(;;){
4341
while( fossil_isspace(zText[0]) ){ zText++; }
4442
if( zText[0]==0 ){
4543
if( doIndent==0 ){
4644
fossil_print("\n");
4745
lineCnt = 1;
4846
}
47
+ fossil_free(zBuf);
4948
return lineCnt;
5049
}
51
- for(sk=si=i=k=0; zText[i] && k<tlen; i++){
50
+ for(sk=si=i=k=0; zText[i] && ((tlen<=0)||(k<tlen)); i++){
5251
char c = zText[i];
5352
if( fossil_isspace(c) ){
5453
si = i;
5554
sk = k;
5655
if( k==0 || zBuf[k-1]!=' ' ){
5756
--- src/comformat.c
+++ src/comformat.c
@@ -26,31 +26,30 @@
26 ** Given a comment string zText, format that string for printing
27 ** on a TTY. Assume that the output cursors is indent spaces from
28 ** the left margin and that a single line can contain no more than
29 ** lineLength characters. Indent all subsequent lines by indent.
30 **
31 ** lineLength must be less than 400.
32 **
33 ** Return the number of newlines that are output.
34 */
35 int comment_print(const char *zText, int indent, int lineLength){
36 int tlen = lineLength - indent;
37 int si, sk, i, k;
38 int doIndent = 0;
39 char zBuf[400];
40 int lineCnt = 0;
41
42 for(;;){
43 while( fossil_isspace(zText[0]) ){ zText++; }
44 if( zText[0]==0 ){
45 if( doIndent==0 ){
46 fossil_print("\n");
47 lineCnt = 1;
48 }
 
49 return lineCnt;
50 }
51 for(sk=si=i=k=0; zText[i] && k<tlen; i++){
52 char c = zText[i];
53 if( fossil_isspace(c) ){
54 si = i;
55 sk = k;
56 if( k==0 || zBuf[k-1]!=' ' ){
57
--- src/comformat.c
+++ src/comformat.c
@@ -26,31 +26,30 @@
26 ** Given a comment string zText, format that string for printing
27 ** on a TTY. Assume that the output cursors is indent spaces from
28 ** the left margin and that a single line can contain no more than
29 ** lineLength characters. Indent all subsequent lines by indent.
30 **
 
 
31 ** Return the number of newlines that are output.
32 */
33 int comment_print(const char *zText, int indent, int lineLength){
34 int tlen = lineLength - indent;
35 int si, sk, i, k;
36 int doIndent = 0;
37 char *zBuf = fossil_malloc(strlen(zText)+400);
38 int lineCnt = 0;
39
40 for(;;){
41 while( fossil_isspace(zText[0]) ){ zText++; }
42 if( zText[0]==0 ){
43 if( doIndent==0 ){
44 fossil_print("\n");
45 lineCnt = 1;
46 }
47 fossil_free(zBuf);
48 return lineCnt;
49 }
50 for(sk=si=i=k=0; zText[i] && ((tlen<=0)||(k<tlen)); i++){
51 char c = zText[i];
52 if( fossil_isspace(c) ){
53 si = i;
54 sk = k;
55 if( k==0 || zBuf[k-1]!=' ' ){
56
+3 -4
--- src/comformat.c
+++ src/comformat.c
@@ -26,31 +26,30 @@
2626
** Given a comment string zText, format that string for printing
2727
** on a TTY. Assume that the output cursors is indent spaces from
2828
** the left margin and that a single line can contain no more than
2929
** lineLength characters. Indent all subsequent lines by indent.
3030
**
31
-** lineLength must be less than 400.
32
-**
3331
** Return the number of newlines that are output.
3432
*/
3533
int comment_print(const char *zText, int indent, int lineLength){
3634
int tlen = lineLength - indent;
3735
int si, sk, i, k;
3836
int doIndent = 0;
39
- char zBuf[400];
37
+ char *zBuf = fossil_malloc(strlen(zText)+400);
4038
int lineCnt = 0;
4139
4240
for(;;){
4341
while( fossil_isspace(zText[0]) ){ zText++; }
4442
if( zText[0]==0 ){
4543
if( doIndent==0 ){
4644
fossil_print("\n");
4745
lineCnt = 1;
4846
}
47
+ fossil_free(zBuf);
4948
return lineCnt;
5049
}
51
- for(sk=si=i=k=0; zText[i] && k<tlen; i++){
50
+ for(sk=si=i=k=0; zText[i] && ((tlen<=0)||(k<tlen)); i++){
5251
char c = zText[i];
5352
if( fossil_isspace(c) ){
5453
si = i;
5554
sk = k;
5655
if( k==0 || zBuf[k-1]!=' ' ){
5756
--- src/comformat.c
+++ src/comformat.c
@@ -26,31 +26,30 @@
26 ** Given a comment string zText, format that string for printing
27 ** on a TTY. Assume that the output cursors is indent spaces from
28 ** the left margin and that a single line can contain no more than
29 ** lineLength characters. Indent all subsequent lines by indent.
30 **
31 ** lineLength must be less than 400.
32 **
33 ** Return the number of newlines that are output.
34 */
35 int comment_print(const char *zText, int indent, int lineLength){
36 int tlen = lineLength - indent;
37 int si, sk, i, k;
38 int doIndent = 0;
39 char zBuf[400];
40 int lineCnt = 0;
41
42 for(;;){
43 while( fossil_isspace(zText[0]) ){ zText++; }
44 if( zText[0]==0 ){
45 if( doIndent==0 ){
46 fossil_print("\n");
47 lineCnt = 1;
48 }
 
49 return lineCnt;
50 }
51 for(sk=si=i=k=0; zText[i] && k<tlen; i++){
52 char c = zText[i];
53 if( fossil_isspace(c) ){
54 si = i;
55 sk = k;
56 if( k==0 || zBuf[k-1]!=' ' ){
57
--- src/comformat.c
+++ src/comformat.c
@@ -26,31 +26,30 @@
26 ** Given a comment string zText, format that string for printing
27 ** on a TTY. Assume that the output cursors is indent spaces from
28 ** the left margin and that a single line can contain no more than
29 ** lineLength characters. Indent all subsequent lines by indent.
30 **
 
 
31 ** Return the number of newlines that are output.
32 */
33 int comment_print(const char *zText, int indent, int lineLength){
34 int tlen = lineLength - indent;
35 int si, sk, i, k;
36 int doIndent = 0;
37 char *zBuf = fossil_malloc(strlen(zText)+400);
38 int lineCnt = 0;
39
40 for(;;){
41 while( fossil_isspace(zText[0]) ){ zText++; }
42 if( zText[0]==0 ){
43 if( doIndent==0 ){
44 fossil_print("\n");
45 lineCnt = 1;
46 }
47 fossil_free(zBuf);
48 return lineCnt;
49 }
50 for(sk=si=i=k=0; zText[i] && ((tlen<=0)||(k<tlen)); i++){
51 char c = zText[i];
52 if( fossil_isspace(c) ){
53 si = i;
54 sk = k;
55 if( k==0 || zBuf[k-1]!=' ' ){
56
+2 -2
--- src/config.h
+++ src/config.h
@@ -25,12 +25,12 @@
2525
#ifndef _FILE_OFFSET_BITS
2626
# define _FILE_OFFSET_BITS 64
2727
#endif
2828
#define _LARGEFILE_SOURCE 1
2929
30
-/* Make sure that in Win32 builds, _USE_32BIT_TIME_T is always defined. */
31
-#if defined(_WIN32) && !defined(_WIN64) && !defined(_USE_32BIT_TIME_T)
30
+/* Make sure that in Win32 MinGW builds, _USE_32BIT_TIME_T is always defined. */
31
+#if defined(_WIN32) && !defined(_WIN64) && !defined(_MSC_VER) && !defined(_USE_32BIT_TIME_T)
3232
# define _USE_32BIT_TIME_T
3333
#endif
3434
3535
#ifdef HAVE_AUTOCONFIG_H
3636
#include "autoconfig.h"
3737
--- src/config.h
+++ src/config.h
@@ -25,12 +25,12 @@
25 #ifndef _FILE_OFFSET_BITS
26 # define _FILE_OFFSET_BITS 64
27 #endif
28 #define _LARGEFILE_SOURCE 1
29
30 /* Make sure that in Win32 builds, _USE_32BIT_TIME_T is always defined. */
31 #if defined(_WIN32) && !defined(_WIN64) && !defined(_USE_32BIT_TIME_T)
32 # define _USE_32BIT_TIME_T
33 #endif
34
35 #ifdef HAVE_AUTOCONFIG_H
36 #include "autoconfig.h"
37
--- src/config.h
+++ src/config.h
@@ -25,12 +25,12 @@
25 #ifndef _FILE_OFFSET_BITS
26 # define _FILE_OFFSET_BITS 64
27 #endif
28 #define _LARGEFILE_SOURCE 1
29
30 /* Make sure that in Win32 MinGW builds, _USE_32BIT_TIME_T is always defined. */
31 #if defined(_WIN32) && !defined(_WIN64) && !defined(_MSC_VER) && !defined(_USE_32BIT_TIME_T)
32 # define _USE_32BIT_TIME_T
33 #endif
34
35 #ifdef HAVE_AUTOCONFIG_H
36 #include "autoconfig.h"
37
--- src/descendants.c
+++ src/descendants.c
@@ -329,11 +329,11 @@
329329
"%s"
330330
" AND event.objid IN (SELECT rid FROM leaves)"
331331
" ORDER BY event.mtime DESC",
332332
timeline_query_for_tty()
333333
);
334
- print_timeline(&q, -20, 0);
334
+ print_timeline(&q, -20, 80, 0);
335335
db_finalize(&q);
336336
}
337337
338338
/*
339339
** COMMAND: leaves*
340340
--- src/descendants.c
+++ src/descendants.c
@@ -329,11 +329,11 @@
329 "%s"
330 " AND event.objid IN (SELECT rid FROM leaves)"
331 " ORDER BY event.mtime DESC",
332 timeline_query_for_tty()
333 );
334 print_timeline(&q, -20, 0);
335 db_finalize(&q);
336 }
337
338 /*
339 ** COMMAND: leaves*
340
--- src/descendants.c
+++ src/descendants.c
@@ -329,11 +329,11 @@
329 "%s"
330 " AND event.objid IN (SELECT rid FROM leaves)"
331 " ORDER BY event.mtime DESC",
332 timeline_query_for_tty()
333 );
334 print_timeline(&q, -20, 80, 0);
335 db_finalize(&q);
336 }
337
338 /*
339 ** COMMAND: leaves*
340
--- src/descendants.c
+++ src/descendants.c
@@ -329,11 +329,11 @@
329329
"%s"
330330
" AND event.objid IN (SELECT rid FROM leaves)"
331331
" ORDER BY event.mtime DESC",
332332
timeline_query_for_tty()
333333
);
334
- print_timeline(&q, -20, 0);
334
+ print_timeline(&q, -20, 80, 0);
335335
db_finalize(&q);
336336
}
337337
338338
/*
339339
** COMMAND: leaves*
340340
--- src/descendants.c
+++ src/descendants.c
@@ -329,11 +329,11 @@
329 "%s"
330 " AND event.objid IN (SELECT rid FROM leaves)"
331 " ORDER BY event.mtime DESC",
332 timeline_query_for_tty()
333 );
334 print_timeline(&q, -20, 0);
335 db_finalize(&q);
336 }
337
338 /*
339 ** COMMAND: leaves*
340
--- src/descendants.c
+++ src/descendants.c
@@ -329,11 +329,11 @@
329 "%s"
330 " AND event.objid IN (SELECT rid FROM leaves)"
331 " ORDER BY event.mtime DESC",
332 timeline_query_for_tty()
333 );
334 print_timeline(&q, -20, 80, 0);
335 db_finalize(&q);
336 }
337
338 /*
339 ** COMMAND: leaves*
340
+1 -1
--- src/search.c
+++ src/search.c
@@ -222,8 +222,8 @@
222222
blob_appendf(&sql,"AND x>%d ", iBest/3);
223223
}
224224
blob_append(&sql, "ORDER BY x DESC, date DESC ", -1);
225225
db_prepare(&q, blob_str(&sql));
226226
blob_reset(&sql);
227
- print_timeline(&q, nLimit, 0);
227
+ print_timeline(&q, nLimit, 80, 0);
228228
db_finalize(&q);
229229
}
230230
--- src/search.c
+++ src/search.c
@@ -222,8 +222,8 @@
222 blob_appendf(&sql,"AND x>%d ", iBest/3);
223 }
224 blob_append(&sql, "ORDER BY x DESC, date DESC ", -1);
225 db_prepare(&q, blob_str(&sql));
226 blob_reset(&sql);
227 print_timeline(&q, nLimit, 0);
228 db_finalize(&q);
229 }
230
--- src/search.c
+++ src/search.c
@@ -222,8 +222,8 @@
222 blob_appendf(&sql,"AND x>%d ", iBest/3);
223 }
224 blob_append(&sql, "ORDER BY x DESC, date DESC ", -1);
225 db_prepare(&q, blob_str(&sql));
226 blob_reset(&sql);
227 print_timeline(&q, nLimit, 80, 0);
228 db_finalize(&q);
229 }
230
+1 -1
--- src/search.c
+++ src/search.c
@@ -222,8 +222,8 @@
222222
blob_appendf(&sql,"AND x>%d ", iBest/3);
223223
}
224224
blob_append(&sql, "ORDER BY x DESC, date DESC ", -1);
225225
db_prepare(&q, blob_str(&sql));
226226
blob_reset(&sql);
227
- print_timeline(&q, nLimit, 0);
227
+ print_timeline(&q, nLimit, 80, 0);
228228
db_finalize(&q);
229229
}
230230
--- src/search.c
+++ src/search.c
@@ -222,8 +222,8 @@
222 blob_appendf(&sql,"AND x>%d ", iBest/3);
223 }
224 blob_append(&sql, "ORDER BY x DESC, date DESC ", -1);
225 db_prepare(&q, blob_str(&sql));
226 blob_reset(&sql);
227 print_timeline(&q, nLimit, 0);
228 db_finalize(&q);
229 }
230
--- src/search.c
+++ src/search.c
@@ -222,8 +222,8 @@
222 blob_appendf(&sql,"AND x>%d ", iBest/3);
223 }
224 blob_append(&sql, "ORDER BY x DESC, date DESC ", -1);
225 db_prepare(&q, blob_str(&sql));
226 blob_reset(&sql);
227 print_timeline(&q, nLimit, 80, 0);
228 db_finalize(&q);
229 }
230
+1 -1
--- src/tag.c
+++ src/tag.c
@@ -469,11 +469,11 @@
469469
" ORDER BY event.mtime DESC",
470470
timeline_query_for_tty(), zType, tagid
471471
);
472472
db_prepare(&q, "%s", blob_str(&sql));
473473
blob_reset(&sql);
474
- print_timeline(&q, nFindLimit, 0);
474
+ print_timeline(&q, nFindLimit, 80, 0);
475475
db_finalize(&q);
476476
}
477477
}
478478
}else
479479
480480
--- src/tag.c
+++ src/tag.c
@@ -469,11 +469,11 @@
469 " ORDER BY event.mtime DESC",
470 timeline_query_for_tty(), zType, tagid
471 );
472 db_prepare(&q, "%s", blob_str(&sql));
473 blob_reset(&sql);
474 print_timeline(&q, nFindLimit, 0);
475 db_finalize(&q);
476 }
477 }
478 }else
479
480
--- src/tag.c
+++ src/tag.c
@@ -469,11 +469,11 @@
469 " ORDER BY event.mtime DESC",
470 timeline_query_for_tty(), zType, tagid
471 );
472 db_prepare(&q, "%s", blob_str(&sql));
473 blob_reset(&sql);
474 print_timeline(&q, nFindLimit, 80, 0);
475 db_finalize(&q);
476 }
477 }
478 }else
479
480
+1 -1
--- src/tag.c
+++ src/tag.c
@@ -469,11 +469,11 @@
469469
" ORDER BY event.mtime DESC",
470470
timeline_query_for_tty(), zType, tagid
471471
);
472472
db_prepare(&q, "%s", blob_str(&sql));
473473
blob_reset(&sql);
474
- print_timeline(&q, nFindLimit, 0);
474
+ print_timeline(&q, nFindLimit, 80, 0);
475475
db_finalize(&q);
476476
}
477477
}
478478
}else
479479
480480
--- src/tag.c
+++ src/tag.c
@@ -469,11 +469,11 @@
469 " ORDER BY event.mtime DESC",
470 timeline_query_for_tty(), zType, tagid
471 );
472 db_prepare(&q, "%s", blob_str(&sql));
473 blob_reset(&sql);
474 print_timeline(&q, nFindLimit, 0);
475 db_finalize(&q);
476 }
477 }
478 }else
479
480
--- src/tag.c
+++ src/tag.c
@@ -469,11 +469,11 @@
469 " ORDER BY event.mtime DESC",
470 timeline_query_for_tty(), zType, tagid
471 );
472 db_prepare(&q, "%s", blob_str(&sql));
473 blob_reset(&sql);
474 print_timeline(&q, nFindLimit, 80, 0);
475 db_finalize(&q);
476 }
477 }
478 }else
479
480
+14 -6
--- src/timeline.c
+++ src/timeline.c
@@ -1513,11 +1513,11 @@
15131513
** 4. Number of non-merge children
15141514
** 5. Number of parents
15151515
** 6. mtime
15161516
** 7. branch
15171517
*/
1518
-void print_timeline(Stmt *q, int nLimit, int verboseFlag){
1518
+void print_timeline(Stmt *q, int nLimit, int width, int verboseFlag){
15191519
int nAbsLimit = (nLimit >= 0) ? nLimit : -nLimit;
15201520
int nLine = 0;
15211521
int nEntry = 0;
15221522
char zPrevDate[20];
15231523
const char *zCurrentUuid=0;
@@ -1577,11 +1577,11 @@
15771577
if( fossil_strcmp(zCurrentUuid,zId)==0 ){
15781578
sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*CURRENT* ");
15791579
n += strlen(zPrefix);
15801580
}
15811581
zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom);
1582
- nLine += comment_print(zFree, 9, 79); /* record another X lines */
1582
+ nLine += comment_print(zFree, 9, width-1); /* record another X lines */
15831583
sqlite3_free(zFree);
15841584
15851585
if(verboseFlag){
15861586
if( !fchngQueryInit ){
15871587
db_prepare(&fchngQuery,
@@ -1681,24 +1681,26 @@
16811681
** The DATETIME should be in the ISO8601 format. For
16821682
** examples: "2007-08-18 07:21:21". You can also say "current"
16831683
** for the current version or "now" for the current time.
16841684
**
16851685
** Options:
1686
-** -n|--limit N Output the first N changes (default 20)
1686
+** -n|--limit N Output the first N entries (default 20 lines)
16871687
** -t|--type TYPE Output items from the given types only, such as:
16881688
** ci = file commits only
16891689
** e = events only
16901690
** t = tickets only
16911691
** w = wiki commits only
16921692
** -v|--verbose Output the list of files changed by each commit
16931693
** and the type of each change (edited, deleted,
16941694
** etc.) after the checkin comment.
1695
+** -W|--width <num> With of lines (default 80). 0=no limit.
16951696
*/
16961697
void timeline_cmd(void){
16971698
Stmt q;
1698
- int n, k;
1699
+ int n, k, width;
16991700
const char *zLimit;
1701
+ const char *zWidth;
17001702
const char *zType;
17011703
char *zOrigin;
17021704
char *zDate;
17031705
Blob sql;
17041706
int objid = 0;
@@ -1709,18 +1711,24 @@
17091711
if( !verboseFlag){
17101712
verboseFlag = find_option("showfiles","f", 0)!=0; /* deprecated */
17111713
}
17121714
db_find_and_open_repository(0, 0);
17131715
zLimit = find_option("limit","n",1);
1716
+ zWidth = find_option("width","W",1);
17141717
zType = find_option("type","t",1);
17151718
if ( !zLimit ){
17161719
zLimit = find_option("count",0,1);
17171720
}
17181721
if( zLimit ){
17191722
n = atoi(zLimit);
17201723
}else{
17211724
n = -20;
1725
+ }
1726
+ if( zWidth ){
1727
+ width = atoi(zWidth);
1728
+ }else{
1729
+ width = 80;
17221730
}
17231731
if( g.argc>=4 ){
17241732
k = strlen(g.argv[2]);
17251733
if( strncmp(g.argv[2],"before",k)==0 ){
17261734
mode = 1;
@@ -1733,11 +1741,11 @@
17331741
}else if( strncmp(g.argv[2],"ancestors",k)==0 && k>1 ){
17341742
mode = 4;
17351743
}else if( strncmp(g.argv[2],"parents",k)==0 ){
17361744
mode = 4;
17371745
}else if(!zType && !zLimit){
1738
- usage("?WHEN? ?BASELINE|DATETIME? ?-n|--limit N? ?-t|--type TYPE?");
1746
+ usage("?WHEN? ?BASELINE|DATETIME? ?-n|--limit N? ?-t|--type TYPE? ?-W|--width WIDTH?");
17391747
}
17401748
if( '-' != *g.argv[3] ){
17411749
zOrigin = g.argv[3];
17421750
}else{
17431751
zOrigin = "now";
@@ -1795,11 +1803,11 @@
17951803
blob_appendf(&sql, " AND event.type=%Q ", zType);
17961804
}
17971805
blob_appendf(&sql, " ORDER BY event.mtime DESC");
17981806
db_prepare(&q, blob_str(&sql));
17991807
blob_reset(&sql);
1800
- print_timeline(&q, n, verboseFlag);
1808
+ print_timeline(&q, n, width, verboseFlag);
18011809
db_finalize(&q);
18021810
}
18031811
18041812
/*
18051813
** This is a version of the "localtime()" function from the standard
18061814
--- src/timeline.c
+++ src/timeline.c
@@ -1513,11 +1513,11 @@
1513 ** 4. Number of non-merge children
1514 ** 5. Number of parents
1515 ** 6. mtime
1516 ** 7. branch
1517 */
1518 void print_timeline(Stmt *q, int nLimit, int verboseFlag){
1519 int nAbsLimit = (nLimit >= 0) ? nLimit : -nLimit;
1520 int nLine = 0;
1521 int nEntry = 0;
1522 char zPrevDate[20];
1523 const char *zCurrentUuid=0;
@@ -1577,11 +1577,11 @@
1577 if( fossil_strcmp(zCurrentUuid,zId)==0 ){
1578 sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*CURRENT* ");
1579 n += strlen(zPrefix);
1580 }
1581 zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom);
1582 nLine += comment_print(zFree, 9, 79); /* record another X lines */
1583 sqlite3_free(zFree);
1584
1585 if(verboseFlag){
1586 if( !fchngQueryInit ){
1587 db_prepare(&fchngQuery,
@@ -1681,24 +1681,26 @@
1681 ** The DATETIME should be in the ISO8601 format. For
1682 ** examples: "2007-08-18 07:21:21". You can also say "current"
1683 ** for the current version or "now" for the current time.
1684 **
1685 ** Options:
1686 ** -n|--limit N Output the first N changes (default 20)
1687 ** -t|--type TYPE Output items from the given types only, such as:
1688 ** ci = file commits only
1689 ** e = events only
1690 ** t = tickets only
1691 ** w = wiki commits only
1692 ** -v|--verbose Output the list of files changed by each commit
1693 ** and the type of each change (edited, deleted,
1694 ** etc.) after the checkin comment.
 
1695 */
1696 void timeline_cmd(void){
1697 Stmt q;
1698 int n, k;
1699 const char *zLimit;
 
1700 const char *zType;
1701 char *zOrigin;
1702 char *zDate;
1703 Blob sql;
1704 int objid = 0;
@@ -1709,18 +1711,24 @@
1709 if( !verboseFlag){
1710 verboseFlag = find_option("showfiles","f", 0)!=0; /* deprecated */
1711 }
1712 db_find_and_open_repository(0, 0);
1713 zLimit = find_option("limit","n",1);
 
1714 zType = find_option("type","t",1);
1715 if ( !zLimit ){
1716 zLimit = find_option("count",0,1);
1717 }
1718 if( zLimit ){
1719 n = atoi(zLimit);
1720 }else{
1721 n = -20;
 
 
 
 
 
1722 }
1723 if( g.argc>=4 ){
1724 k = strlen(g.argv[2]);
1725 if( strncmp(g.argv[2],"before",k)==0 ){
1726 mode = 1;
@@ -1733,11 +1741,11 @@
1733 }else if( strncmp(g.argv[2],"ancestors",k)==0 && k>1 ){
1734 mode = 4;
1735 }else if( strncmp(g.argv[2],"parents",k)==0 ){
1736 mode = 4;
1737 }else if(!zType && !zLimit){
1738 usage("?WHEN? ?BASELINE|DATETIME? ?-n|--limit N? ?-t|--type TYPE?");
1739 }
1740 if( '-' != *g.argv[3] ){
1741 zOrigin = g.argv[3];
1742 }else{
1743 zOrigin = "now";
@@ -1795,11 +1803,11 @@
1795 blob_appendf(&sql, " AND event.type=%Q ", zType);
1796 }
1797 blob_appendf(&sql, " ORDER BY event.mtime DESC");
1798 db_prepare(&q, blob_str(&sql));
1799 blob_reset(&sql);
1800 print_timeline(&q, n, verboseFlag);
1801 db_finalize(&q);
1802 }
1803
1804 /*
1805 ** This is a version of the "localtime()" function from the standard
1806
--- src/timeline.c
+++ src/timeline.c
@@ -1513,11 +1513,11 @@
1513 ** 4. Number of non-merge children
1514 ** 5. Number of parents
1515 ** 6. mtime
1516 ** 7. branch
1517 */
1518 void print_timeline(Stmt *q, int nLimit, int width, int verboseFlag){
1519 int nAbsLimit = (nLimit >= 0) ? nLimit : -nLimit;
1520 int nLine = 0;
1521 int nEntry = 0;
1522 char zPrevDate[20];
1523 const char *zCurrentUuid=0;
@@ -1577,11 +1577,11 @@
1577 if( fossil_strcmp(zCurrentUuid,zId)==0 ){
1578 sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*CURRENT* ");
1579 n += strlen(zPrefix);
1580 }
1581 zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom);
1582 nLine += comment_print(zFree, 9, width-1); /* record another X lines */
1583 sqlite3_free(zFree);
1584
1585 if(verboseFlag){
1586 if( !fchngQueryInit ){
1587 db_prepare(&fchngQuery,
@@ -1681,24 +1681,26 @@
1681 ** The DATETIME should be in the ISO8601 format. For
1682 ** examples: "2007-08-18 07:21:21". You can also say "current"
1683 ** for the current version or "now" for the current time.
1684 **
1685 ** Options:
1686 ** -n|--limit N Output the first N entries (default 20 lines)
1687 ** -t|--type TYPE Output items from the given types only, such as:
1688 ** ci = file commits only
1689 ** e = events only
1690 ** t = tickets only
1691 ** w = wiki commits only
1692 ** -v|--verbose Output the list of files changed by each commit
1693 ** and the type of each change (edited, deleted,
1694 ** etc.) after the checkin comment.
1695 ** -W|--width <num> With of lines (default 80). 0=no limit.
1696 */
1697 void timeline_cmd(void){
1698 Stmt q;
1699 int n, k, width;
1700 const char *zLimit;
1701 const char *zWidth;
1702 const char *zType;
1703 char *zOrigin;
1704 char *zDate;
1705 Blob sql;
1706 int objid = 0;
@@ -1709,18 +1711,24 @@
1711 if( !verboseFlag){
1712 verboseFlag = find_option("showfiles","f", 0)!=0; /* deprecated */
1713 }
1714 db_find_and_open_repository(0, 0);
1715 zLimit = find_option("limit","n",1);
1716 zWidth = find_option("width","W",1);
1717 zType = find_option("type","t",1);
1718 if ( !zLimit ){
1719 zLimit = find_option("count",0,1);
1720 }
1721 if( zLimit ){
1722 n = atoi(zLimit);
1723 }else{
1724 n = -20;
1725 }
1726 if( zWidth ){
1727 width = atoi(zWidth);
1728 }else{
1729 width = 80;
1730 }
1731 if( g.argc>=4 ){
1732 k = strlen(g.argv[2]);
1733 if( strncmp(g.argv[2],"before",k)==0 ){
1734 mode = 1;
@@ -1733,11 +1741,11 @@
1741 }else if( strncmp(g.argv[2],"ancestors",k)==0 && k>1 ){
1742 mode = 4;
1743 }else if( strncmp(g.argv[2],"parents",k)==0 ){
1744 mode = 4;
1745 }else if(!zType && !zLimit){
1746 usage("?WHEN? ?BASELINE|DATETIME? ?-n|--limit N? ?-t|--type TYPE? ?-W|--width WIDTH?");
1747 }
1748 if( '-' != *g.argv[3] ){
1749 zOrigin = g.argv[3];
1750 }else{
1751 zOrigin = "now";
@@ -1795,11 +1803,11 @@
1803 blob_appendf(&sql, " AND event.type=%Q ", zType);
1804 }
1805 blob_appendf(&sql, " ORDER BY event.mtime DESC");
1806 db_prepare(&q, blob_str(&sql));
1807 blob_reset(&sql);
1808 print_timeline(&q, n, width, verboseFlag);
1809 db_finalize(&q);
1810 }
1811
1812 /*
1813 ** This is a version of the "localtime()" function from the standard
1814
+14 -6
--- src/timeline.c
+++ src/timeline.c
@@ -1513,11 +1513,11 @@
15131513
** 4. Number of non-merge children
15141514
** 5. Number of parents
15151515
** 6. mtime
15161516
** 7. branch
15171517
*/
1518
-void print_timeline(Stmt *q, int nLimit, int verboseFlag){
1518
+void print_timeline(Stmt *q, int nLimit, int width, int verboseFlag){
15191519
int nAbsLimit = (nLimit >= 0) ? nLimit : -nLimit;
15201520
int nLine = 0;
15211521
int nEntry = 0;
15221522
char zPrevDate[20];
15231523
const char *zCurrentUuid=0;
@@ -1577,11 +1577,11 @@
15771577
if( fossil_strcmp(zCurrentUuid,zId)==0 ){
15781578
sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*CURRENT* ");
15791579
n += strlen(zPrefix);
15801580
}
15811581
zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom);
1582
- nLine += comment_print(zFree, 9, 79); /* record another X lines */
1582
+ nLine += comment_print(zFree, 9, width-1); /* record another X lines */
15831583
sqlite3_free(zFree);
15841584
15851585
if(verboseFlag){
15861586
if( !fchngQueryInit ){
15871587
db_prepare(&fchngQuery,
@@ -1681,24 +1681,26 @@
16811681
** The DATETIME should be in the ISO8601 format. For
16821682
** examples: "2007-08-18 07:21:21". You can also say "current"
16831683
** for the current version or "now" for the current time.
16841684
**
16851685
** Options:
1686
-** -n|--limit N Output the first N changes (default 20)
1686
+** -n|--limit N Output the first N entries (default 20 lines)
16871687
** -t|--type TYPE Output items from the given types only, such as:
16881688
** ci = file commits only
16891689
** e = events only
16901690
** t = tickets only
16911691
** w = wiki commits only
16921692
** -v|--verbose Output the list of files changed by each commit
16931693
** and the type of each change (edited, deleted,
16941694
** etc.) after the checkin comment.
1695
+** -W|--width <num> With of lines (default 80). 0=no limit.
16951696
*/
16961697
void timeline_cmd(void){
16971698
Stmt q;
1698
- int n, k;
1699
+ int n, k, width;
16991700
const char *zLimit;
1701
+ const char *zWidth;
17001702
const char *zType;
17011703
char *zOrigin;
17021704
char *zDate;
17031705
Blob sql;
17041706
int objid = 0;
@@ -1709,18 +1711,24 @@
17091711
if( !verboseFlag){
17101712
verboseFlag = find_option("showfiles","f", 0)!=0; /* deprecated */
17111713
}
17121714
db_find_and_open_repository(0, 0);
17131715
zLimit = find_option("limit","n",1);
1716
+ zWidth = find_option("width","W",1);
17141717
zType = find_option("type","t",1);
17151718
if ( !zLimit ){
17161719
zLimit = find_option("count",0,1);
17171720
}
17181721
if( zLimit ){
17191722
n = atoi(zLimit);
17201723
}else{
17211724
n = -20;
1725
+ }
1726
+ if( zWidth ){
1727
+ width = atoi(zWidth);
1728
+ }else{
1729
+ width = 80;
17221730
}
17231731
if( g.argc>=4 ){
17241732
k = strlen(g.argv[2]);
17251733
if( strncmp(g.argv[2],"before",k)==0 ){
17261734
mode = 1;
@@ -1733,11 +1741,11 @@
17331741
}else if( strncmp(g.argv[2],"ancestors",k)==0 && k>1 ){
17341742
mode = 4;
17351743
}else if( strncmp(g.argv[2],"parents",k)==0 ){
17361744
mode = 4;
17371745
}else if(!zType && !zLimit){
1738
- usage("?WHEN? ?BASELINE|DATETIME? ?-n|--limit N? ?-t|--type TYPE?");
1746
+ usage("?WHEN? ?BASELINE|DATETIME? ?-n|--limit N? ?-t|--type TYPE? ?-W|--width WIDTH?");
17391747
}
17401748
if( '-' != *g.argv[3] ){
17411749
zOrigin = g.argv[3];
17421750
}else{
17431751
zOrigin = "now";
@@ -1795,11 +1803,11 @@
17951803
blob_appendf(&sql, " AND event.type=%Q ", zType);
17961804
}
17971805
blob_appendf(&sql, " ORDER BY event.mtime DESC");
17981806
db_prepare(&q, blob_str(&sql));
17991807
blob_reset(&sql);
1800
- print_timeline(&q, n, verboseFlag);
1808
+ print_timeline(&q, n, width, verboseFlag);
18011809
db_finalize(&q);
18021810
}
18031811
18041812
/*
18051813
** This is a version of the "localtime()" function from the standard
18061814
--- src/timeline.c
+++ src/timeline.c
@@ -1513,11 +1513,11 @@
1513 ** 4. Number of non-merge children
1514 ** 5. Number of parents
1515 ** 6. mtime
1516 ** 7. branch
1517 */
1518 void print_timeline(Stmt *q, int nLimit, int verboseFlag){
1519 int nAbsLimit = (nLimit >= 0) ? nLimit : -nLimit;
1520 int nLine = 0;
1521 int nEntry = 0;
1522 char zPrevDate[20];
1523 const char *zCurrentUuid=0;
@@ -1577,11 +1577,11 @@
1577 if( fossil_strcmp(zCurrentUuid,zId)==0 ){
1578 sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*CURRENT* ");
1579 n += strlen(zPrefix);
1580 }
1581 zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom);
1582 nLine += comment_print(zFree, 9, 79); /* record another X lines */
1583 sqlite3_free(zFree);
1584
1585 if(verboseFlag){
1586 if( !fchngQueryInit ){
1587 db_prepare(&fchngQuery,
@@ -1681,24 +1681,26 @@
1681 ** The DATETIME should be in the ISO8601 format. For
1682 ** examples: "2007-08-18 07:21:21". You can also say "current"
1683 ** for the current version or "now" for the current time.
1684 **
1685 ** Options:
1686 ** -n|--limit N Output the first N changes (default 20)
1687 ** -t|--type TYPE Output items from the given types only, such as:
1688 ** ci = file commits only
1689 ** e = events only
1690 ** t = tickets only
1691 ** w = wiki commits only
1692 ** -v|--verbose Output the list of files changed by each commit
1693 ** and the type of each change (edited, deleted,
1694 ** etc.) after the checkin comment.
 
1695 */
1696 void timeline_cmd(void){
1697 Stmt q;
1698 int n, k;
1699 const char *zLimit;
 
1700 const char *zType;
1701 char *zOrigin;
1702 char *zDate;
1703 Blob sql;
1704 int objid = 0;
@@ -1709,18 +1711,24 @@
1709 if( !verboseFlag){
1710 verboseFlag = find_option("showfiles","f", 0)!=0; /* deprecated */
1711 }
1712 db_find_and_open_repository(0, 0);
1713 zLimit = find_option("limit","n",1);
 
1714 zType = find_option("type","t",1);
1715 if ( !zLimit ){
1716 zLimit = find_option("count",0,1);
1717 }
1718 if( zLimit ){
1719 n = atoi(zLimit);
1720 }else{
1721 n = -20;
 
 
 
 
 
1722 }
1723 if( g.argc>=4 ){
1724 k = strlen(g.argv[2]);
1725 if( strncmp(g.argv[2],"before",k)==0 ){
1726 mode = 1;
@@ -1733,11 +1741,11 @@
1733 }else if( strncmp(g.argv[2],"ancestors",k)==0 && k>1 ){
1734 mode = 4;
1735 }else if( strncmp(g.argv[2],"parents",k)==0 ){
1736 mode = 4;
1737 }else if(!zType && !zLimit){
1738 usage("?WHEN? ?BASELINE|DATETIME? ?-n|--limit N? ?-t|--type TYPE?");
1739 }
1740 if( '-' != *g.argv[3] ){
1741 zOrigin = g.argv[3];
1742 }else{
1743 zOrigin = "now";
@@ -1795,11 +1803,11 @@
1795 blob_appendf(&sql, " AND event.type=%Q ", zType);
1796 }
1797 blob_appendf(&sql, " ORDER BY event.mtime DESC");
1798 db_prepare(&q, blob_str(&sql));
1799 blob_reset(&sql);
1800 print_timeline(&q, n, verboseFlag);
1801 db_finalize(&q);
1802 }
1803
1804 /*
1805 ** This is a version of the "localtime()" function from the standard
1806
--- src/timeline.c
+++ src/timeline.c
@@ -1513,11 +1513,11 @@
1513 ** 4. Number of non-merge children
1514 ** 5. Number of parents
1515 ** 6. mtime
1516 ** 7. branch
1517 */
1518 void print_timeline(Stmt *q, int nLimit, int width, int verboseFlag){
1519 int nAbsLimit = (nLimit >= 0) ? nLimit : -nLimit;
1520 int nLine = 0;
1521 int nEntry = 0;
1522 char zPrevDate[20];
1523 const char *zCurrentUuid=0;
@@ -1577,11 +1577,11 @@
1577 if( fossil_strcmp(zCurrentUuid,zId)==0 ){
1578 sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*CURRENT* ");
1579 n += strlen(zPrefix);
1580 }
1581 zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom);
1582 nLine += comment_print(zFree, 9, width-1); /* record another X lines */
1583 sqlite3_free(zFree);
1584
1585 if(verboseFlag){
1586 if( !fchngQueryInit ){
1587 db_prepare(&fchngQuery,
@@ -1681,24 +1681,26 @@
1681 ** The DATETIME should be in the ISO8601 format. For
1682 ** examples: "2007-08-18 07:21:21". You can also say "current"
1683 ** for the current version or "now" for the current time.
1684 **
1685 ** Options:
1686 ** -n|--limit N Output the first N entries (default 20 lines)
1687 ** -t|--type TYPE Output items from the given types only, such as:
1688 ** ci = file commits only
1689 ** e = events only
1690 ** t = tickets only
1691 ** w = wiki commits only
1692 ** -v|--verbose Output the list of files changed by each commit
1693 ** and the type of each change (edited, deleted,
1694 ** etc.) after the checkin comment.
1695 ** -W|--width <num> With of lines (default 80). 0=no limit.
1696 */
1697 void timeline_cmd(void){
1698 Stmt q;
1699 int n, k, width;
1700 const char *zLimit;
1701 const char *zWidth;
1702 const char *zType;
1703 char *zOrigin;
1704 char *zDate;
1705 Blob sql;
1706 int objid = 0;
@@ -1709,18 +1711,24 @@
1711 if( !verboseFlag){
1712 verboseFlag = find_option("showfiles","f", 0)!=0; /* deprecated */
1713 }
1714 db_find_and_open_repository(0, 0);
1715 zLimit = find_option("limit","n",1);
1716 zWidth = find_option("width","W",1);
1717 zType = find_option("type","t",1);
1718 if ( !zLimit ){
1719 zLimit = find_option("count",0,1);
1720 }
1721 if( zLimit ){
1722 n = atoi(zLimit);
1723 }else{
1724 n = -20;
1725 }
1726 if( zWidth ){
1727 width = atoi(zWidth);
1728 }else{
1729 width = 80;
1730 }
1731 if( g.argc>=4 ){
1732 k = strlen(g.argv[2]);
1733 if( strncmp(g.argv[2],"before",k)==0 ){
1734 mode = 1;
@@ -1733,11 +1741,11 @@
1741 }else if( strncmp(g.argv[2],"ancestors",k)==0 && k>1 ){
1742 mode = 4;
1743 }else if( strncmp(g.argv[2],"parents",k)==0 ){
1744 mode = 4;
1745 }else if(!zType && !zLimit){
1746 usage("?WHEN? ?BASELINE|DATETIME? ?-n|--limit N? ?-t|--type TYPE? ?-W|--width WIDTH?");
1747 }
1748 if( '-' != *g.argv[3] ){
1749 zOrigin = g.argv[3];
1750 }else{
1751 zOrigin = "now";
@@ -1795,11 +1803,11 @@
1803 blob_appendf(&sql, " AND event.type=%Q ", zType);
1804 }
1805 blob_appendf(&sql, " ORDER BY event.mtime DESC");
1806 db_prepare(&q, blob_str(&sql));
1807 blob_reset(&sql);
1808 print_timeline(&q, n, width, verboseFlag);
1809 db_finalize(&q);
1810 }
1811
1812 /*
1813 ** This is a version of the "localtime()" function from the standard
1814
+1 -1
--- src/update.c
+++ src/update.c
@@ -188,11 +188,11 @@
188188
"%s "
189189
" AND event.objid IN leaves"
190190
" ORDER BY event.mtime DESC",
191191
timeline_query_for_tty()
192192
);
193
- print_timeline(&q, -100, 0);
193
+ print_timeline(&q, -100, 80, 0);
194194
db_finalize(&q);
195195
fossil_fatal("Multiple descendants");
196196
}
197197
}
198198
tid = db_int(0, "SELECT rid FROM leaves, event"
199199
--- src/update.c
+++ src/update.c
@@ -188,11 +188,11 @@
188 "%s "
189 " AND event.objid IN leaves"
190 " ORDER BY event.mtime DESC",
191 timeline_query_for_tty()
192 );
193 print_timeline(&q, -100, 0);
194 db_finalize(&q);
195 fossil_fatal("Multiple descendants");
196 }
197 }
198 tid = db_int(0, "SELECT rid FROM leaves, event"
199
--- src/update.c
+++ src/update.c
@@ -188,11 +188,11 @@
188 "%s "
189 " AND event.objid IN leaves"
190 " ORDER BY event.mtime DESC",
191 timeline_query_for_tty()
192 );
193 print_timeline(&q, -100, 80, 0);
194 db_finalize(&q);
195 fossil_fatal("Multiple descendants");
196 }
197 }
198 tid = db_int(0, "SELECT rid FROM leaves, event"
199
+1 -1
--- src/update.c
+++ src/update.c
@@ -188,11 +188,11 @@
188188
"%s "
189189
" AND event.objid IN leaves"
190190
" ORDER BY event.mtime DESC",
191191
timeline_query_for_tty()
192192
);
193
- print_timeline(&q, -100, 0);
193
+ print_timeline(&q, -100, 80, 0);
194194
db_finalize(&q);
195195
fossil_fatal("Multiple descendants");
196196
}
197197
}
198198
tid = db_int(0, "SELECT rid FROM leaves, event"
199199
--- src/update.c
+++ src/update.c
@@ -188,11 +188,11 @@
188 "%s "
189 " AND event.objid IN leaves"
190 " ORDER BY event.mtime DESC",
191 timeline_query_for_tty()
192 );
193 print_timeline(&q, -100, 0);
194 db_finalize(&q);
195 fossil_fatal("Multiple descendants");
196 }
197 }
198 tid = db_int(0, "SELECT rid FROM leaves, event"
199
--- src/update.c
+++ src/update.c
@@ -188,11 +188,11 @@
188 "%s "
189 " AND event.objid IN leaves"
190 " ORDER BY event.mtime DESC",
191 timeline_query_for_tty()
192 );
193 print_timeline(&q, -100, 80, 0);
194 db_finalize(&q);
195 fossil_fatal("Multiple descendants");
196 }
197 }
198 tid = db_int(0, "SELECT rid FROM leaves, event"
199

Keyboard Shortcuts

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