Fossil

Check-in [83ac468a]
Login

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

Overview
Comment:Add a "nomenclature" sidebox for the Branches page, explaining the difference between an open and a closed branch.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 83ac468aae28ad6903ebfa051c10ee68d92da512
User & Date: drh 2009-01-24 00:11:44
Context
2009-01-24
10:44
Fix some compiler warnings. check-in: cd965de6 user: drh tags: trunk
00:11
Add a "nomenclature" sidebox for the Branches page, explaining the difference between an open and a closed branch. check-in: 83ac468a user: drh tags: trunk
2009-01-23
23:57
Make the distinction between open and closed branches. An open branch is a branch with one or more open leaves. Show open and closed branches separately on the "Branches" webpage. check-in: 9659ed66 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/branch.c.

227
228
229
230
231
232
233













234
235
236
237
238
239
240
  login_check_credentials();
  if( !g.okRead ){ login_needed(); return; }

  style_header("Branches");
  style_submenu_element("Timeline", "Timeline", "brtimeline");
  login_anonymous_available();
  compute_leaves(0, 1);













  db_prepare(&q,
    "SELECT DISTINCT value FROM tagxref"
    " WHERE tagid=%d AND value NOT NULL"
    "   AND rid IN leaves"
    " ORDER BY value",
    TAG_BRANCH
  );







>
>
>
>
>
>
>
>
>
>
>
>
>







227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
  login_check_credentials();
  if( !g.okRead ){ login_needed(); return; }

  style_header("Branches");
  style_submenu_element("Timeline", "Timeline", "brtimeline");
  login_anonymous_available();
  compute_leaves(0, 1);
  style_sidebox_begin("Nomenclature:", "33%");
  @ <ol>
  @ <li> An <b>open branch</b> is a branch that has one or
  @ more <a href="leaves">open leaves.</a>
  @ The presence of open leaves presumably means
  @ that the branch is still being extended with new check-ins.</li>
  @ <li> A <b>closed branch</b> is a branch with only
  @ <a href="leaves?closed">closed leaves</a>.
  @ Closed branches are fixed and do not change (unless they are first
  @ reopened)</li>
  @ </ol>
  style_sidebox_end();

  db_prepare(&q,
    "SELECT DISTINCT value FROM tagxref"
    " WHERE tagid=%d AND value NOT NULL"
    "   AND rid IN leaves"
    " ORDER BY value",
    TAG_BRANCH
  );

Changes to src/descendants.c.

295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312

313
314
315
316
317
318
319
320
321
322
323
324
325
  }
  if( showClosed || showAll ){
    style_submenu_element("Open", "Open", "leaves");
  }
  style_header("Leaves");
  login_anonymous_available();
  compute_leaves(0, showAll ? 0 : showClosed ? 2 : 1);
  @ <table width="33%%" align="right" border="1">
  @ <tr><td>
  @ <b>Nomenclature:</b>
  @ <ol>
  @ <li> A <b>leaf</b> is a check-in with no descendants.</li>
  @ <li> An <b>open leaf</b> is a leaf that does not have a "closed" tag
  @ and is thus assumed to still be in use.</li>
  @ <li> A <b>closed leaf</b> has a "closed" tag and is thus assumed to
  @ be historical and no longer in active use.</li>
  @ </ol>
  @ </td></tr></table>

  if( showAll ){
    @ <h1>All leaves, both open and closed</h1>
  }else if( showClosed ){
    @ <h1>Closed leaves only</h1>
  }else{
    @ <h1>All open leaves</h1>
  }
  db_prepare(&q,
    "%s"
    "   AND blob.rid IN leaves"
    " ORDER BY event.mtime DESC",
    timeline_query_for_www()
  );







<
<
|







|
>

|

|

|







295
296
297
298
299
300
301


302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
  }
  if( showClosed || showAll ){
    style_submenu_element("Open", "Open", "leaves");
  }
  style_header("Leaves");
  login_anonymous_available();
  compute_leaves(0, showAll ? 0 : showClosed ? 2 : 1);


  style_sidebox_begin("Nomenclature:", "33%");
  @ <ol>
  @ <li> A <b>leaf</b> is a check-in with no descendants.</li>
  @ <li> An <b>open leaf</b> is a leaf that does not have a "closed" tag
  @ and is thus assumed to still be in use.</li>
  @ <li> A <b>closed leaf</b> has a "closed" tag and is thus assumed to
  @ be historical and no longer in active use.</li>
  @ </ol>
  style_sidebox_end();

  if( showAll ){
    @ <h1>All leaves, both open and closed:</h1>
  }else if( showClosed ){
    @ <h1>Closed leaves:</h1>
  }else{
    @ <h1>Open leaves:</h1>
  }
  db_prepare(&q,
    "%s"
    "   AND blob.rid IN leaves"
    " ORDER BY event.mtime DESC",
    timeline_query_for_www()
  );

Changes to src/style.c.

154
155
156
157
158
159
160


















161
162
163
164
165
166
167
  /* Render trace log if TH1 tracing is enabled. */
  if( g.thTrace ){
    cgi_append_content("<font color=\"red\"><hr>\n", -1);
    cgi_append_content(blob_str(&g.thLog), blob_size(&g.thLog));
    cgi_append_content("</font>\n", -1);
  }
}



















/* @-comment: // */
/*
** The default page header.
*/
const char zDefaultHeader[] = 
@ <html>







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
  /* Render trace log if TH1 tracing is enabled. */
  if( g.thTrace ){
    cgi_append_content("<font color=\"red\"><hr>\n", -1);
    cgi_append_content(blob_str(&g.thLog), blob_size(&g.thLog));
    cgi_append_content("</font>\n", -1);
  }
}

/*
** Begin a side-box on the right-hand side of a page.  The title and
** the width of the box are given as arguments.  The width is usually
** a percentage of total screen width.
*/
void style_sidebox_begin(const char *zTitle, const char *zWidth){
  @ <table width="%s(zWidth)" align="right" border="1" cellpadding=5
  @  vspace=5 hspace=5>
  @ <tr><td>
  @ <b>%h(zTitle)</b>
}

/* End the side-box
*/
void style_sidebox_end(void){
  @ </td></tr></table>
}

/* @-comment: // */
/*
** The default page header.
*/
const char zDefaultHeader[] = 
@ <html>