Fossil SCM
Fix bug detected by wiki-15 and wiki-15.1. Left hand thought that the mtime column was the timestamp of the tech note. Right hand thought that the mtime column was the last modification time of the tech note. Left hand was right and the relevant query has been updated to use the objid (assigned as the new tech note manifest is added) as the indication of the most recently modified version of the tech note
dave.vines
2016-05-05 18:26
Commit
e9d7c5aa29c3fca8ac29f6faa050df48a62ae7a0
Parent
99b1a1eae0e4a10…
1 file changed
+4
-3
+4
-3
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -1152,11 +1152,11 @@ | ||
| 1152 | 1152 | rid = db_int(0, "SELECT objid" |
| 1153 | 1153 | " FROM event" |
| 1154 | 1154 | " WHERE datetime(mtime)=datetime('%q')" |
| 1155 | 1155 | " AND type='e'" |
| 1156 | 1156 | " AND tagid IS NOT NULL" |
| 1157 | - " ORDER BY mtime DESC LIMIT 1", | |
| 1157 | + " ORDER BY objid DESC LIMIT 1", | |
| 1158 | 1158 | zETime); |
| 1159 | 1159 | } |
| 1160 | 1160 | } |
| 1161 | 1161 | return rid; |
| 1162 | 1162 | } |
| @@ -1191,12 +1191,13 @@ | ||
| 1191 | 1191 | ** the previous version of the |
| 1192 | 1192 | ** page, or text/x-fossil-wiki. |
| 1193 | 1193 | ** -t|--technote DATETIME Specifies the timestamp of |
| 1194 | 1194 | ** the technote to be created or |
| 1195 | 1195 | ** updated. When updating a tech note |
| 1196 | -** the most recently modified with the | |
| 1197 | -** specified timestamp will be updated. | |
| 1196 | +** the most recently modified tech note | |
| 1197 | +** with the specified timestamp will be | |
| 1198 | +** updated. | |
| 1198 | 1199 | ** -t|--technote TECHNOTE-ID Specifies the technote to be |
| 1199 | 1200 | ** updated by its technote id. |
| 1200 | 1201 | ** --technote-tags TAGS The set of tags for a technote. |
| 1201 | 1202 | ** --technote-bgcolor COLOR The color used for the technote |
| 1202 | 1203 | ** on the timeline. |
| 1203 | 1204 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -1152,11 +1152,11 @@ | |
| 1152 | rid = db_int(0, "SELECT objid" |
| 1153 | " FROM event" |
| 1154 | " WHERE datetime(mtime)=datetime('%q')" |
| 1155 | " AND type='e'" |
| 1156 | " AND tagid IS NOT NULL" |
| 1157 | " ORDER BY mtime DESC LIMIT 1", |
| 1158 | zETime); |
| 1159 | } |
| 1160 | } |
| 1161 | return rid; |
| 1162 | } |
| @@ -1191,12 +1191,13 @@ | |
| 1191 | ** the previous version of the |
| 1192 | ** page, or text/x-fossil-wiki. |
| 1193 | ** -t|--technote DATETIME Specifies the timestamp of |
| 1194 | ** the technote to be created or |
| 1195 | ** updated. When updating a tech note |
| 1196 | ** the most recently modified with the |
| 1197 | ** specified timestamp will be updated. |
| 1198 | ** -t|--technote TECHNOTE-ID Specifies the technote to be |
| 1199 | ** updated by its technote id. |
| 1200 | ** --technote-tags TAGS The set of tags for a technote. |
| 1201 | ** --technote-bgcolor COLOR The color used for the technote |
| 1202 | ** on the timeline. |
| 1203 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -1152,11 +1152,11 @@ | |
| 1152 | rid = db_int(0, "SELECT objid" |
| 1153 | " FROM event" |
| 1154 | " WHERE datetime(mtime)=datetime('%q')" |
| 1155 | " AND type='e'" |
| 1156 | " AND tagid IS NOT NULL" |
| 1157 | " ORDER BY objid DESC LIMIT 1", |
| 1158 | zETime); |
| 1159 | } |
| 1160 | } |
| 1161 | return rid; |
| 1162 | } |
| @@ -1191,12 +1191,13 @@ | |
| 1191 | ** the previous version of the |
| 1192 | ** page, or text/x-fossil-wiki. |
| 1193 | ** -t|--technote DATETIME Specifies the timestamp of |
| 1194 | ** the technote to be created or |
| 1195 | ** updated. When updating a tech note |
| 1196 | ** the most recently modified tech note |
| 1197 | ** with the specified timestamp will be |
| 1198 | ** updated. |
| 1199 | ** -t|--technote TECHNOTE-ID Specifies the technote to be |
| 1200 | ** updated by its technote id. |
| 1201 | ** --technote-tags TAGS The set of tags for a technote. |
| 1202 | ** --technote-bgcolor COLOR The color used for the technote |
| 1203 | ** on the timeline. |
| 1204 |