Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | On the "vinfo" page, add a link to a timeline of all other check-ins with the same tag. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
fecb3e5cc90bf751160b0c6140da725a |
| User & Date: | drh 2009-01-20 23:39:50.000 |
Context
|
2009-01-20
| ||
| 23:47 | Change the page header from Baseline to Check-in on the "vinfo" page. Fix a bug introduced into tagview (ticket [309c57b3d27219fa6ad601c0021dc067a7cb992d]). ... (check-in: bf7ca1a4d8 user: drh tags: trunk) | |
| 23:39 | On the "vinfo" page, add a link to a timeline of all other check-ins with the same tag. ... (check-in: fecb3e5cc9 user: drh tags: trunk) | |
| 22:53 | Add a gray color option on the color changer. Help the "info" webpage to figure out that an artifact is a check-ins when the check-in changes no files relative to its parent (when the check-in only creates a new branch.) ... (check-in: 3b3116e490 user: drh tags: trunk) | |
Changes
Changes to src/branch.c.
| ︙ | ︙ | |||
210 211 212 213 214 215 216 |
print_timeline(&q, 2000);
db_finalize(&q);
}else{
fossil_panic("branch subcommand should be one of: "
"new list");
}
}
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
print_timeline(&q, 2000);
db_finalize(&q);
}else{
fossil_panic("branch subcommand should be one of: "
"new list");
}
}
/*
** WEBPAGE: brlist
**
** Show a timeline of all branches
*/
void brlist_page(void){
Stmt q;
login_check_credentials();
if( !g.okRead ){ login_needed(); return; }
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){
@ }
@ </script>
style_footer();
}
|
Changes to src/info.c.
| ︙ | ︙ | |||
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 |
}else{
@ <tr><th>Comment:</th><td>%w(zComment)</td></tr>
}
@ </td></tr>
if( g.okHistory ){
char *zShortUuid = mprintf("%.10s", zUuid);
const char *zProjName = db_get("project-name", "unnamed");
@ <tr><th>Timelines:</th><td>
@ <a href="%s(g.zBaseURL)/timeline?p=%d(rid)">ancestors</a>
@ | <a href="%s(g.zBaseURL)/timeline?d=%d(rid)">descendants</a>
@ | <a href="%s(g.zBaseURL)/timeline?d=%d(rid)&p=%d(rid)">both</a>
@ </td></tr>
@ <tr><th>Commands:</th>
@ <td>
@ <a href="%s(g.zBaseURL)/vdiff/%d(rid)">diff</a>
@ | <a href="%s(g.zBaseURL)/zip/%s(zProjName)-%s(zShortUuid).zip?uuid=%s(zUuid)">
@ ZIP archive</a>
@ | <a href="%s(g.zBaseURL)/artifact/%d(rid)">manifest</a>
| > > > > > > > > > > > | 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
}else{
@ <tr><th>Comment:</th><td>%w(zComment)</td></tr>
}
@ </td></tr>
if( g.okHistory ){
char *zShortUuid = mprintf("%.10s", zUuid);
const char *zProjName = db_get("project-name", "unnamed");
Stmt q;
@ <tr><th>Timelines:</th><td>
@ <a href="%s(g.zBaseURL)/timeline?p=%d(rid)">ancestors</a>
@ | <a href="%s(g.zBaseURL)/timeline?d=%d(rid)">descendants</a>
@ | <a href="%s(g.zBaseURL)/timeline?d=%d(rid)&p=%d(rid)">both</a>
db_prepare(&q, "SELECT tag.tagid, tag.tagname FROM tagxref, tag "
" WHERE rid=%d AND tagtype>0 "
" AND tag.tagid=tagxref.tagid "
" AND +tag.tagname GLOB 'sym-*'", rid);
while( db_step(&q)==SQLITE_ROW ){
int tagid = db_column_int(&q, 0);
const char *zTagName = db_column_text(&q, 1);
@ | <a href="%s(g.zBaseURL)/timeline?t=%d(tagid)">%h(&zTagName[4])</a>
}
db_finalize(&q);
@ </td></tr>
@ <tr><th>Commands:</th>
@ <td>
@ <a href="%s(g.zBaseURL)/vdiff/%d(rid)">diff</a>
@ | <a href="%s(g.zBaseURL)/zip/%s(zProjName)-%s(zShortUuid).zip?uuid=%s(zUuid)">
@ ZIP archive</a>
@ | <a href="%s(g.zBaseURL)/artifact/%d(rid)">manifest</a>
|
| ︙ | ︙ |
Changes to src/style.c.
| ︙ | ︙ | |||
191 192 193 194 195 196 197 |
@ html "<a href='$baseurl$index_page'>Home</a>"
@ if {[hascap h]} {
@ html "<a href='$baseurl/dir'>Files</a>"
@ }
@ if {[hascap o]} {
@ html "<a href='$baseurl/leaves'>Leaves</a>"
@ html "<a href='$baseurl/timeline'>Timeline</a>"
| | | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
@ html "<a href='$baseurl$index_page'>Home</a>"
@ if {[hascap h]} {
@ html "<a href='$baseurl/dir'>Files</a>"
@ }
@ if {[hascap o]} {
@ html "<a href='$baseurl/leaves'>Leaves</a>"
@ html "<a href='$baseurl/timeline'>Timeline</a>"
@ html "<a href='$baseurl/brlist'>Branches</a>"
@ }
@ if {[hascap r]} {
@ html "<a href='$baseurl/reportlist'>Bugs</a>"
@ }
@ if {[hascap j]} {
@ html "<a href='$baseurl/wiki'>Wiki</a>"
@ }
|
| ︙ | ︙ |
Changes to src/timeline.c.
| ︙ | ︙ | |||
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
** Query parameters:
**
** a=TIMESTAMP after this date
** b=TIMESTAMP before this date.
** n=COUNT number of events in output
** p=RID artifact RID and up to COUNT parents and ancestors
** d=RID artifact RID and up to COUNT descendants
** u=USER only if belonging to this user
** y=TYPE 'ci', 'w', 't'
**
** p= and d= can appear individually or together. If either p= or d=
** appear, then u=, y=, a=, and b= are ignored.
**
** If a= and b= appear, only a= is used. If neither appear, the most
** recent events are choosen.
**
** If n= is missing, the default count is 20.
*/
void page_timeline(void){
Stmt q; /* Query used to generate the timeline */
Blob sql; /* text of SQL used to generate timeline */
Blob desc; /* Description of the timeline */
int nEntry = atoi(PD("n","20")); /* Max number of entries on timeline */
int p_rid = atoi(PD("p","0")); /* artifact p and its parents */
int d_rid = atoi(PD("d","0")); /* artifact d and its descendants */
const char *zUser = P("u"); /* All entries by this user if not NULL */
const char *zType = PD("y","all"); /* Type of events. All if NULL */
const char *zAfter = P("a"); /* Events after this time */
const char *zBefore = P("b"); /* Events before this time */
HQuery url; /* URL for various branch links */
/* To view the timeline, must have permission to read project data.
| > > | 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
** Query parameters:
**
** a=TIMESTAMP after this date
** b=TIMESTAMP before this date.
** n=COUNT number of events in output
** p=RID artifact RID and up to COUNT parents and ancestors
** d=RID artifact RID and up to COUNT descendants
** t=TAGID show only check-ins with the given tagid
** u=USER only if belonging to this user
** y=TYPE 'ci', 'w', 't'
**
** p= and d= can appear individually or together. If either p= or d=
** appear, then u=, y=, a=, and b= are ignored.
**
** If a= and b= appear, only a= is used. If neither appear, the most
** recent events are choosen.
**
** If n= is missing, the default count is 20.
*/
void page_timeline(void){
Stmt q; /* Query used to generate the timeline */
Blob sql; /* text of SQL used to generate timeline */
Blob desc; /* Description of the timeline */
int nEntry = atoi(PD("n","20")); /* Max number of entries on timeline */
int p_rid = atoi(PD("p","0")); /* artifact p and its parents */
int d_rid = atoi(PD("d","0")); /* artifact d and its descendants */
int tagid = atoi(PD("t","0")); /* Show checkins of a given tag */
const char *zUser = P("u"); /* All entries by this user if not NULL */
const char *zType = PD("y","all"); /* Type of events. All if NULL */
const char *zAfter = P("a"); /* Events after this time */
const char *zBefore = P("b"); /* Events before this time */
HQuery url; /* URL for various branch links */
/* To view the timeline, must have permission to read project data.
|
| ︙ | ︙ | |||
341 342 343 344 345 346 347 |
}
if( g.okHistory ){
blob_appendf(&desc, " of <a href='%s/info/%s'>[%.10s]</a>",
g.zBaseURL, zUuid, zUuid);
}else{
blob_appendf(&desc, " of [%.10s]", zUuid);
}
| > > > > > > > > > | > > | 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 |
}
if( g.okHistory ){
blob_appendf(&desc, " of <a href='%s/info/%s'>[%.10s]</a>",
g.zBaseURL, zUuid, zUuid);
}else{
blob_appendf(&desc, " of [%.10s]", zUuid);
}
}else if( tagid>0 ){
/* If t= is present, ignore all other parameters. Show everything
** with that tag. */
blob_appendf(&sql, " AND event.type='ci'");
blob_appendf(&sql, " AND EXISTS (SELECT 1 FROM tagxref WHERE tagid=%d"
" AND tagtype>0 AND rid=blob.rid)",
tagid);
db_multi_exec("%s", blob_str(&sql));
blob_appendf(&desc, "All check-ins tagged with \"%h\"",
db_text("??", "SELECT substr(tagname,5) FROM tag WHERE tagid=%d",
tagid)
);
}else{
int n;
const char *zEType = "event";
char *zDate;
char *zNEntry = mprintf("%d", nEntry);
url_initialize(&url, "timeline");
url_add_parameter(&url, "n", zNEntry);
|
| ︙ | ︙ |