Fossil SCM

Begin the transaction block before inserting any content.

andybradford 2016-10-22 19:52 trunk
Commit 1b6635a47fd8a1adbb9448f03b442f9bf5dc7faf
1 file changed +1 -1
+1 -1
--- src/tkt.c
+++ src/tkt.c
@@ -546,10 +546,11 @@
546546
Blob *pTicket, /* The text of the ticket change record */
547547
const char *zTktId, /* The ticket to which this change is applied */
548548
int needMod /* True if moderation is needed */
549549
){
550550
int result;
551
+ manifest_crosslink_begin();
551552
int rid = content_put_ex(pTicket, 0, 0, 0, needMod);
552553
if( rid==0 ){
553554
fossil_fatal("trouble committing ticket: %s", g.zErrMsg);
554555
}
555556
if( needMod ){
@@ -560,11 +561,10 @@
560561
);
561562
}else{
562563
db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d);", rid);
563564
db_multi_exec("INSERT OR IGNORE INTO unclustered VALUES(%d);", rid);
564565
}
565
- manifest_crosslink_begin();
566566
result = (manifest_crosslink(rid, pTicket, MC_NONE)==0);
567567
assert( blob_is_reset(pTicket) );
568568
if( !result ){
569569
result = manifest_crosslink_end(MC_PERMIT_HOOKS);
570570
}else{
571571
--- src/tkt.c
+++ src/tkt.c
@@ -546,10 +546,11 @@
546 Blob *pTicket, /* The text of the ticket change record */
547 const char *zTktId, /* The ticket to which this change is applied */
548 int needMod /* True if moderation is needed */
549 ){
550 int result;
 
551 int rid = content_put_ex(pTicket, 0, 0, 0, needMod);
552 if( rid==0 ){
553 fossil_fatal("trouble committing ticket: %s", g.zErrMsg);
554 }
555 if( needMod ){
@@ -560,11 +561,10 @@
560 );
561 }else{
562 db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d);", rid);
563 db_multi_exec("INSERT OR IGNORE INTO unclustered VALUES(%d);", rid);
564 }
565 manifest_crosslink_begin();
566 result = (manifest_crosslink(rid, pTicket, MC_NONE)==0);
567 assert( blob_is_reset(pTicket) );
568 if( !result ){
569 result = manifest_crosslink_end(MC_PERMIT_HOOKS);
570 }else{
571
--- src/tkt.c
+++ src/tkt.c
@@ -546,10 +546,11 @@
546 Blob *pTicket, /* The text of the ticket change record */
547 const char *zTktId, /* The ticket to which this change is applied */
548 int needMod /* True if moderation is needed */
549 ){
550 int result;
551 manifest_crosslink_begin();
552 int rid = content_put_ex(pTicket, 0, 0, 0, needMod);
553 if( rid==0 ){
554 fossil_fatal("trouble committing ticket: %s", g.zErrMsg);
555 }
556 if( needMod ){
@@ -560,11 +561,10 @@
561 );
562 }else{
563 db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d);", rid);
564 db_multi_exec("INSERT OR IGNORE INTO unclustered VALUES(%d);", rid);
565 }
 
566 result = (manifest_crosslink(rid, pTicket, MC_NONE)==0);
567 assert( blob_is_reset(pTicket) );
568 if( !result ){
569 result = manifest_crosslink_end(MC_PERMIT_HOOKS);
570 }else{
571

Keyboard Shortcuts

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