Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Improved description of tag changes in the EVENT table, and hence on the timeline. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
7367cec4c8d3b3c07300de6c2edfe949 |
| User & Date: | drh 2012-02-14 01:48:17.203 |
Context
|
2012-02-16
| ||
| 01:03 | Always convert the result of getenv() into UTF8. ... (check-in: 57152086b8 user: drh tags: trunk) | |
|
2012-02-14
| ||
| 01:48 | Improved description of tag changes in the EVENT table, and hence on the timeline. ... (check-in: 7367cec4c8 user: drh tags: trunk) | |
|
2012-02-13
| ||
| 22:50 | Collect the various file-scope variables used by the "db.c" module into a single structure. This is code cleanup. There are no functional changes. ... (check-in: a537c99531 user: drh tags: trunk) | |
Changes
Changes to src/manifest.c.
| ︙ | ︙ | |||
1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 |
}
if( p->type==CFTYPE_CONTROL ){
Blob comment;
int i;
const char *zName;
const char *zValue;
const char *zUuid;
blob_zero(&comment);
for(i=0; i<p->nTag; i++){
zUuid = p->aTag[i].zUuid;
if( i==0 || fossil_strcmp(zUuid, p->aTag[i-1].zUuid)!=0 ){
if( i>0 ) blob_append(&comment, " ", 1);
| > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | | | | | < < | | | | | | > > | 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 |
}
if( p->type==CFTYPE_CONTROL ){
Blob comment;
int i;
const char *zName;
const char *zValue;
const char *zUuid;
int branchMove = 0;
blob_zero(&comment);
for(i=0; i<p->nTag; i++){
zUuid = p->aTag[i].zUuid;
if( i==0 || fossil_strcmp(zUuid, p->aTag[i-1].zUuid)!=0 ){
if( i>0 ) blob_append(&comment, " ", 1);
blob_appendf(&comment,
"Edit [[/info/%S | %S]]:",
zUuid, zUuid);
branchMove = 0;
}
zName = p->aTag[i].zName;
zValue = p->aTag[i].zValue;
if( strcmp(zName, "*branch")==0 ){
blob_appendf(&comment,
" Move to branch [/timeline?r=%h&nd&dp=%S | %h].",
zValue, zUuid, zValue);
branchMove = 1;
}else if( strcmp(zName, "*bgcolor")==0 ){
blob_appendf(&comment,
" Change branch background color to \"%h\".", zValue);
}else if( strcmp(zName, "+bgcolor")==0 ){
blob_appendf(&comment,
" Change background color to \"%h\".", zValue);
}else if( strcmp(zName, "-bgcolor")==0 ){
blob_appendf(&comment, " Cancel background color.");
}else if( strcmp(zName, "+comment")==0 ){
blob_appendf(&comment, " Edit check-in comment.");
}else if( strcmp(zName, "+user")==0 ){
blob_appendf(&comment, " Change user to \"%h\".", zValue);
}else if( strcmp(zName, "+date")==0 ){
blob_appendf(&comment, " Timestamp %h.", zValue);
}else if( memcmp(zName, "-sym-",5)==0 ){
if( !branchMove ) blob_appendf(&comment, " Cancel tag %h.", &zName[5]);
}else if( memcmp(zName, "*sym-",5)==0 ){
if( !branchMove ){
blob_appendf(&comment, " Add propagating tag \"%h\".", &zName[5]);
}
}else if( memcmp(zName, "+sym-",5)==0 ){
blob_appendf(&comment, " Add tag \"%h\".", &zName[5]);
}else if( memcmp(zName, "-sym-",5)==0 ){
blob_appendf(&comment, " Cancel tag \"%h\".", &zName[5]);
}else if( strcmp(zName, "+closed")==0 ){
blob_appendf(&comment, " Marked \"Closed\".");
}else if( strcmp(zName, "-closed")==0 ){
blob_appendf(&comment, " Removed the \"Closed\" mark.");
}else {
if( zName[0]=='-' ){
blob_appendf(&comment, " Cancel \"%h\"", &zName[1]);
}else if( zName[0]=='+' ){
blob_appendf(&comment, " Add \"%h\"", &zName[1]);
}else{
blob_appendf(&comment, " Add propagating \"%h\"", &zName[1]);
}
if( zValue && zValue[0] ){
blob_appendf(&comment, " with value \"%h\".", zValue);
}else{
blob_appendf(&comment, ".");
}
}
}
/*blob_appendf(&comment, " [[/info/%S | details]]");*/
db_multi_exec(
"REPLACE INTO event(type,mtime,objid,user,comment)"
"VALUES('g',%.17g,%d,%Q,%Q)",
p->rDate, rid, p->zUser, blob_str(&comment)
);
blob_reset(&comment);
}
|
| ︙ | ︙ |
Changes to src/timeline.c.
| ︙ | ︙ | |||
362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
char *zLink = mprintf("%s/timeline?u=%h&c=%t&nd",
g.zTop, zUser, zDate);
@ (user: <a href="%s(zLink)">%h(zUser)</a>%s(zTagList?",":"\051")
fossil_free(zLink);
}else{
@ (user: %h(zUser)%s(zTagList?",":"\051")
}
/* Generate the "tags: TAGLIST" at the end of the comment, together
** with hyperlinks to the tag list.
*/
if( zTagList ){
if( g.perm.History ){
int i;
| > > > > > | 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 |
char *zLink = mprintf("%s/timeline?u=%h&c=%t&nd",
g.zTop, zUser, zDate);
@ (user: <a href="%s(zLink)">%h(zUser)</a>%s(zTagList?",":"\051")
fossil_free(zLink);
}else{
@ (user: %h(zUser)%s(zTagList?",":"\051")
}
/* Generate a "detail" link for tags. */
if( zType[0]=='g' && g.perm.History ){
@ [<a href="%s(g.zTop)/info/%S(zUuid)">details</a>]
}
/* Generate the "tags: TAGLIST" at the end of the comment, together
** with hyperlinks to the tag list.
*/
if( zTagList ){
if( g.perm.History ){
int i;
|
| ︙ | ︙ | |||
391 392 393 394 395 396 397 398 399 400 401 402 403 404 |
}
@ tags: %s(blob_str(&links)))
blob_reset(&links);
}else{
@ tags: %h(zTagList))
}
}
/* Generate extra hyperlinks at the end of the comment */
if( xExtra ){
xExtra(rid);
}
/* Generate the file-change list if requested */
| > | 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
}
@ tags: %s(blob_str(&links)))
blob_reset(&links);
}else{
@ tags: %h(zTagList))
}
}
/* Generate extra hyperlinks at the end of the comment */
if( xExtra ){
xExtra(rid);
}
/* Generate the file-change list if requested */
|
| ︙ | ︙ |