| ︙ | | |
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
|
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
|
-
+
|
@ %W(blob_str(&truncated))
blob_reset(&truncated);
drawDetailEllipsis = 0;
}else{
cgi_printf("%W",blob_str(&comment));
}
}
if( zType[0]=='c' && strcmp(zUuid, MANIFEST_UUID)==0 ){
/* This will only ever happen when Fossil is drawing a timeline for
** its own self-host repository. If the timeline shows the specific
** check-in corresponding to the current executable, then tag that
** check-in with "This is me!". */
@ <b>← This is me!</b>
}
|
| ︙ | | |
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
|
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
|
-
+
|
**
** with an optional "Z" timeline modifier at the end. Return true if
** the input is a valid date space and false if not.
*/
static int timeline_is_datespan(const char *zDay){
size_t n = strlen(zDay);
int i, d, m;
if( n<17 || n>18 ) return 0;
if( n==18 ){
if( zDay[17]!='Z' && zDay[17]!='z' ) return 0;
n--;
}
if( zDay[8]!='-' ) return 0;
for(i=0; i<17 && (fossil_isdigit(zDay[i]) || i==8); i++){}
|
| ︙ | | |
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
|
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
|
-
+
|
** particular starting point (iFrom). Return the rid of that
** first check-in. If there are no check-ins in the descendent
** or ancestor set of check-in iFrom that match the tag, then
** return 0.
*/
static int timeline_endpoint(
int iFrom, /* Starting point */
const char *zEnd, /* Tag we are searching for */
const char *zEnd, /* Tag we are searching for */
int bForward /* 1: forwards in time (descendants) 0: backwards */
){
int tagId;
int endId = 0;
Stmt q;
int ans = 0;
|
| ︙ | | |
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
|
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
|
-
+
|
zFwdTo = P("ft");
if( zFwdTo && bSeparateDandP ){
if( zError==0 ){
zError = "Cannot use the ft= query parameter when both p= and d= "
"are used and have distinct values.";
}
zFwdTo = 0;
}
}
if( zFwdTo ){
double rStartDate = mtime_of_rid(d_rid, 0.0);
ridFwdTo = first_checkin_with_tag_after_date(zFwdTo, rStartDate);
if( ridFwdTo==0 ){
ridFwdTo = name_to_typed_rid(zBackTo,"ci");
}
if( ridFwdTo ){
|
| ︙ | | |
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
|
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
|
-
+
|
zBackTo = P("bt");
if( zBackTo && bSeparateDandP ){
if( zError==0 ){
zError = "Cannot use the bt= query parameter when both p= and d= "
"are used and have distinct values.";
}
zBackTo = 0;
}
}
if( zBackTo ){
double rDateLimit = mtime_of_rid(p_rid, 0.0);
ridBackTo = last_checkin_with_tag_before_date(zBackTo, rDateLimit);
if( ridBackTo==0 ){
ridBackTo = name_to_typed_rid(zBackTo,"ci");
}
if( ridBackTo && !haveParameterN ) nEntry = 0;
|
| ︙ | | |
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
|
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
|
-
+
|
removeFileGlobFromOk(zChng);
db_multi_exec("%s", blob_sql_text(&sql));
}else{
removeFileGlobFromOk(zChng);
np = db_int(0, "SELECT count(*)-1 FROM ok");
if( np>0 || nd==0 ){
if( nd>0 ) blob_appendf(&desc, " and ");
blob_appendf(&desc, "%d ancestor%s",
blob_appendf(&desc, "%d ancestor%s",
np>=0 ? np : 0, (1==np)?"":"s");
db_multi_exec("%s", blob_sql_text(&sql));
}
if( useDividers && !selectedRid ) selectedRid = p_rid;
}
}
|
| ︙ | | |
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
|
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
|
-
+
|
fossil_free(zNext);
}
blob_append_sql(&cond,
" AND event.mtime>=julianday(%Q,%Q)"
" AND event.mtime<julianday(%Q,%Q,'+1 day')\n",
zStart, zTZMod, zEnd, zTZMod);
nEntry = -1;
if( fossil_ui_localtime() && bZulu ){
zDay = mprintf("%d days between %zZ and %zZ", nDay, zStart, zEnd);
}else{
zDay = mprintf("%d days between %z and %z", nDay, zStart, zEnd);
}
}
else if( zDay ){
|
| ︙ | | |
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
|
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
|
+
|
** --full Extra verbose entry formatting
** -n|--limit N If N is positive, output the first N entries. If
** N is negative, output the first -N lines. If N is
** zero, no limit. Default is -20 meaning 20 lines.
** --offset P Skip P changes
** -p|--path PATH Output items affecting PATH only.
** PATH can be a file or a sub directory.
** -r|--reverse Show items in chronological order.
** -R REPO_FILE Specifies the repository db to use. Default is
** the current check-out's repository.
** --sql Show the SQL used to generate the timeline
** -t|--type TYPE Output items from the given types only, such as:
** ci = file commits only
** e = technical notes only
** f = forum posts only
|
| ︙ | | |
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
|
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
|
-
+
+
|
const char *zType;
char *zOrigin;
char *zDate;
Blob sql;
int objid = 0;
Blob uuid;
int mode = TIMELINE_MODE_NONE;
int verboseFlag = 0 ;
int verboseFlag = 0;
int reverseFlag = 0;
int iOffset;
const char *zFilePattern = 0;
const char *zFormat = 0;
const char *zBr = 0;
Blob treeName;
int showSql = 0;
|
| ︙ | | |
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
|
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
|
+
-
+
|
fossil_fatal("-W|--width value must be >20 or 0");
}
}else{
width = -1;
}
zOffset = find_option("offset",0,1);
iOffset = zOffset ? atoi(zOffset) : 0;
reverseFlag = find_option("reverse","r",0)!=0;
/* We should be done with options.. */
verify_all_options();
if( g.argc>=4 ){
k = strlen(g.argv[2]);
if( strncmp(g.argv[2],"before",k)==0 ){
mode = TIMELINE_MODE_BEFORE;
}else if( strncmp(g.argv[2],"after",k)==0 && k>1 ){
mode = TIMELINE_MODE_AFTER;
}else if( strncmp(g.argv[2],"descendants",k)==0 ){
mode = TIMELINE_MODE_CHILDREN;
}else if( strncmp(g.argv[2],"children",k)==0 ){
mode = TIMELINE_MODE_CHILDREN;
}else if( strncmp(g.argv[2],"ancestors",k)==0 && k>1 ){
mode = TIMELINE_MODE_PARENTS;
}else if( strncmp(g.argv[2],"parents",k)==0 ){
mode = TIMELINE_MODE_PARENTS;
}else if(!zType && !zLimit){
usage("?WHEN? ?CHECKIN|DATETIME? ?-n|--limit #? ?-t|--type TYPE? "
"?-W|--width WIDTH? ?-p|--path PATH?");
"?-W|--width WIDTH? ?-p|--path PATH? ?-r|--reverse?");
}
if( '-' != *g.argv[3] ){
zOrigin = g.argv[3];
}else{
zOrigin = "now";
}
}else if( g.argc==3 ){
|
| ︙ | | |
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
|
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
|
-
+
-
-
+
+
+
-
+
+
|
" AND e.comment LIKE '_checkin/%%'\n"
" LEFT JOIN tagxref tx ON tx.rid=b.rid AND tx.tagid=%d\n"
" WHERE tx.value='%q'\n"
")\n" /* No merge closures */
" AND (tagxref.value IS NULL OR tagxref.value='%q')",
zBr, zBr, zBr, TAG_BRANCH, zBr, zBr);
}
if( mode==TIMELINE_MODE_AFTER ){
int lim = n;
if( n == 0 ){
lim = -1; /* 0 means no limit */
}else if( n < 0 ){
lim = -n;
}
/* Complete the above outer select. */
blob_append_sql(&sql,
"\nORDER BY event.mtime LIMIT %d) t ORDER BY t.mDateTime DESC", lim);
blob_append_sql(&sql,
"\nORDER BY event.mtime LIMIT %d) t ORDER BY t.mDateTime %s",
lim, reverseFlag ? "" : "DESC");
}else{
blob_append_sql(&sql, "\nORDER BY event.mtime DESC");
blob_append_sql(&sql,
"\nORDER BY event.mtime %s", reverseFlag ? "" : "DESC");
}
if( iOffset>0 ){
/* Don't handle LIMIT here, otherwise print_timeline()
* will not determine the end-marker correctly! */
blob_append_sql(&sql, "\n LIMIT -1 OFFSET %d", iOffset);
}
if( showSql ){
|
| ︙ | | |