Fossil SCM

Fixed mis-quoting of wiki page changes in the timeline CLI (/timeline was unaffected). They were including the (user: X) bit in the quotes for the page name.

stephan 2021-02-12 14:31 trunk
Commit 336d83e3437e8d867bacaa4bb17f491714f26e69a56548411312b6863c9d6468
1 file changed +10 -3
+10 -3
--- src/timeline.c
+++ src/timeline.c
@@ -2871,16 +2871,23 @@
28712871
}
28722872
if( zType && zType[0]=='w'
28732873
&& (zCom[0]=='+' || zCom[0]=='-' || zCom[0]==':')
28742874
){
28752875
/* Special processing for Wiki comments */
2876
+ if(!zComShort || !*zComShort){
2877
+ /* Shouldn't be possible, but just in case... */
2878
+ zComShort = " ";
2879
+ }
28762880
if( zCom[0]=='+' ){
2877
- zFree = mprintf("[%S] Add wiki page \"%s\"", zId, zCom+1);
2881
+ zFree = mprintf("[%S] Add wiki page \"%s\" (user: %s)",
2882
+ zId, zComShort+1, zUserShort);
28782883
}else if( zCom[0]=='-' ){
2879
- zFree = mprintf("[%S] Delete wiki page \"%s\"", zId, zCom+1);
2884
+ zFree = mprintf("[%S] Delete wiki page \"%s\" (user: %s)",
2885
+ zId, zComShort+1, zUserShort);
28802886
}else{
2881
- zFree = mprintf("[%S] Edit to wiki page \"%s\"", zId, zCom+1);
2887
+ zFree = mprintf("[%S] Edit to wiki page \"%s\" (user: %s)",
2888
+ zId, zComShort+1, zUserShort);
28822889
}
28832890
}else{
28842891
zFree = mprintf("[%S] %s%s", zId, zPrefix, zCom);
28852892
}
28862893
28872894
--- src/timeline.c
+++ src/timeline.c
@@ -2871,16 +2871,23 @@
2871 }
2872 if( zType && zType[0]=='w'
2873 && (zCom[0]=='+' || zCom[0]=='-' || zCom[0]==':')
2874 ){
2875 /* Special processing for Wiki comments */
 
 
 
 
2876 if( zCom[0]=='+' ){
2877 zFree = mprintf("[%S] Add wiki page \"%s\"", zId, zCom+1);
 
2878 }else if( zCom[0]=='-' ){
2879 zFree = mprintf("[%S] Delete wiki page \"%s\"", zId, zCom+1);
 
2880 }else{
2881 zFree = mprintf("[%S] Edit to wiki page \"%s\"", zId, zCom+1);
 
2882 }
2883 }else{
2884 zFree = mprintf("[%S] %s%s", zId, zPrefix, zCom);
2885 }
2886
2887
--- src/timeline.c
+++ src/timeline.c
@@ -2871,16 +2871,23 @@
2871 }
2872 if( zType && zType[0]=='w'
2873 && (zCom[0]=='+' || zCom[0]=='-' || zCom[0]==':')
2874 ){
2875 /* Special processing for Wiki comments */
2876 if(!zComShort || !*zComShort){
2877 /* Shouldn't be possible, but just in case... */
2878 zComShort = " ";
2879 }
2880 if( zCom[0]=='+' ){
2881 zFree = mprintf("[%S] Add wiki page \"%s\" (user: %s)",
2882 zId, zComShort+1, zUserShort);
2883 }else if( zCom[0]=='-' ){
2884 zFree = mprintf("[%S] Delete wiki page \"%s\" (user: %s)",
2885 zId, zComShort+1, zUserShort);
2886 }else{
2887 zFree = mprintf("[%S] Edit to wiki page \"%s\" (user: %s)",
2888 zId, zComShort+1, zUserShort);
2889 }
2890 }else{
2891 zFree = mprintf("[%S] %s%s", zId, zPrefix, zCom);
2892 }
2893
2894

Keyboard Shortcuts

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