Fossil SCM

Add the Abbreviated Name configuration option that is used for tarball and ZIP archive name construction.

drh 2013-10-08 14:43 trunk
Commit 12395456635b7bc48c3dfdb329e78b675d2d406a
--- src/configure.c
+++ src/configure.c
@@ -98,10 +98,11 @@
9898
{ "tcl", CONFIGSET_SKIN|CONFIGSET_TKT|CONFIGSET_XFER },
9999
{ "tcl-setup", CONFIGSET_SKIN|CONFIGSET_TKT|CONFIGSET_XFER },
100100
#endif
101101
102102
{ "project-name", CONFIGSET_PROJ },
103
+ { "short-project-name", CONFIGSET_PROJ },
103104
{ "project-description", CONFIGSET_PROJ },
104105
{ "manifest", CONFIGSET_PROJ },
105106
{ "binary-glob", CONFIGSET_PROJ },
106107
{ "clean-glob", CONFIGSET_PROJ },
107108
{ "ignore-glob", CONFIGSET_PROJ },
108109
--- src/configure.c
+++ src/configure.c
@@ -98,10 +98,11 @@
98 { "tcl", CONFIGSET_SKIN|CONFIGSET_TKT|CONFIGSET_XFER },
99 { "tcl-setup", CONFIGSET_SKIN|CONFIGSET_TKT|CONFIGSET_XFER },
100 #endif
101
102 { "project-name", CONFIGSET_PROJ },
 
103 { "project-description", CONFIGSET_PROJ },
104 { "manifest", CONFIGSET_PROJ },
105 { "binary-glob", CONFIGSET_PROJ },
106 { "clean-glob", CONFIGSET_PROJ },
107 { "ignore-glob", CONFIGSET_PROJ },
108
--- src/configure.c
+++ src/configure.c
@@ -98,10 +98,11 @@
98 { "tcl", CONFIGSET_SKIN|CONFIGSET_TKT|CONFIGSET_XFER },
99 { "tcl-setup", CONFIGSET_SKIN|CONFIGSET_TKT|CONFIGSET_XFER },
100 #endif
101
102 { "project-name", CONFIGSET_PROJ },
103 { "short-project-name", CONFIGSET_PROJ },
104 { "project-description", CONFIGSET_PROJ },
105 { "manifest", CONFIGSET_PROJ },
106 { "binary-glob", CONFIGSET_PROJ },
107 { "clean-glob", CONFIGSET_PROJ },
108 { "ignore-glob", CONFIGSET_PROJ },
109
+4 -1
--- src/info.c
+++ src/info.c
@@ -579,12 +579,15 @@
579579
@ <td>%h(zUser) @ %h(zIpAddr) on %s(zDate)</td></tr>
580580
}
581581
db_finalize(&q2);
582582
}
583583
if( g.perm.Hyperlink ){
584
- char *zProjName = mprintf("%s", db_get("project-name", "unnamed"));
584
+ const char *zPJ = db_get("short-project-name", 0);
585
+ char *zProjName;
585586
int jj;
587
+ if( zPJ==0 ) zPJ = db_get("project-name", "unnamed");
588
+ zProjName = mprintf("%s", zPJ);
586589
for(jj=0; zProjName[jj]; jj++){
587590
if( strchr("\\/:*?[]", zProjName[jj]) ) zProjName[jj] = '_';
588591
}
589592
@ <tr><th>Timelines:</th><td>
590593
@ %z(href("%R/timeline?f=%S",zUuid))family</a>
591594
--- src/info.c
+++ src/info.c
@@ -579,12 +579,15 @@
579 @ <td>%h(zUser) @ %h(zIpAddr) on %s(zDate)</td></tr>
580 }
581 db_finalize(&q2);
582 }
583 if( g.perm.Hyperlink ){
584 char *zProjName = mprintf("%s", db_get("project-name", "unnamed"));
 
585 int jj;
 
 
586 for(jj=0; zProjName[jj]; jj++){
587 if( strchr("\\/:*?[]", zProjName[jj]) ) zProjName[jj] = '_';
588 }
589 @ <tr><th>Timelines:</th><td>
590 @ %z(href("%R/timeline?f=%S",zUuid))family</a>
591
--- src/info.c
+++ src/info.c
@@ -579,12 +579,15 @@
579 @ <td>%h(zUser) @ %h(zIpAddr) on %s(zDate)</td></tr>
580 }
581 db_finalize(&q2);
582 }
583 if( g.perm.Hyperlink ){
584 const char *zPJ = db_get("short-project-name", 0);
585 char *zProjName;
586 int jj;
587 if( zPJ==0 ) zPJ = db_get("project-name", "unnamed");
588 zProjName = mprintf("%s", zPJ);
589 for(jj=0; zProjName[jj]; jj++){
590 if( strchr("\\/:*?[]", zProjName[jj]) ) zProjName[jj] = '_';
591 }
592 @ <tr><th>Timelines:</th><td>
593 @ %z(href("%R/timeline?f=%S",zUuid))family</a>
594
+10 -3
--- src/setup.c
+++ src/setup.c
@@ -1273,19 +1273,26 @@
12731273
@ <form action="%s(g.zTop)/setup_config" method="post"><div>
12741274
login_insert_csrf_secret();
12751275
@ <hr />
12761276
entry_attribute("Project Name", 60, "project-name", "pn", "", 0);
12771277
@ <p>Give your project a name so visitors know what this site is about.
1278
- @ The project name will also be used as the RSS feed title and as the default
1279
- @ directory name for generated tarballs and ZIP archives. For best results:
1280
- @ <ul><li>Keep the name short<li>Avoid special characters (ex: "/" and "\")</ul>
1278
+ @ The project name will also be used as the RSS feed title. This name is distinct
1279
+ @ from the "Abbreviated Name" below.
12811280
@ </p>
12821281
@ <hr />
12831282
textarea_attribute("Project Description", 3, 80,
12841283
"project-description", "pd", "", 0);
12851284
@ <p>Describe your project. This will be used in page headers for search
12861285
@ engines as well as a short RSS description.</p>
1286
+ @ <hr />
1287
+ entry_attribute("Abbreviated Name", 20, "short-project-name", "spn", "", 0);
1288
+ @ <p>This is a shortened version of the Project Name that is used as the name
1289
+ @ prefix for generated tarballs and ZIP archives. For best results, keep the
1290
+ @ name brief and avoid special characters such as "/" and "\". If no abbreviated
1291
+ @ project name is supplied, then the full Project Name above is used in the
1292
+ @ names for tarball and ZIP archive.
1293
+ @ </p>
12871294
@ <hr />
12881295
onoff_attribute("Enable WYSIWYG Wiki Editing",
12891296
"wysiwyg-wiki", "wysiwyg-wiki", 0, 0);
12901297
@ <p>Enable what-you-see-is-what-you-get (WYSIWYG) editing of wiki pages.
12911298
@ The WYSIWYG editor generates HTML instead of markup, which makes
12921299
--- src/setup.c
+++ src/setup.c
@@ -1273,19 +1273,26 @@
1273 @ <form action="%s(g.zTop)/setup_config" method="post"><div>
1274 login_insert_csrf_secret();
1275 @ <hr />
1276 entry_attribute("Project Name", 60, "project-name", "pn", "", 0);
1277 @ <p>Give your project a name so visitors know what this site is about.
1278 @ The project name will also be used as the RSS feed title and as the default
1279 @ directory name for generated tarballs and ZIP archives. For best results:
1280 @ <ul><li>Keep the name short<li>Avoid special characters (ex: "/" and "\")</ul>
1281 @ </p>
1282 @ <hr />
1283 textarea_attribute("Project Description", 3, 80,
1284 "project-description", "pd", "", 0);
1285 @ <p>Describe your project. This will be used in page headers for search
1286 @ engines as well as a short RSS description.</p>
 
 
 
 
 
 
 
 
1287 @ <hr />
1288 onoff_attribute("Enable WYSIWYG Wiki Editing",
1289 "wysiwyg-wiki", "wysiwyg-wiki", 0, 0);
1290 @ <p>Enable what-you-see-is-what-you-get (WYSIWYG) editing of wiki pages.
1291 @ The WYSIWYG editor generates HTML instead of markup, which makes
1292
--- src/setup.c
+++ src/setup.c
@@ -1273,19 +1273,26 @@
1273 @ <form action="%s(g.zTop)/setup_config" method="post"><div>
1274 login_insert_csrf_secret();
1275 @ <hr />
1276 entry_attribute("Project Name", 60, "project-name", "pn", "", 0);
1277 @ <p>Give your project a name so visitors know what this site is about.
1278 @ The project name will also be used as the RSS feed title. This name is distinct
1279 @ from the "Abbreviated Name" below.
 
1280 @ </p>
1281 @ <hr />
1282 textarea_attribute("Project Description", 3, 80,
1283 "project-description", "pd", "", 0);
1284 @ <p>Describe your project. This will be used in page headers for search
1285 @ engines as well as a short RSS description.</p>
1286 @ <hr />
1287 entry_attribute("Abbreviated Name", 20, "short-project-name", "spn", "", 0);
1288 @ <p>This is a shortened version of the Project Name that is used as the name
1289 @ prefix for generated tarballs and ZIP archives. For best results, keep the
1290 @ name brief and avoid special characters such as "/" and "\". If no abbreviated
1291 @ project name is supplied, then the full Project Name above is used in the
1292 @ names for tarball and ZIP archive.
1293 @ </p>
1294 @ <hr />
1295 onoff_attribute("Enable WYSIWYG Wiki Editing",
1296 "wysiwyg-wiki", "wysiwyg-wiki", 0, 0);
1297 @ <p>Enable what-you-see-is-what-you-get (WYSIWYG) editing of wiki pages.
1298 @ The WYSIWYG editor generates HTML instead of markup, which makes
1299

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button