Fossil

Check-in [130b8f77]
Login

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

Overview
Comment:Add the test-hash-color command for testing the hash_color() function.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 130b8f77ff5856259fc1caa926f1344dfb86e022
User & Date: drh 2011-08-26 14:11:22.655
Context
2011-08-26
14:49
Add the colortest query parameter to the brlist webpage. ... (check-in: d0daac20 user: drh tags: trunk)
14:11
Add the test-hash-color command for testing the hash_color() function. ... (check-in: 130b8f77 user: drh tags: trunk)
14:10
Merge the "stash rm" command into trunk. ... (check-in: 0b4f8306 user: drh tags: trunk)
Changes
Unified Diff Show Whitespace Changes Patch
Changes to src/timeline.c.
150
151
152
153
154
155
156















157
158
159
160
161
162
163
    case 3:  r = mn; g = h2, b = mx;  break;
    case 4:  r = h2; g = mn, b = mx;  break;
    default: r = mx; g = mn, b = h2;  break;
  }
  sqlite3_snprintf(8, zColor, "#%02x%02x%02x", r,g,b);
  return zColor;
}
















/*
** Output a timeline in the web format given a query.  The query
** should return these columns:
**
**    0.  rid
**    1.  UUID







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







150
151
152
153
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
    case 3:  r = mn; g = h2, b = mx;  break;
    case 4:  r = h2; g = mn, b = mx;  break;
    default: r = mx; g = mn, b = h2;  break;
  }
  sqlite3_snprintf(8, zColor, "#%02x%02x%02x", r,g,b);
  return zColor;
}

/*
** COMMAND:  test-hash-color
**
** Usage: %fossil test-hash-color TAG ...
**
** Print out the color names associated with each tag.  Used for
** testing the hash_color() function.
*/
void test_hash_color(void){
  int i;
  for(i=2; i<g.argc; i++){
    fossil_print("%20s: %s\n", g.argv[i], hash_color(g.argv[i]));
  }
}

/*
** Output a timeline in the web format given a query.  The query
** should return these columns:
**
**    0.  rid
**    1.  UUID