Index: src/clone.c ================================================================== --- src/clone.c +++ src/clone.c @@ -176,11 +176,11 @@ } db_multi_exec( "REPLACE INTO config(name,value,mtime)" " VALUES('server-code', lower(hex(randomblob(20))), now());" ); - url_enable_proxy(0); + url_enable_proxy("via proxy: "); clone_ssh_db_set_options(); url_get_password_if_needed(); g.xlinkClusterOnly = 1; nErr = client_sync(SYNC_CLONE | bPrivate,CONFIGSET_ALL,0); g.xlinkClusterOnly = 0; Index: src/diffcmd.c ================================================================== --- src/diffcmd.c +++ src/diffcmd.c @@ -412,10 +412,11 @@ content_get(srcid, &content); }else{ blob_zero(&content); } isBin = fIncludeBinary ? 0 : looks_like_binary(&content); + if (!zDiffCmd) diff_print_index(zPathname, diffFlags); diff_file(&content, isBin, zFullName, zPathname, zDiffCmd, zBinGlob, fIncludeBinary, diffFlags); blob_reset(&content); } Index: src/file.c ================================================================== --- src/file.c +++ src/file.c @@ -1002,10 +1002,12 @@ /* If on '/', don't go to higher level */ blob_zero(&tmp); }else{ blob_set(&tmp, "../"); } + if (zPwd[i]==0) + blob_set(&tmp, "./"); for(j=i; zPwd[j]; j++){ if( zPwd[j]=='/' ){ blob_append(&tmp, "../", 3); } } Index: src/skins.c ================================================================== --- src/skins.c +++ src/skins.c @@ -939,10 +939,384 @@ @ @ @ '); ; +/* +** Derivative of Shiny Fossil theme (http://codingrobots.org/p/shiny-theme/home). +** - Removed logo +** - Changed font to Verdana +*/ +static const char zBuiltinSkinShinyFossil[] = +@ REPLACE INTO config(name,mtime,value) VALUES('css',now(),' +@ /* General settings for the entire page */ +@ body { +@ margin: 0ex 1ex; +@ padding: 0; +@ background-color: #333; +@ font-family: Verdana, "Lucida Grande", "Lucida Sans Unicode", Arial, sans-serif; +@ font-size: 12pt; +@ color: #000; +@ text-align: center; /* workaround for IE box centering */ +@ } +@ +@ /* Header includes logo and project name */ +@ div.header { +@ margin: auto; +@ min-width: 850px; +@ width: 94%; +@ margin-top: 20px; +@ } +@ +@ /* The project logo at the top of each page */ +@ div.logo { +@ text-align: center; +@ font-weight: bold; +@ color: #fff; +@ text-shadow: 0 1px #000; +@ } +@ +@ /* The page title under main menu */ +@ div.title { +@ font-size: 1.2em; +@ font-weight: bold; +@ text-align: left; +@ color: #333; +@ margin-left: 20px; +@ margin-top: 0; +@ padding-top: 20px; +@ text-shadow: 0 1px #fff; +@ } +@ +@ /* The login status message in the top right-hand corner */ +@ div.status { +@ float: right; +@ text-align: right; +@ color: #777; +@ font-size: 0.8em; +@ margin-top: 20px; +@ margin-right: 20px; +@ } +@ +@ /* The main menu bar that appears at the top of the page beneath +@ ** the header */ +@ div.mainmenu { +@ padding: 10px 0; +@ font-size: 0.9em; +@ font-weight: bold; +@ text-align: center; +@ background: #315FD5; +@ -webkit-border-top-left-radius: 10px; +@ -webkit-border-top-right-radius: 10px; +@ -moz-border-radius-topleft: 10px; +@ -moz-border-radius-topright: 10px; +@ border-top-left-radius: 10px; +@ border-top-right-radius: 10px; +@ border-top: 1px solid #69F; +@ border-bottom: 1px solid #152952; +@ text-shadow: 0 -1px #152952; +@ margin-bottom: 0; +@ } +@ +@ /* The submenu bar that *sometimes* appears below the main menu */ +@ div.submenu { +@ padding: 3px 10px 3px 0px; +@ font-size: 0.75em; +@ text-align: center; +@ color: #333; +@ margin-top: -23px; /* push it to top between page title and status */ +@ margin-bottom: 2px; +@ } +@ +@ div.mainmenu a:link, div.mainmenu a:visited { +@ padding: 3px 10px 3px 10px; +@ color: #fff; +@ text-decoration: none; +@ border: 0; +@ } +@ +@ div.submenu a:link, div.submenu a:visited { +@ padding: 1px 10px; +@ color: #222; +@ border: 1px solid #BDBDBD; +@ background: #EEE; +@ -webkit-border-radius: 10px; +@ -moz-border-radius: 10px; +@ border-radius: 10px; +@ text-decoration: none; +@ text-shadow: 0 1px #fff; +@ } +@ +@ div.submenu a:hover { +@ color: #fff; +@ background: #858585; +@ border-color: #5B5B5B; +@ text-shadow: 0 1px #000; +@ } +@ +@ div.mainmenu a:hover, div.mainmenu a:visited:hover { +@ color: #9CF; +@ text-decoration: none; +@ } +@ +@ div.container { +@ margin: auto; +@ min-width: 850px; +@ width: 94%; +@ background: #69F; +@ margin-top: 20px; +@ } +@ +@ div.container, div.subcontainer { +@ background: #f4f4f4; +@ -webkit-border-radius: 10px; +@ -moz-border-radius: 10px; +@ border-radius: 10px; +@ margin-bottom: 0; +@ text-align: left; +@ } +@ +@ div.subcontainer { +@ width: 100%; +@ -webkit-border-top-left-radius: 0; +@ -webkit-border-top-right-radius: 0; +@ -moz-border-radius-topleft: 0; +@ -moz-border-radius-topright: 0; +@ border-top-left-radius: 0; +@ border-top-right-radius: 0; +@ } +@ +@ /* All page content from the bottom of the menu or submenu down to +@ ** the footer */ +@ div.content { +@ padding: 10px 20px 20px 20px; +@ font-size: 0.8em; +@ } +@ +@ /* Some pages have section dividers */ +@ div.section { +@ margin-bottom: 0px; +@ margin-top: 1em; +@ padding: 1px 1px 1px 1px; +@ font-size: 1.2em; +@ font-weight: bold; +@ color: #5B677E; +@ border-bottom: 2px solid #B6BECD; +@ } +@ +@ /* The "Date" that occurs on the left hand side of timelines */ +@ div.divider { +@ border-bottom: 2px solid #B6BECD; +@ font-size: 1em; font-weight: normal; +@ padding-bottom: .25em; +@ margin: .5em 0 .5em 0; +@ float: left; +@ clear: left; +@ color: #5B677E; +@ } +@ +@ /* The footer at the very bottom of the page */ +@ div.footer { +@ margin: auto; +@ min-width: 850px; +@ width: 94%; +@ font-size: 0.8em; +@ padding: 5px 10px 5px 10px; +@ text-align: right; +@ color: #777; +@ margin-top: 10px; +@ margin-bottom: 10px; +@ } +@ +@ /* Make the links in the footer less ugly... */ +@ div.footer a { color: white; } +@ div.footer a:link { color: white; } +@ div.footer a:visited { color: white; } +@ div.footer a:hover { background-color: white; color: #558195; } +@ +@ /* blocks */ +@ pre.verbatim { +@ background-color: #f3f3f3; +@ padding: 0.5em; +@ } +@ +@ /* The label/value pairs on (for example) the ci page */ +@ table.label-value th { +@ vertical-align: top; +@ text-align: right; +@ padding: 0.2ex 2ex; +@ } +@ +@ /* For marking important UI elements which shouldn''t be +@ lightly dismissed. I mainly use it to mark "not yet +@ implemented" parts of a page. Whether or not to have +@ a ''border'' attribute set is arguable. */ +@ .achtung { +@ color: #ff0000; +@ background: #ffff00; +@ border: 1px solid #ff0000; +@ } +@ +@ div.miniform { +@ font-size: smaller; +@ margin: 8px; +@ } +@ +@ hr { +@ height: 0; +@ color: #ccc; +@ background-color: #ccc; +@ border: 0; +@ margin-top: 15px; +@ margin-bottom: 15px; +@ border-top: 1px solid #ccc; +@ border-bottom: 1px solid #fff; +@ } +@ +@ table { +@ font-size: 1em; +@ } +@ +@ a:link { +@ color: #004080; +@ text-decoration: none; +@ } +@ +@ a:visited { +@ color: #6A4A95; +@ text-decoration: none; +@ } +@ +@ a:hover { +@ color: #24548F; +@ text-decoration: underline; +@ } +@ +@ a:visited:hover { +@ color: #6A4A95; +@ text-decoration: underline; +@ } +@ +@ table.report { +@ margin-bottom: 1em; +@ border: 1px solid #bbb; +@ border-spacing: 0; +@ border-collapse: collapse; +@ } +@ +@ table.report td, table.report th { +@ border: 1px solid #bbb; +@ border-width: 1px; +@ border-spacing: 0; +@ padding: 4px; +@ } +@ +@ /* Ticket view */ +@ +@ td.tkt-label { +@ text-align: right; +@ color: #666; +@ } +@ +@ td.tkt-label-comments { +@ color: #666; +@ } +@ +@ td.tkt-value, td.tkt-value-comments { +@ background-color: #fcfcfc; +@ border: 1px solid #ddd; +@ -webkit-border-radius: 3px; +@ -webkit-border-radius: 3px; +@ -moz-border-radius: 3px; +@ -moz-border-radius: 3px; +@ border-radius: 3px; +@ border-radius: 3px; +@ } +@ +@ td.tkt-value-comments { +@ padding: 15px; +@ } +@ +@ /* Retro side by side diff colors */ +@ span.diffadd { +@ background-color: rgb(220, 244, 220); +@ } +@ span.diffrm { +@ background-color: rgb(244, 220, 220); +@ } +@ span.diffchng { +@ background-color: rgb(220, 220, 244); +@ } +@ '); +@ REPLACE INTO config(name,mtime,value) VALUES('header',now(),' +@ +@ +@ +@ $<project_name>: $<title> +@ +@ +@ +@ +@
+@ +@
+@
+@ +@
+@
+@ if {[info exists login]} { +@ puts "Logged in as $login" +@ } else { +@ puts "Not logged in" +@ } +@
+@
$</div> +@ '); +@ REPLACE INTO config(name,mtime,value) VALUES('footer',now(),' +@ </div><!-- / subcontainer --> +@ </div><!-- / container --> +@ <div class="footer"> +@ Fossil version $manifest_version $manifest_date +@ </div> +@ </body></html> +@ '); +; + /* ** This skin is intended to be almost identical to the default one, with the ** following changes to the header and footer: ** @@ -1260,10 +1634,11 @@ { "Plain Gray, No Logo", zBuiltinSkin1 }, { "Khaki, No Logo", zBuiltinSkin2 }, { "Black & White, Menu on Left", zBuiltinSkin3 }, { "Shadow boxes & Rounded Corners", zBuiltinSkin4 }, { "Enhanced Default", zBuiltinSkin5 }, + { "Shiny Fossil", zBuiltinSkinShinyFossil }, }; /* ** For a skin named zSkinName, compute the name of the CONFIG table ** entry where that skin is stored and return it. Index: src/sqlcmd.c ================================================================== --- src/sqlcmd.c +++ src/sqlcmd.c @@ -127,24 +127,23 @@ } /* ** COMMAND: sqlite3 ** -** Usage: %fossil sqlite3 ?DATABASE? ?OPTIONS? +** Usage: %fossil sqlite3 DATABASE ?OPTIONS? ** ** Run the standalone sqlite3 command-line shell on DATABASE with OPTIONS. -** If DATABASE is omitted, then the repository that serves the working -** directory is opened. ** ** WARNING: Careless use of this command can corrupt a Fossil repository ** in ways that are unrecoverable. Be sure you know what you are doing before ** running any SQL commands that modifies the repository database. */ void cmd_sqlite3(void){ extern int sqlite3_shell(int, char**); - db_find_and_open_repository(OPEN_ANY_SCHEMA, 0); - db_close(1); + if( g.argc<3 ){ + usage("DATABASE"); + } sqlite3_shutdown(); sqlite3_shell(g.argc-1, g.argv+1); g.db = 0; } Index: src/timeline.c ================================================================== --- src/timeline.c +++ src/timeline.c @@ -104,18 +104,66 @@ #endif /* ** Hash a string and use the hash to determine a background color. */ +char *hash_color_hsv(const char *z){ + int i; /* Loop counter, intermediate value */ + unsigned int hash = 0; /* Hash on the branch name */ + int r, g, b; /* Values for red, green, and blue */ + float h, s, v; /* Values for hue, saturation and value */ + float f, p, q, t; /* Intermediate values */ + static char zColor[10]; /* The resulting color */ + + for(i=0; z[i]; i++ ){ + hash = (hash<<11) ^ (hash<<1) ^ (hash>>3) ^ z[i]; + } + + // Calculate or assume HSV + if( db_get_boolean("white-foreground", 0) ) { + h = hash % 360; hash /= 360; + s = 0.7 + (hash % 5) / 100.0; hash /= 5; + v = 0.3 - (hash % 5) / 100.0; hash /= 5; + } + else { + h = hash % 360; hash /= 360; + s = 0.1 + (hash % 5) / 100.0; hash /= 5; + v = 1.0 - (hash % 5) / 100.0; hash /= 5; + } + + // Conversion + // Reference: http://www.cs.rit.edu/~ncs/color/t_convert.html + h = h / 60.0; + i = h; + f = h - i; + p = v * (1 - s); + q = v * (1 - s * f); + t = v * (1 - s * (1 - f)); + + // Calculate RGB + switch( i ){ + case 0: r = v * 255; g = t * 255, b = p * 255; break; + case 1: r = q * 255; g = v * 255, b = p * 255; break; + case 2: r = p * 255; g = v * 255, b = t * 255; break; + case 3: r = p * 255; g = q * 255, b = v * 255; break; + case 4: r = t * 255; g = p * 255, b = v * 255; break; + default: r = v * 255; g = p * 255, b = q * 255; break; + } + + sqlite3_snprintf(8, zColor, "#%02x%02x%02x", r,g,b); + return zColor; +} char *hash_color(const char *z){ int i; /* Loop counter */ unsigned int h = 0; /* Hash on the branch name */ int r, g, b; /* Values for red, green, and blue */ int h1, h2, h3, h4; /* Elements of the hash value */ int mx, mn; /* Components of HSV */ static char zColor[10]; /* The resulting color */ static int ix[2] = {0,0}; /* Color chooser parameters */ + + return (hash_color_hsv (z)); if( ix[0]==0 ){ if( db_get_boolean("white-foreground", 0) ){ ix[0] = 140; ix[1] = 40; ADDED tools/color.xls Index: tools/color.xls ================================================================== --- /dev/null +++ tools/color.xls cannot compute difference between binary files ADDED www/home.wiki Index: www/home.wiki ================================================================== --- /dev/null +++ www/home.wiki @@ -0,0 +1,18 @@ +<title>Home Page + + +This is a clone of [http://fossil-scm.org | Fossil] with some custom changes. + + +For information about what is fossil, please refer original home of fossil at [http://fossil-scm.org]. + +

List of customizations

+
    +
  • If graphical diff utility is specified (in settings), gdiff command uses graphical diff utility even if there are more than one files to diff. +
  • Minor fixes to show relative paths correctly. +
  • Require DATABASE parameter to sqlite3 command and let this command be run from outside an open repository. +
  • Use HSV based algorithm to select background colors for branches in timeline. +
  • Add a custom skin named 'Shiny Fossil' to default list of skins. +
+ +This clone is maintained by Urmil Parikh. All above changes are under branch: urmil.