Fossil

Check-in [580d6ad8c7]
Login

Check-in [580d6ad8c7]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Suppress the display of the artificate ID on the timeline which showing changes to wiki or tickets.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 580d6ad8c747c7fed75fd390c670c657c3359e21
User & Date: drh 2009-01-21 01:23:40.000
Context
2009-01-21
02:22
When creating new repositories ("fossil new") label the initial empty check-in with a propagating symbolic tag "trunk". ... (check-in: 0139767b9a user: drh tags: trunk)
01:23
Suppress the display of the artificate ID on the timeline which showing changes to wiki or tickets. ... (check-in: 580d6ad8c7 user: drh tags: trunk)
01:06
The timeline correctly shows as a leaf a check-in whose only children are separate branches. ... (check-in: d820722fe5 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/branch.c.
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
  style_header("Branches");
  login_anonymous_available();
  db_prepare(&q,
    "%s AND blob.rid IN (SELECT rid FROM tagxref WHERE tagtype>0 AND tagid=%d)"
    " ORDER BY event.mtime DESC",
    timeline_query_for_www(), TAG_NEWBRANCH
  );
  www_print_timeline(&q);
  db_finalize(&q);
  @ <br clear="both">
  @ <script>
  @ function xin(id){
  @ }
  @ function xout(id){
  @ }







|







229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
  style_header("Branches");
  login_anonymous_available();
  db_prepare(&q,
    "%s AND blob.rid IN (SELECT rid FROM tagxref WHERE tagtype>0 AND tagid=%d)"
    " ORDER BY event.mtime DESC",
    timeline_query_for_www(), TAG_NEWBRANCH
  );
  www_print_timeline(&q, 0, 0);
  db_finalize(&q);
  @ <br clear="both">
  @ <script>
  @ function xin(id){
  @ }
  @ function xout(id){
  @ }
Changes to src/descendants.c.
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
  }
  db_prepare(&q,
    "%s"
    "   AND blob.rid IN leaves"
    " ORDER BY event.mtime DESC",
    timeline_query_for_www()
  );
  www_print_timeline(&q);
  db_finalize(&q);
  @ <br clear="both">
  @ <script>
  @ function xin(id){
  @ }
  @ function xout(id){
  @ }







|







295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
  }
  db_prepare(&q,
    "%s"
    "   AND blob.rid IN leaves"
    " ORDER BY event.mtime DESC",
    timeline_query_for_www()
  );
  www_print_timeline(&q, 0, 0);
  db_finalize(&q);
  @ <br clear="both">
  @ <script>
  @ function xin(id){
  @ }
  @ function xout(id){
  @ }
Changes to src/tagview.c.
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
         "  AND tagxref.tagtype > 0"
         "  AND tagxref.tagid = %d)"
         " ORDER BY 3 desc",
         timeline_query_for_www(), tagid
  );
  db_prepare(&q, zSql);
  free(zSql);
  www_print_timeline(&q);
  db_finalize(&q);
}

/*
** WEBPAGE: /tagview
*/
void tagview_page(void){







|







181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
         "  AND tagxref.tagtype > 0"
         "  AND tagxref.tagid = %d)"
         " ORDER BY 3 desc",
         timeline_query_for_www(), tagid
  );
  db_prepare(&q, zSql);
  free(zSql);
  www_print_timeline(&q, 0, 0);
  db_finalize(&q);
}

/*
** WEBPAGE: /tagview
*/
void tagview_page(void){
Changes to src/timeline.c.
92
93
94
95
96
97
98







99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116


117
118
119
120
121
122
123
                    "     AND tagtype>0"
                    " )",
    pid, TAG_NEWBRANCH
  );
  return nNonBranch;
}








/*
** Output a timeline in the web format given a query.  The query
** should return these columns:
**
**    0.  rid
**    1.  UUID
**    2.  Date/Time
**    3.  Comment string
**    4.  User
**    5.  Number of non-merge children
**    6.  Number of parents
**    7.  True if is a leaf
**    8.  background color
**    9.  type ("ci", "w")
**   10.  list of symbolic tags.
*/
void www_print_timeline(
  Stmt *pQuery          /* Query to implement the timeline */


){
  int wikiFlags;
  int mxWikiLen;
  Blob comment;
  char zPrevDate[20];
  zPrevDate[0] = 0;








>
>
>
>
>
>
>

















|
>
>







92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
                    "     AND tagtype>0"
                    " )",
    pid, TAG_NEWBRANCH
  );
  return nNonBranch;
}

/*
** Allowed flags for the tmFlags argument to www_print_timeline
*/
#if INTERFACE
#define TIMELINE_ARTID  0x0001   /* Show artifact IDs on non-check-in lines */
#endif

/*
** Output a timeline in the web format given a query.  The query
** should return these columns:
**
**    0.  rid
**    1.  UUID
**    2.  Date/Time
**    3.  Comment string
**    4.  User
**    5.  Number of non-merge children
**    6.  Number of parents
**    7.  True if is a leaf
**    8.  background color
**    9.  type ("ci", "w")
**   10.  list of symbolic tags.
*/
void www_print_timeline(
  Stmt *pQuery,          /* Query to implement the timeline */
  int tmFlags,           /* Flags controlling display behavior */
  void (*xExtra)(int)    /* Routine to call on each line of display */
){
  int wikiFlags;
  int mxWikiLen;
  Blob comment;
  char zPrevDate[20];
  zPrevDate[0] = 0;

172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
        }else{
          @ <b>Branch</b>
        }
      }
      if( isLeaf ){
        @ <b>Leaf</b>
      }
    }else{
      hyperlink_to_uuid(zUuid);
    }
    db_column_blob(pQuery, 3, &comment);
    if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
      Blob truncated;
      blob_zero(&truncated);
      blob_append(&truncated, blob_buffer(&comment), mxWikiLen);







|







181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
        }else{
          @ <b>Branch</b>
        }
      }
      if( isLeaf ){
        @ <b>Leaf</b>
      }
    }else if( (tmFlags & TIMELINE_ARTID)!=0 ){
      hyperlink_to_uuid(zUuid);
    }
    db_column_blob(pQuery, 3, &comment);
    if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
      Blob truncated;
      blob_zero(&truncated);
      blob_append(&truncated, blob_buffer(&comment), mxWikiLen);
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
      }
    }
  }
  blob_zero(&sql);
  db_prepare(&q, "SELECT * FROM timeline ORDER BY timestamp DESC");
  @ <h2>%b(&desc)</h2>
  blob_reset(&desc);
  www_print_timeline(&q);
  db_finalize(&q);

  @ <script>
  @ var parentof = new Object();
  @ var childof = new Object();
  db_prepare(&q, "SELECT rid FROM timeline");
  while( db_step(&q)==SQLITE_ROW ){







|







470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
      }
    }
  }
  blob_zero(&sql);
  db_prepare(&q, "SELECT * FROM timeline ORDER BY timestamp DESC");
  @ <h2>%b(&desc)</h2>
  blob_reset(&desc);
  www_print_timeline(&q, 0, 0);
  db_finalize(&q);

  @ <script>
  @ var parentof = new Object();
  @ var childof = new Object();
  db_prepare(&q, "SELECT rid FROM timeline");
  while( db_step(&q)==SQLITE_ROW ){
Changes to src/tkt.c.
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
  }
  zSQL = mprintf("%s AND event.objid IN "
                 "  (SELECT rid FROM tagxref WHERE tagid=%d) "
                 "ORDER BY mtime DESC",
                 timeline_query_for_www(), tagid);
  db_prepare(&q, zSQL);
  free(zSQL);
  www_print_timeline(&q);
  db_finalize(&q);
  style_footer();
}

/*
** WEBPAGE: tkthistory
** URL: /tkthistory?name=TICKETUUID







|







634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
  }
  zSQL = mprintf("%s AND event.objid IN "
                 "  (SELECT rid FROM tagxref WHERE tagid=%d) "
                 "ORDER BY mtime DESC",
                 timeline_query_for_www(), tagid);
  db_prepare(&q, zSQL);
  free(zSQL);
  www_print_timeline(&q, TIMELINE_ARTID, 0);
  db_finalize(&q);
  style_footer();
}

/*
** WEBPAGE: tkthistory
** URL: /tkthistory?name=TICKETUUID
Changes to src/wiki.c.
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
  zSQL = mprintf("%s AND event.objid IN "
                 "  (SELECT rid FROM tagxref WHERE tagid="
                       "(SELECT tagid FROM tag WHERE tagname='wiki-%q'))"
                 "ORDER BY mtime DESC",
                 timeline_query_for_www(), zPageName);
  db_prepare(&q, zSQL);
  free(zSQL);
  www_print_timeline(&q);
  db_finalize(&q);
  style_footer();
}

/*
** WEBPAGE: wcontent
**







|







482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
  zSQL = mprintf("%s AND event.objid IN "
                 "  (SELECT rid FROM tagxref WHERE tagid="
                       "(SELECT tagid FROM tag WHERE tagname='wiki-%q'))"
                 "ORDER BY mtime DESC",
                 timeline_query_for_www(), zPageName);
  db_prepare(&q, zSQL);
  free(zSQL);
  www_print_timeline(&q, TIMELINE_ARTID, 0);
  db_finalize(&q);
  style_footer();
}

/*
** WEBPAGE: wcontent
**