Fossil SCM
In the timeline, replace a hard-coded 'trunk' with a db_get('main-branch'), as suggested in [forum:61450a0395|forum post 61450a0395] (this time in the correct branch).
Commit
cc5ffebb51bc823984b9467707eff32fa1c95dce477febbbd152f869f0a5ed36
Parent
ee5db2133841ee4…
2 files changed
+2
-1
+2
-1
+2
-1
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -287,10 +287,11 @@ | ||
| 287 | 287 | int drawDetailEllipsis; /* True to show ellipsis in place of detail */ |
| 288 | 288 | int gidx = 0; /* Graph row identifier */ |
| 289 | 289 | int isSelectedOrCurrent = 0; /* True if current row is selected */ |
| 290 | 290 | const char *zExtraClass = ""; |
| 291 | 291 | char zTime[20]; |
| 292 | + char *zMainBranch = db_get("main-branch","trunk"); | |
| 292 | 293 | |
| 293 | 294 | if( zDate==0 ){ |
| 294 | 295 | zDate = "YYYY-MM-DD HH:MM:SS"; /* Something wrong with the repo */ |
| 295 | 296 | } |
| 296 | 297 | modPending = moderation_pending(rid); |
| @@ -434,11 +435,11 @@ | ||
| 434 | 435 | zBr = branch_of_rid(rid); |
| 435 | 436 | if( zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0 ){ |
| 436 | 437 | /* If no background color is specified, use a color based on the |
| 437 | 438 | ** branch name */ |
| 438 | 439 | if( tmFlags & (TIMELINE_DELTA|TIMELINE_NOCOLOR) ){ |
| 439 | - }else if( zBr==0 || strcmp(zBr,"trunk")==0 ){ | |
| 440 | + }else if( zBr==0 || strcmp(zBr,zMainBranch)==0 ){ | |
| 440 | 441 | zBgClr = 0; |
| 441 | 442 | }else{ |
| 442 | 443 | zBgClr = hash_color(zBr); |
| 443 | 444 | } |
| 444 | 445 | } |
| 445 | 446 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -287,10 +287,11 @@ | |
| 287 | int drawDetailEllipsis; /* True to show ellipsis in place of detail */ |
| 288 | int gidx = 0; /* Graph row identifier */ |
| 289 | int isSelectedOrCurrent = 0; /* True if current row is selected */ |
| 290 | const char *zExtraClass = ""; |
| 291 | char zTime[20]; |
| 292 | |
| 293 | if( zDate==0 ){ |
| 294 | zDate = "YYYY-MM-DD HH:MM:SS"; /* Something wrong with the repo */ |
| 295 | } |
| 296 | modPending = moderation_pending(rid); |
| @@ -434,11 +435,11 @@ | |
| 434 | zBr = branch_of_rid(rid); |
| 435 | if( zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0 ){ |
| 436 | /* If no background color is specified, use a color based on the |
| 437 | ** branch name */ |
| 438 | if( tmFlags & (TIMELINE_DELTA|TIMELINE_NOCOLOR) ){ |
| 439 | }else if( zBr==0 || strcmp(zBr,"trunk")==0 ){ |
| 440 | zBgClr = 0; |
| 441 | }else{ |
| 442 | zBgClr = hash_color(zBr); |
| 443 | } |
| 444 | } |
| 445 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -287,10 +287,11 @@ | |
| 287 | int drawDetailEllipsis; /* True to show ellipsis in place of detail */ |
| 288 | int gidx = 0; /* Graph row identifier */ |
| 289 | int isSelectedOrCurrent = 0; /* True if current row is selected */ |
| 290 | const char *zExtraClass = ""; |
| 291 | char zTime[20]; |
| 292 | char *zMainBranch = db_get("main-branch","trunk"); |
| 293 | |
| 294 | if( zDate==0 ){ |
| 295 | zDate = "YYYY-MM-DD HH:MM:SS"; /* Something wrong with the repo */ |
| 296 | } |
| 297 | modPending = moderation_pending(rid); |
| @@ -434,11 +435,11 @@ | |
| 435 | zBr = branch_of_rid(rid); |
| 436 | if( zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0 ){ |
| 437 | /* If no background color is specified, use a color based on the |
| 438 | ** branch name */ |
| 439 | if( tmFlags & (TIMELINE_DELTA|TIMELINE_NOCOLOR) ){ |
| 440 | }else if( zBr==0 || strcmp(zBr,zMainBranch)==0 ){ |
| 441 | zBgClr = 0; |
| 442 | }else{ |
| 443 | zBgClr = hash_color(zBr); |
| 444 | } |
| 445 | } |
| 446 |
+2
-1
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -287,10 +287,11 @@ | ||
| 287 | 287 | int drawDetailEllipsis; /* True to show ellipsis in place of detail */ |
| 288 | 288 | int gidx = 0; /* Graph row identifier */ |
| 289 | 289 | int isSelectedOrCurrent = 0; /* True if current row is selected */ |
| 290 | 290 | const char *zExtraClass = ""; |
| 291 | 291 | char zTime[20]; |
| 292 | + char *zMainBranch = db_get("main-branch","trunk"); | |
| 292 | 293 | |
| 293 | 294 | if( zDate==0 ){ |
| 294 | 295 | zDate = "YYYY-MM-DD HH:MM:SS"; /* Something wrong with the repo */ |
| 295 | 296 | } |
| 296 | 297 | modPending = moderation_pending(rid); |
| @@ -434,11 +435,11 @@ | ||
| 434 | 435 | zBr = branch_of_rid(rid); |
| 435 | 436 | if( zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0 ){ |
| 436 | 437 | /* If no background color is specified, use a color based on the |
| 437 | 438 | ** branch name */ |
| 438 | 439 | if( tmFlags & (TIMELINE_DELTA|TIMELINE_NOCOLOR) ){ |
| 439 | - }else if( zBr==0 || strcmp(zBr,"trunk")==0 ){ | |
| 440 | + }else if( zBr==0 || strcmp(zBr,zMainBranch)==0 ){ | |
| 440 | 441 | zBgClr = 0; |
| 441 | 442 | }else{ |
| 442 | 443 | zBgClr = hash_color(zBr); |
| 443 | 444 | } |
| 444 | 445 | } |
| 445 | 446 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -287,10 +287,11 @@ | |
| 287 | int drawDetailEllipsis; /* True to show ellipsis in place of detail */ |
| 288 | int gidx = 0; /* Graph row identifier */ |
| 289 | int isSelectedOrCurrent = 0; /* True if current row is selected */ |
| 290 | const char *zExtraClass = ""; |
| 291 | char zTime[20]; |
| 292 | |
| 293 | if( zDate==0 ){ |
| 294 | zDate = "YYYY-MM-DD HH:MM:SS"; /* Something wrong with the repo */ |
| 295 | } |
| 296 | modPending = moderation_pending(rid); |
| @@ -434,11 +435,11 @@ | |
| 434 | zBr = branch_of_rid(rid); |
| 435 | if( zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0 ){ |
| 436 | /* If no background color is specified, use a color based on the |
| 437 | ** branch name */ |
| 438 | if( tmFlags & (TIMELINE_DELTA|TIMELINE_NOCOLOR) ){ |
| 439 | }else if( zBr==0 || strcmp(zBr,"trunk")==0 ){ |
| 440 | zBgClr = 0; |
| 441 | }else{ |
| 442 | zBgClr = hash_color(zBr); |
| 443 | } |
| 444 | } |
| 445 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -287,10 +287,11 @@ | |
| 287 | int drawDetailEllipsis; /* True to show ellipsis in place of detail */ |
| 288 | int gidx = 0; /* Graph row identifier */ |
| 289 | int isSelectedOrCurrent = 0; /* True if current row is selected */ |
| 290 | const char *zExtraClass = ""; |
| 291 | char zTime[20]; |
| 292 | char *zMainBranch = db_get("main-branch","trunk"); |
| 293 | |
| 294 | if( zDate==0 ){ |
| 295 | zDate = "YYYY-MM-DD HH:MM:SS"; /* Something wrong with the repo */ |
| 296 | } |
| 297 | modPending = moderation_pending(rid); |
| @@ -434,11 +435,11 @@ | |
| 435 | zBr = branch_of_rid(rid); |
| 436 | if( zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0 ){ |
| 437 | /* If no background color is specified, use a color based on the |
| 438 | ** branch name */ |
| 439 | if( tmFlags & (TIMELINE_DELTA|TIMELINE_NOCOLOR) ){ |
| 440 | }else if( zBr==0 || strcmp(zBr,zMainBranch)==0 ){ |
| 441 | zBgClr = 0; |
| 442 | }else{ |
| 443 | zBgClr = hash_color(zBr); |
| 444 | } |
| 445 | } |
| 446 |