Fossil SCM
Add the ability to edit check-in dates using control artifacts. Useful if a user does a check-in when their system clock is set incorrectly thus causing an incorrect timestamp to appear on the check-in artifact.
Commit
ac03d433483d337b47fb5115e970b760e21f6b26
Parent
93992def02ecc00…
4 files changed
+20
-5
+10
-4
+13
-11
+4
+20
-5
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -1241,15 +1241,17 @@ | ||
| 1241 | 1241 | ** * The check-in comment |
| 1242 | 1242 | ** * The background color. |
| 1243 | 1243 | */ |
| 1244 | 1244 | void ci_edit_page(void){ |
| 1245 | 1245 | int rid; |
| 1246 | - const char *zComment; | |
| 1247 | - const char *zNewComment; | |
| 1248 | - const char *zUser; | |
| 1249 | - const char *zNewUser; | |
| 1250 | - const char *zColor; | |
| 1246 | + const char *zComment; /* Current comment on the check-in */ | |
| 1247 | + const char *zNewComment; /* Revised check-in comment */ | |
| 1248 | + const char *zUser; /* Current user for the check-in */ | |
| 1249 | + const char *zNewUser; /* Revised user */ | |
| 1250 | + const char *zDate; /* Current date of the check-in */ | |
| 1251 | + const char *zNewDate; /* Revised check-in date */ | |
| 1252 | + const char *zColor; | |
| 1251 | 1253 | const char *zNewColor; |
| 1252 | 1254 | const char *zNewTagFlag; |
| 1253 | 1255 | const char *zNewTag; |
| 1254 | 1256 | const char *zNewBrFlag; |
| 1255 | 1257 | const char *zNewBranch; |
| @@ -1291,10 +1293,14 @@ | ||
| 1291 | 1293 | zNewComment = PD("c",zComment); |
| 1292 | 1294 | zUser = db_text(0, "SELECT coalesce(euser,user)" |
| 1293 | 1295 | " FROM event WHERE objid=%d", rid); |
| 1294 | 1296 | if( zUser==0 ) fossil_redirect_home(); |
| 1295 | 1297 | zNewUser = PD("u",zUser); |
| 1298 | + zDate = db_text(0, "SELECT datetime(mtime)" | |
| 1299 | + " FROM event WHERE objid=%d", rid); | |
| 1300 | + if( zDate==0 ) fossil_redirect_home(); | |
| 1301 | + zNewDate = PD("dt",zDate); | |
| 1296 | 1302 | zColor = db_text("", "SELECT bgcolor" |
| 1297 | 1303 | " FROM event WHERE objid=%d", rid); |
| 1298 | 1304 | zNewColor = PD("clr",zColor); |
| 1299 | 1305 | fPropagateColor = P("pclr")!=0; |
| 1300 | 1306 | zNewTagFlag = P("newtag") ? " checked" : ""; |
| @@ -1325,10 +1331,14 @@ | ||
| 1325 | 1331 | db_multi_exec("REPLACE INTO newtags VALUES('bgcolor','-',NULL)"); |
| 1326 | 1332 | } |
| 1327 | 1333 | if( strcmp(zComment,zNewComment)!=0 ){ |
| 1328 | 1334 | db_multi_exec("REPLACE INTO newtags VALUES('comment','+',%Q)", |
| 1329 | 1335 | zNewComment); |
| 1336 | + } | |
| 1337 | + if( strcmp(zDate,zNewDate)!=0 ){ | |
| 1338 | + db_multi_exec("REPLACE INTO newtags VALUES('date','+',%Q)", | |
| 1339 | + zNewDate); | |
| 1330 | 1340 | } |
| 1331 | 1341 | if( strcmp(zUser,zNewUser)!=0 ){ |
| 1332 | 1342 | db_multi_exec("REPLACE INTO newtags VALUES('user','+',%Q)", zNewUser); |
| 1333 | 1343 | } |
| 1334 | 1344 | db_prepare(&q, |
| @@ -1445,10 +1455,15 @@ | ||
| 1445 | 1455 | |
| 1446 | 1456 | @ <tr><td align="right" valign="top"><b>Comment:</b></td> |
| 1447 | 1457 | @ <td valign="top"> |
| 1448 | 1458 | @ <textarea name="c" rows="10" cols="80">%h(zNewComment)</textarea> |
| 1449 | 1459 | @ </td></tr> |
| 1460 | + | |
| 1461 | + @ <tr><td align="right" valign="top"><b>Check-in Time:</b></td> | |
| 1462 | + @ <td valign="top"> | |
| 1463 | + @ <input type="text" name="dt" size="20" value="%h(zNewDate)"> | |
| 1464 | + @ </td></tr> | |
| 1450 | 1465 | |
| 1451 | 1466 | @ <tr><td align="right" valign="top"><b>Background Color:</b></td> |
| 1452 | 1467 | @ <td valign="top"> |
| 1453 | 1468 | @ <table border=0 cellpadding=0 cellspacing=1> |
| 1454 | 1469 | @ <tr><td colspan="6" align="left"> |
| 1455 | 1470 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1241,15 +1241,17 @@ | |
| 1241 | ** * The check-in comment |
| 1242 | ** * The background color. |
| 1243 | */ |
| 1244 | void ci_edit_page(void){ |
| 1245 | int rid; |
| 1246 | const char *zComment; |
| 1247 | const char *zNewComment; |
| 1248 | const char *zUser; |
| 1249 | const char *zNewUser; |
| 1250 | const char *zColor; |
| 1251 | const char *zNewColor; |
| 1252 | const char *zNewTagFlag; |
| 1253 | const char *zNewTag; |
| 1254 | const char *zNewBrFlag; |
| 1255 | const char *zNewBranch; |
| @@ -1291,10 +1293,14 @@ | |
| 1291 | zNewComment = PD("c",zComment); |
| 1292 | zUser = db_text(0, "SELECT coalesce(euser,user)" |
| 1293 | " FROM event WHERE objid=%d", rid); |
| 1294 | if( zUser==0 ) fossil_redirect_home(); |
| 1295 | zNewUser = PD("u",zUser); |
| 1296 | zColor = db_text("", "SELECT bgcolor" |
| 1297 | " FROM event WHERE objid=%d", rid); |
| 1298 | zNewColor = PD("clr",zColor); |
| 1299 | fPropagateColor = P("pclr")!=0; |
| 1300 | zNewTagFlag = P("newtag") ? " checked" : ""; |
| @@ -1325,10 +1331,14 @@ | |
| 1325 | db_multi_exec("REPLACE INTO newtags VALUES('bgcolor','-',NULL)"); |
| 1326 | } |
| 1327 | if( strcmp(zComment,zNewComment)!=0 ){ |
| 1328 | db_multi_exec("REPLACE INTO newtags VALUES('comment','+',%Q)", |
| 1329 | zNewComment); |
| 1330 | } |
| 1331 | if( strcmp(zUser,zNewUser)!=0 ){ |
| 1332 | db_multi_exec("REPLACE INTO newtags VALUES('user','+',%Q)", zNewUser); |
| 1333 | } |
| 1334 | db_prepare(&q, |
| @@ -1445,10 +1455,15 @@ | |
| 1445 | |
| 1446 | @ <tr><td align="right" valign="top"><b>Comment:</b></td> |
| 1447 | @ <td valign="top"> |
| 1448 | @ <textarea name="c" rows="10" cols="80">%h(zNewComment)</textarea> |
| 1449 | @ </td></tr> |
| 1450 | |
| 1451 | @ <tr><td align="right" valign="top"><b>Background Color:</b></td> |
| 1452 | @ <td valign="top"> |
| 1453 | @ <table border=0 cellpadding=0 cellspacing=1> |
| 1454 | @ <tr><td colspan="6" align="left"> |
| 1455 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1241,15 +1241,17 @@ | |
| 1241 | ** * The check-in comment |
| 1242 | ** * The background color. |
| 1243 | */ |
| 1244 | void ci_edit_page(void){ |
| 1245 | int rid; |
| 1246 | const char *zComment; /* Current comment on the check-in */ |
| 1247 | const char *zNewComment; /* Revised check-in comment */ |
| 1248 | const char *zUser; /* Current user for the check-in */ |
| 1249 | const char *zNewUser; /* Revised user */ |
| 1250 | const char *zDate; /* Current date of the check-in */ |
| 1251 | const char *zNewDate; /* Revised check-in date */ |
| 1252 | const char *zColor; |
| 1253 | const char *zNewColor; |
| 1254 | const char *zNewTagFlag; |
| 1255 | const char *zNewTag; |
| 1256 | const char *zNewBrFlag; |
| 1257 | const char *zNewBranch; |
| @@ -1291,10 +1293,14 @@ | |
| 1293 | zNewComment = PD("c",zComment); |
| 1294 | zUser = db_text(0, "SELECT coalesce(euser,user)" |
| 1295 | " FROM event WHERE objid=%d", rid); |
| 1296 | if( zUser==0 ) fossil_redirect_home(); |
| 1297 | zNewUser = PD("u",zUser); |
| 1298 | zDate = db_text(0, "SELECT datetime(mtime)" |
| 1299 | " FROM event WHERE objid=%d", rid); |
| 1300 | if( zDate==0 ) fossil_redirect_home(); |
| 1301 | zNewDate = PD("dt",zDate); |
| 1302 | zColor = db_text("", "SELECT bgcolor" |
| 1303 | " FROM event WHERE objid=%d", rid); |
| 1304 | zNewColor = PD("clr",zColor); |
| 1305 | fPropagateColor = P("pclr")!=0; |
| 1306 | zNewTagFlag = P("newtag") ? " checked" : ""; |
| @@ -1325,10 +1331,14 @@ | |
| 1331 | db_multi_exec("REPLACE INTO newtags VALUES('bgcolor','-',NULL)"); |
| 1332 | } |
| 1333 | if( strcmp(zComment,zNewComment)!=0 ){ |
| 1334 | db_multi_exec("REPLACE INTO newtags VALUES('comment','+',%Q)", |
| 1335 | zNewComment); |
| 1336 | } |
| 1337 | if( strcmp(zDate,zNewDate)!=0 ){ |
| 1338 | db_multi_exec("REPLACE INTO newtags VALUES('date','+',%Q)", |
| 1339 | zNewDate); |
| 1340 | } |
| 1341 | if( strcmp(zUser,zNewUser)!=0 ){ |
| 1342 | db_multi_exec("REPLACE INTO newtags VALUES('user','+',%Q)", zNewUser); |
| 1343 | } |
| 1344 | db_prepare(&q, |
| @@ -1445,10 +1455,15 @@ | |
| 1455 | |
| 1456 | @ <tr><td align="right" valign="top"><b>Comment:</b></td> |
| 1457 | @ <td valign="top"> |
| 1458 | @ <textarea name="c" rows="10" cols="80">%h(zNewComment)</textarea> |
| 1459 | @ </td></tr> |
| 1460 | |
| 1461 | @ <tr><td align="right" valign="top"><b>Check-in Time:</b></td> |
| 1462 | @ <td valign="top"> |
| 1463 | @ <input type="text" name="dt" size="20" value="%h(zNewDate)"> |
| 1464 | @ </td></tr> |
| 1465 | |
| 1466 | @ <tr><td align="right" valign="top"><b>Background Color:</b></td> |
| 1467 | @ <td valign="top"> |
| 1468 | @ <table border=0 cellpadding=0 cellspacing=1> |
| 1469 | @ <tr><td colspan="6" align="left"> |
| 1470 |
+10
-4
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -915,16 +915,22 @@ | ||
| 915 | 915 | add_mlink(rid, &m, cid, 0); |
| 916 | 916 | } |
| 917 | 917 | db_finalize(&q); |
| 918 | 918 | db_multi_exec( |
| 919 | 919 | "REPLACE INTO event(type,mtime,objid,user,comment," |
| 920 | - " bgcolor,euser,ecomment)" | |
| 921 | - "VALUES('ci',%.17g,%d,%Q,%Q," | |
| 922 | - " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d AND tagtype>0)," | |
| 920 | + "bgcolor,euser,ecomment)" | |
| 921 | + "VALUES('ci'," | |
| 922 | + " coalesce(" | |
| 923 | + " (SELECT julianday(value) FROM tagxref WHERE tagid=%d AND rid=%d)," | |
| 924 | + " %.17g" | |
| 925 | + " )," | |
| 926 | + " %d,%Q,%Q," | |
| 927 | + " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d AND tagtype>0)," | |
| 923 | 928 | " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d)," |
| 924 | 929 | " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d));", |
| 925 | - m.rDate, rid, m.zUser, m.zComment, | |
| 930 | + TAG_DATE, rid, m.rDate, | |
| 931 | + rid, m.zUser, m.zComment, | |
| 926 | 932 | TAG_BGCOLOR, rid, |
| 927 | 933 | TAG_USER, rid, |
| 928 | 934 | TAG_COMMENT, rid |
| 929 | 935 | ); |
| 930 | 936 | } |
| 931 | 937 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -915,16 +915,22 @@ | |
| 915 | add_mlink(rid, &m, cid, 0); |
| 916 | } |
| 917 | db_finalize(&q); |
| 918 | db_multi_exec( |
| 919 | "REPLACE INTO event(type,mtime,objid,user,comment," |
| 920 | " bgcolor,euser,ecomment)" |
| 921 | "VALUES('ci',%.17g,%d,%Q,%Q," |
| 922 | " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d AND tagtype>0)," |
| 923 | " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d)," |
| 924 | " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d));", |
| 925 | m.rDate, rid, m.zUser, m.zComment, |
| 926 | TAG_BGCOLOR, rid, |
| 927 | TAG_USER, rid, |
| 928 | TAG_COMMENT, rid |
| 929 | ); |
| 930 | } |
| 931 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -915,16 +915,22 @@ | |
| 915 | add_mlink(rid, &m, cid, 0); |
| 916 | } |
| 917 | db_finalize(&q); |
| 918 | db_multi_exec( |
| 919 | "REPLACE INTO event(type,mtime,objid,user,comment," |
| 920 | "bgcolor,euser,ecomment)" |
| 921 | "VALUES('ci'," |
| 922 | " coalesce(" |
| 923 | " (SELECT julianday(value) FROM tagxref WHERE tagid=%d AND rid=%d)," |
| 924 | " %.17g" |
| 925 | " )," |
| 926 | " %d,%Q,%Q," |
| 927 | " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d AND tagtype>0)," |
| 928 | " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d)," |
| 929 | " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d));", |
| 930 | TAG_DATE, rid, m.rDate, |
| 931 | rid, m.zUser, m.zComment, |
| 932 | TAG_BGCOLOR, rid, |
| 933 | TAG_USER, rid, |
| 934 | TAG_COMMENT, rid |
| 935 | ); |
| 936 | } |
| 937 |
+13
-11
| --- src/schema.c | ||
| +++ src/schema.c | ||
| @@ -276,15 +276,16 @@ | ||
| 276 | 276 | @ tagname TEXT UNIQUE -- Tag name. |
| 277 | 277 | @ ); |
| 278 | 278 | @ INSERT INTO tag VALUES(1, 'bgcolor'); -- TAG_BGCOLOR |
| 279 | 279 | @ INSERT INTO tag VALUES(2, 'comment'); -- TAG_COMMENT |
| 280 | 280 | @ INSERT INTO tag VALUES(3, 'user'); -- TAG_USER |
| 281 | -@ INSERT INTO tag VALUES(4, 'hidden'); -- TAG_HIDDEN | |
| 282 | -@ INSERT INTO tag VALUES(5, 'private'); -- TAG_PRIVATE | |
| 283 | -@ INSERT INTO tag VALUES(6, 'cluster'); -- TAG_CLUSTER | |
| 284 | -@ INSERT INTO tag VALUES(7, 'branch'); -- TAG_BRANCH | |
| 285 | -@ INSERT INTO tag VALUES(8, 'closed'); -- TAG_CLOSED | |
| 281 | +@ INSERT INTO tag VALUES(4, 'date'); -- TAG_DATE | |
| 282 | +@ INSERT INTO tag VALUES(5, 'hidden'); -- TAG_HIDDEN | |
| 283 | +@ INSERT INTO tag VALUES(6, 'private'); -- TAG_PRIVATE | |
| 284 | +@ INSERT INTO tag VALUES(7, 'cluster'); -- TAG_CLUSTER | |
| 285 | +@ INSERT INTO tag VALUES(8, 'branch'); -- TAG_BRANCH | |
| 286 | +@ INSERT INTO tag VALUES(9, 'closed'); -- TAG_CLOSED | |
| 286 | 287 | @ |
| 287 | 288 | @ -- Assignments of tags to baselines. Note that we allow tags to |
| 288 | 289 | @ -- have values assigned to them. So we are not really dealing with |
| 289 | 290 | @ -- tags here. These are really properties. But we are going to |
| 290 | 291 | @ -- keep calling them tags because in many cases the value is ignored. |
| @@ -330,18 +331,19 @@ | ||
| 330 | 331 | */ |
| 331 | 332 | #if INTERFACE |
| 332 | 333 | # define TAG_BGCOLOR 1 /* Set the background color for display */ |
| 333 | 334 | # define TAG_COMMENT 2 /* The check-in comment */ |
| 334 | 335 | # define TAG_USER 3 /* User who made a checking */ |
| 335 | -# define TAG_HIDDEN 4 /* Do not display or sync */ | |
| 336 | -# define TAG_PRIVATE 5 /* Display but do not sync */ | |
| 337 | -# define TAG_CLUSTER 6 /* A cluster */ | |
| 338 | -# define TAG_BRANCH 7 /* Value is name of the current branch */ | |
| 339 | -# define TAG_CLOSED 8 /* Do not display this check-in as a leaf */ | |
| 336 | +# define TAG_DATE 4 /* The date of a check-in */ | |
| 337 | +# define TAG_HIDDEN 5 /* Do not display or sync */ | |
| 338 | +# define TAG_PRIVATE 6 /* Display but do not sync */ | |
| 339 | +# define TAG_CLUSTER 7 /* A cluster */ | |
| 340 | +# define TAG_BRANCH 8 /* Value is name of the current branch */ | |
| 341 | +# define TAG_CLOSED 9 /* Do not display this check-in as a leaf */ | |
| 340 | 342 | #endif |
| 341 | 343 | #if EXPORT_INTERFACE |
| 342 | -# define MAX_INT_TAG 8 /* The largest pre-assigned tag id */ | |
| 344 | +# define MAX_INT_TAG 9 /* The largest pre-assigned tag id */ | |
| 343 | 345 | #endif |
| 344 | 346 | |
| 345 | 347 | /* |
| 346 | 348 | ** The schema for the locate FOSSIL database file found at the root |
| 347 | 349 | ** of very check-out. This database contains the complete state of |
| 348 | 350 |
| --- src/schema.c | |
| +++ src/schema.c | |
| @@ -276,15 +276,16 @@ | |
| 276 | @ tagname TEXT UNIQUE -- Tag name. |
| 277 | @ ); |
| 278 | @ INSERT INTO tag VALUES(1, 'bgcolor'); -- TAG_BGCOLOR |
| 279 | @ INSERT INTO tag VALUES(2, 'comment'); -- TAG_COMMENT |
| 280 | @ INSERT INTO tag VALUES(3, 'user'); -- TAG_USER |
| 281 | @ INSERT INTO tag VALUES(4, 'hidden'); -- TAG_HIDDEN |
| 282 | @ INSERT INTO tag VALUES(5, 'private'); -- TAG_PRIVATE |
| 283 | @ INSERT INTO tag VALUES(6, 'cluster'); -- TAG_CLUSTER |
| 284 | @ INSERT INTO tag VALUES(7, 'branch'); -- TAG_BRANCH |
| 285 | @ INSERT INTO tag VALUES(8, 'closed'); -- TAG_CLOSED |
| 286 | @ |
| 287 | @ -- Assignments of tags to baselines. Note that we allow tags to |
| 288 | @ -- have values assigned to them. So we are not really dealing with |
| 289 | @ -- tags here. These are really properties. But we are going to |
| 290 | @ -- keep calling them tags because in many cases the value is ignored. |
| @@ -330,18 +331,19 @@ | |
| 330 | */ |
| 331 | #if INTERFACE |
| 332 | # define TAG_BGCOLOR 1 /* Set the background color for display */ |
| 333 | # define TAG_COMMENT 2 /* The check-in comment */ |
| 334 | # define TAG_USER 3 /* User who made a checking */ |
| 335 | # define TAG_HIDDEN 4 /* Do not display or sync */ |
| 336 | # define TAG_PRIVATE 5 /* Display but do not sync */ |
| 337 | # define TAG_CLUSTER 6 /* A cluster */ |
| 338 | # define TAG_BRANCH 7 /* Value is name of the current branch */ |
| 339 | # define TAG_CLOSED 8 /* Do not display this check-in as a leaf */ |
| 340 | #endif |
| 341 | #if EXPORT_INTERFACE |
| 342 | # define MAX_INT_TAG 8 /* The largest pre-assigned tag id */ |
| 343 | #endif |
| 344 | |
| 345 | /* |
| 346 | ** The schema for the locate FOSSIL database file found at the root |
| 347 | ** of very check-out. This database contains the complete state of |
| 348 |
| --- src/schema.c | |
| +++ src/schema.c | |
| @@ -276,15 +276,16 @@ | |
| 276 | @ tagname TEXT UNIQUE -- Tag name. |
| 277 | @ ); |
| 278 | @ INSERT INTO tag VALUES(1, 'bgcolor'); -- TAG_BGCOLOR |
| 279 | @ INSERT INTO tag VALUES(2, 'comment'); -- TAG_COMMENT |
| 280 | @ INSERT INTO tag VALUES(3, 'user'); -- TAG_USER |
| 281 | @ INSERT INTO tag VALUES(4, 'date'); -- TAG_DATE |
| 282 | @ INSERT INTO tag VALUES(5, 'hidden'); -- TAG_HIDDEN |
| 283 | @ INSERT INTO tag VALUES(6, 'private'); -- TAG_PRIVATE |
| 284 | @ INSERT INTO tag VALUES(7, 'cluster'); -- TAG_CLUSTER |
| 285 | @ INSERT INTO tag VALUES(8, 'branch'); -- TAG_BRANCH |
| 286 | @ INSERT INTO tag VALUES(9, 'closed'); -- TAG_CLOSED |
| 287 | @ |
| 288 | @ -- Assignments of tags to baselines. Note that we allow tags to |
| 289 | @ -- have values assigned to them. So we are not really dealing with |
| 290 | @ -- tags here. These are really properties. But we are going to |
| 291 | @ -- keep calling them tags because in many cases the value is ignored. |
| @@ -330,18 +331,19 @@ | |
| 331 | */ |
| 332 | #if INTERFACE |
| 333 | # define TAG_BGCOLOR 1 /* Set the background color for display */ |
| 334 | # define TAG_COMMENT 2 /* The check-in comment */ |
| 335 | # define TAG_USER 3 /* User who made a checking */ |
| 336 | # define TAG_DATE 4 /* The date of a check-in */ |
| 337 | # define TAG_HIDDEN 5 /* Do not display or sync */ |
| 338 | # define TAG_PRIVATE 6 /* Display but do not sync */ |
| 339 | # define TAG_CLUSTER 7 /* A cluster */ |
| 340 | # define TAG_BRANCH 8 /* Value is name of the current branch */ |
| 341 | # define TAG_CLOSED 9 /* Do not display this check-in as a leaf */ |
| 342 | #endif |
| 343 | #if EXPORT_INTERFACE |
| 344 | # define MAX_INT_TAG 9 /* The largest pre-assigned tag id */ |
| 345 | #endif |
| 346 | |
| 347 | /* |
| 348 | ** The schema for the locate FOSSIL database file found at the root |
| 349 | ** of very check-out. This database contains the complete state of |
| 350 |
+4
| --- src/tag.c | ||
| +++ src/tag.c | ||
| @@ -201,10 +201,14 @@ | ||
| 201 | 201 | } |
| 202 | 202 | } |
| 203 | 203 | if( zCol ){ |
| 204 | 204 | db_multi_exec("UPDATE event SET %s=%Q WHERE objid=%d", zCol, zValue, rid); |
| 205 | 205 | } |
| 206 | + if( tagid==TAG_DATE ){ | |
| 207 | + db_multi_exec("UPDATE event SET mtime=julianday(%Q) WHERE objid=%d", | |
| 208 | + zValue, rid); | |
| 209 | + } | |
| 206 | 210 | if( tagtype==0 || tagtype==2 ){ |
| 207 | 211 | tag_propagate(rid, tagid, tagtype, rid, zValue, mtime); |
| 208 | 212 | } |
| 209 | 213 | } |
| 210 | 214 | |
| 211 | 215 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -201,10 +201,14 @@ | |
| 201 | } |
| 202 | } |
| 203 | if( zCol ){ |
| 204 | db_multi_exec("UPDATE event SET %s=%Q WHERE objid=%d", zCol, zValue, rid); |
| 205 | } |
| 206 | if( tagtype==0 || tagtype==2 ){ |
| 207 | tag_propagate(rid, tagid, tagtype, rid, zValue, mtime); |
| 208 | } |
| 209 | } |
| 210 | |
| 211 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -201,10 +201,14 @@ | |
| 201 | } |
| 202 | } |
| 203 | if( zCol ){ |
| 204 | db_multi_exec("UPDATE event SET %s=%Q WHERE objid=%d", zCol, zValue, rid); |
| 205 | } |
| 206 | if( tagid==TAG_DATE ){ |
| 207 | db_multi_exec("UPDATE event SET mtime=julianday(%Q) WHERE objid=%d", |
| 208 | zValue, rid); |
| 209 | } |
| 210 | if( tagtype==0 || tagtype==2 ){ |
| 211 | tag_propagate(rid, tagid, tagtype, rid, zValue, mtime); |
| 212 | } |
| 213 | } |
| 214 | |
| 215 |