Diff
Not logged in

Differences From:

File src/tkt.c part of check-in [58903a0fec] - Add more hyperlinks on dates and userids. by drh on 2009-08-29 22:39:44. [view]

To:

File src/tkt.c part of check-in [95f5520a09] - Construct event records for tickets correctly even when the ticket change artifacts arrive out of order. by drh on 2009-09-14 14:08:35. [view]

@@ -198,9 +198,9 @@
 **
 ** Return TRUE if a new TICKET entry was created and FALSE if an
 ** existing entry was revised.
 */
-int ticket_insert(Manifest *p, int createFlag, int checkTime){
+int ticket_insert(const Manifest *p, int createFlag, int checkTime){
   Blob sql;
   Stmt q;
   int i;
   const char *zSep;
@@ -265,8 +265,9 @@
     int rid = db_column_int(&q, 0);
     content_get(rid, &content);
     manifest_parse(&manifest, &content);
     ticket_insert(&manifest, createFlag, 0);
+    manifest_ticket_event(rid, &manifest, createFlag);
     manifest_clear(&manifest);
     createFlag = 0;
   }
   db_finalize(&q);
@@ -457,9 +458,11 @@
     rid = content_put(&tktchng, 0, 0);
     if( rid==0 ){
       fossil_panic("trouble committing ticket: %s", g.zErrMsg);
     }
+    manifest_crosslink_begin();
     manifest_crosslink(rid, &tktchng);
+    manifest_crosslink_end();
   }
   return TH_RETURN;
 }
 
@@ -691,9 +694,10 @@
       memcpy(zUuid, zChngUuid, 10);
       zUuid[10] = 0;
       @
       @ Ticket change
-      @ [<a href="%s(g.zTop)/artifact/%T(zChngUuid)">%s(zUuid)</a>]</a> by
+      @ [<a href="%s(g.zTop)/artifact/%T(zChngUuid)">%s(zUuid)</a>]</a>
+      @ (rid %d(rid)) by
       hyperlink_to_user(m.zUser,zDate," on");
       hyperlink_to_date(zDate, ":");
       free(zDate);
       ticket_output_change_artifact(&m);