Fossil SCM
Make the TH1 common script result handling more consistent. Minor style fixes.
Commit
0ffe1b08fa9071c8f7e8a2d9dd8cb4a2798e39b3
Parent
d79eaeb101ecbf5…
2 files changed
+2
-2
+6
-6
+2
-2
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -2038,21 +2038,21 @@ | ||
| 2038 | 2038 | blob_reset(&comment); |
| 2039 | 2039 | } |
| 2040 | 2040 | db_end_transaction(0); |
| 2041 | 2041 | if( flags & MC_PERMIT_HOOKS ){ |
| 2042 | 2042 | result = xfer_run_common_script(); |
| 2043 | - if( result==TH_OK){ | |
| 2043 | + if( result==TH_OK ){ | |
| 2044 | 2044 | result = xfer_run_script(zScript, zUuid); |
| 2045 | 2045 | } |
| 2046 | 2046 | } |
| 2047 | 2047 | if( p->type==CFTYPE_MANIFEST ){ |
| 2048 | 2048 | manifest_cache_insert(p); |
| 2049 | 2049 | }else{ |
| 2050 | 2050 | manifest_destroy(p); |
| 2051 | 2051 | } |
| 2052 | 2052 | assert( blob_is_reset(pContent) ); |
| 2053 | - return (result!=TH_ERROR); | |
| 2053 | + return ( result!=TH_ERROR ); | |
| 2054 | 2054 | } |
| 2055 | 2055 | |
| 2056 | 2056 | /* |
| 2057 | 2057 | ** COMMAND: test-crosslink |
| 2058 | 2058 | ** |
| 2059 | 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 |
| --- 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 @@ | ||
| 1273 | 1273 | } |
| 1274 | 1274 | blobarray_reset(xfer.aToken, xfer.nToken); |
| 1275 | 1275 | blob_reset(&xfer.line); |
| 1276 | 1276 | } |
| 1277 | 1277 | if( isPush ){ |
| 1278 | - if (result!=TH_ERROR){ | |
| 1278 | + if( result==TH_OK ){ | |
| 1279 | 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++; | |
| 1280 | + if( result==TH_ERROR ){ | |
| 1281 | + cgi_reset_content(); | |
| 1282 | + @ error push\sscript\sfailed:\s%F(g.zErrMsg) | |
| 1283 | + nErr++; | |
| 1284 | + } | |
| 1285 | 1285 | } |
| 1286 | 1286 | request_phantoms(&xfer, 500); |
| 1287 | 1287 | } |
| 1288 | 1288 | if( isClone && nGimme==0 ){ |
| 1289 | 1289 | /* The initial "clone" message from client to server contains no |
| 1290 | 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_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 |