Fossil SCM

Make the TH1 common script result handling more consistent. Minor style fixes.

mistachkin 2013-10-15 18:36 tkt-change-hook
Commit 0ffe1b08fa9071c8f7e8a2d9dd8cb4a2798e39b3
2 files changed +2 -2 +6 -6
+2 -2
--- src/manifest.c
+++ src/manifest.c
@@ -2038,21 +2038,21 @@
20382038
blob_reset(&comment);
20392039
}
20402040
db_end_transaction(0);
20412041
if( flags & MC_PERMIT_HOOKS ){
20422042
result = xfer_run_common_script();
2043
- if( result==TH_OK){
2043
+ if( result==TH_OK ){
20442044
result = xfer_run_script(zScript, zUuid);
20452045
}
20462046
}
20472047
if( p->type==CFTYPE_MANIFEST ){
20482048
manifest_cache_insert(p);
20492049
}else{
20502050
manifest_destroy(p);
20512051
}
20522052
assert( blob_is_reset(pContent) );
2053
- return (result!=TH_ERROR);
2053
+ return ( result!=TH_ERROR );
20542054
}
20552055
20562056
/*
20572057
** COMMAND: test-crosslink
20582058
**
20592059
--- src/manifest.c
+++ src/manifest.c
@@ -2038,21 +2038,21 @@
2038 blob_reset(&comment);
2039 }
2040 db_end_transaction(0);
2041 if( flags & MC_PERMIT_HOOKS ){
2042 result = xfer_run_common_script();
2043 if( result==TH_OK){
2044 result = xfer_run_script(zScript, zUuid);
2045 }
2046 }
2047 if( p->type==CFTYPE_MANIFEST ){
2048 manifest_cache_insert(p);
2049 }else{
2050 manifest_destroy(p);
2051 }
2052 assert( blob_is_reset(pContent) );
2053 return (result!=TH_ERROR);
2054 }
2055
2056 /*
2057 ** COMMAND: test-crosslink
2058 **
2059
--- src/manifest.c
+++ src/manifest.c
@@ -2038,21 +2038,21 @@
2038 blob_reset(&comment);
2039 }
2040 db_end_transaction(0);
2041 if( flags & MC_PERMIT_HOOKS ){
2042 result = xfer_run_common_script();
2043 if( result==TH_OK ){
2044 result = xfer_run_script(zScript, zUuid);
2045 }
2046 }
2047 if( p->type==CFTYPE_MANIFEST ){
2048 manifest_cache_insert(p);
2049 }else{
2050 manifest_destroy(p);
2051 }
2052 assert( blob_is_reset(pContent) );
2053 return ( result!=TH_ERROR );
2054 }
2055
2056 /*
2057 ** COMMAND: test-crosslink
2058 **
2059
+6 -6
--- src/xfer.c
+++ src/xfer.c
@@ -1273,17 +1273,17 @@
12731273
}
12741274
blobarray_reset(xfer.aToken, xfer.nToken);
12751275
blob_reset(&xfer.line);
12761276
}
12771277
if( isPush ){
1278
- if (result!=TH_ERROR){
1278
+ if( result==TH_OK ){
12791279
result = xfer_run_script(xfer_push_code(), 0);
1280
- }
1281
- if( result==TH_ERROR ){
1282
- cgi_reset_content();
1283
- @ error push\sscript\sfailed:\s%F(g.zErrMsg)
1284
- nErr++;
1280
+ if( result==TH_ERROR ){
1281
+ cgi_reset_content();
1282
+ @ error push\sscript\sfailed:\s%F(g.zErrMsg)
1283
+ nErr++;
1284
+ }
12851285
}
12861286
request_phantoms(&xfer, 500);
12871287
}
12881288
if( isClone && nGimme==0 ){
12891289
/* The initial "clone" message from client to server contains no
12901290
--- src/xfer.c
+++ src/xfer.c
@@ -1273,17 +1273,17 @@
1273 }
1274 blobarray_reset(xfer.aToken, xfer.nToken);
1275 blob_reset(&xfer.line);
1276 }
1277 if( isPush ){
1278 if (result!=TH_ERROR){
1279 result = xfer_run_script(xfer_push_code(), 0);
1280 }
1281 if( result==TH_ERROR ){
1282 cgi_reset_content();
1283 @ error push\sscript\sfailed:\s%F(g.zErrMsg)
1284 nErr++;
1285 }
1286 request_phantoms(&xfer, 500);
1287 }
1288 if( isClone && nGimme==0 ){
1289 /* The initial "clone" message from client to server contains no
1290
--- src/xfer.c
+++ src/xfer.c
@@ -1273,17 +1273,17 @@
1273 }
1274 blobarray_reset(xfer.aToken, xfer.nToken);
1275 blob_reset(&xfer.line);
1276 }
1277 if( isPush ){
1278 if( result==TH_OK ){
1279 result = xfer_run_script(xfer_push_code(), 0);
1280 if( result==TH_ERROR ){
1281 cgi_reset_content();
1282 @ error push\sscript\sfailed:\s%F(g.zErrMsg)
1283 nErr++;
1284 }
1285 }
1286 request_phantoms(&xfer, 500);
1287 }
1288 if( isClone && nGimme==0 ){
1289 /* The initial "clone" message from client to server contains no
1290

Keyboard Shortcuts

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