Fossil SCM
The common script should be run even when no hook is set. Improvements to consistency and style of hook integration.
Commit
7f39fb61cb0039ad4525f4d510eef85d7e5b84ab
Parent
bc276e4daf8db67…
2 files changed
+17
-12
+13
-13
+17
-12
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -1502,20 +1502,20 @@ | ||
| 1502 | 1502 | int rc = TH_OK; |
| 1503 | 1503 | int permitHooks = (flags & MC_PERMIT_HOOKS); |
| 1504 | 1504 | const char *zScript = 0; |
| 1505 | 1505 | assert( manifest_crosslink_busy==1 ); |
| 1506 | 1506 | if( permitHooks ){ |
| 1507 | - zScript = xfer_ticket_code(); | |
| 1508 | - if( zScript ){ | |
| 1509 | - rc = xfer_run_common_script(); | |
| 1507 | + rc = xfer_run_common_script(); | |
| 1508 | + if( rc==TH_OK ){ | |
| 1509 | + zScript = xfer_ticket_code(); | |
| 1510 | 1510 | } |
| 1511 | 1511 | } |
| 1512 | 1512 | db_prepare(&q, "SELECT uuid FROM pending_tkt"); |
| 1513 | 1513 | while( db_step(&q)==SQLITE_ROW ){ |
| 1514 | 1514 | const char *zUuid = db_column_text(&q, 0); |
| 1515 | 1515 | ticket_rebuild_entry(zUuid); |
| 1516 | - if( rc==TH_OK && zScript ){ | |
| 1516 | + if( permitHooks && rc==TH_OK ){ | |
| 1517 | 1517 | rc = xfer_run_script(zScript, zUuid); |
| 1518 | 1518 | } |
| 1519 | 1519 | } |
| 1520 | 1520 | db_finalize(&q); |
| 1521 | 1521 | db_multi_exec("DROP TABLE pending_tkt"); |
| @@ -1670,14 +1670,15 @@ | ||
| 1670 | 1670 | ** Processing for other control artifacts was added later. The name |
| 1671 | 1671 | ** of the routine, "manifest_crosslink", and the name of this source |
| 1672 | 1672 | ** file, is a legacy of its original use. |
| 1673 | 1673 | */ |
| 1674 | 1674 | int manifest_crosslink(int rid, Blob *pContent, int flags){ |
| 1675 | - int i, result = TH_OK; | |
| 1675 | + int i, rc = TH_OK; | |
| 1676 | 1676 | Manifest *p; |
| 1677 | 1677 | Stmt q; |
| 1678 | 1678 | int parentid = 0; |
| 1679 | + int permitHooks = (flags & MC_PERMIT_HOOKS); | |
| 1679 | 1680 | const char *zScript = 0; |
| 1680 | 1681 | const char *zUuid = 0; |
| 1681 | 1682 | |
| 1682 | 1683 | if( (p = manifest_cache_find(rid))!=0 ){ |
| 1683 | 1684 | blob_reset(pContent); |
| @@ -1698,11 +1699,13 @@ | ||
| 1698 | 1699 | fossil_error(1, "cannot fetch baseline manifest"); |
| 1699 | 1700 | return 0; |
| 1700 | 1701 | } |
| 1701 | 1702 | db_begin_transaction(); |
| 1702 | 1703 | if( p->type==CFTYPE_MANIFEST ){ |
| 1703 | - zScript = xfer_commit_code(); | |
| 1704 | + if( permitHooks ){ | |
| 1705 | + zScript = xfer_commit_code(); | |
| 1706 | + } | |
| 1704 | 1707 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1705 | 1708 | if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d", rid) ){ |
| 1706 | 1709 | char *zCom; |
| 1707 | 1710 | for(i=0; i<p->nParent; i++){ |
| 1708 | 1711 | int pid = uuid_to_rid(p->azParent[i], 1); |
| @@ -1979,11 +1982,13 @@ | ||
| 1979 | 1982 | zTagUuid); |
| 1980 | 1983 | branchMove = 0; |
| 1981 | 1984 | if( db_exists("SELECT 1 FROM event, blob" |
| 1982 | 1985 | " WHERE event.type='ci' AND event.objid=blob.rid" |
| 1983 | 1986 | " AND blob.uuid='%s'", zTagUuid) ){ |
| 1984 | - zScript = xfer_commit_code(); | |
| 1987 | + if( permitHooks ){ | |
| 1988 | + zScript = xfer_commit_code(); | |
| 1989 | + } | |
| 1985 | 1990 | zUuid = zTagUuid; |
| 1986 | 1991 | } |
| 1987 | 1992 | } |
| 1988 | 1993 | zName = p->aTag[i].zName; |
| 1989 | 1994 | zValue = p->aTag[i].zValue; |
| @@ -2053,23 +2058,23 @@ | ||
| 2053 | 2058 | p->rDate, rid, p->zUser, blob_str(&comment)+1 |
| 2054 | 2059 | ); |
| 2055 | 2060 | blob_reset(&comment); |
| 2056 | 2061 | } |
| 2057 | 2062 | db_end_transaction(0); |
| 2058 | - if( zScript && (flags & MC_PERMIT_HOOKS) ){ | |
| 2059 | - result = xfer_run_common_script(); | |
| 2060 | - if( result==TH_OK ){ | |
| 2061 | - result = xfer_run_script(zScript, zUuid); | |
| 2063 | + if( permitHooks ){ | |
| 2064 | + rc = xfer_run_common_script(); | |
| 2065 | + if( rc==TH_OK ){ | |
| 2066 | + rc = xfer_run_script(zScript, zUuid); | |
| 2062 | 2067 | } |
| 2063 | 2068 | } |
| 2064 | 2069 | if( p->type==CFTYPE_MANIFEST ){ |
| 2065 | 2070 | manifest_cache_insert(p); |
| 2066 | 2071 | }else{ |
| 2067 | 2072 | manifest_destroy(p); |
| 2068 | 2073 | } |
| 2069 | 2074 | assert( blob_is_reset(pContent) ); |
| 2070 | - return ( result!=TH_ERROR ); | |
| 2075 | + return ( rc!=TH_ERROR ); | |
| 2071 | 2076 | } |
| 2072 | 2077 | |
| 2073 | 2078 | /* |
| 2074 | 2079 | ** COMMAND: test-crosslink |
| 2075 | 2080 | ** |
| 2076 | 2081 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -1502,20 +1502,20 @@ | |
| 1502 | int rc = TH_OK; |
| 1503 | int permitHooks = (flags & MC_PERMIT_HOOKS); |
| 1504 | const char *zScript = 0; |
| 1505 | assert( manifest_crosslink_busy==1 ); |
| 1506 | if( permitHooks ){ |
| 1507 | zScript = xfer_ticket_code(); |
| 1508 | if( zScript ){ |
| 1509 | rc = xfer_run_common_script(); |
| 1510 | } |
| 1511 | } |
| 1512 | db_prepare(&q, "SELECT uuid FROM pending_tkt"); |
| 1513 | while( db_step(&q)==SQLITE_ROW ){ |
| 1514 | const char *zUuid = db_column_text(&q, 0); |
| 1515 | ticket_rebuild_entry(zUuid); |
| 1516 | if( rc==TH_OK && zScript ){ |
| 1517 | rc = xfer_run_script(zScript, zUuid); |
| 1518 | } |
| 1519 | } |
| 1520 | db_finalize(&q); |
| 1521 | db_multi_exec("DROP TABLE pending_tkt"); |
| @@ -1670,14 +1670,15 @@ | |
| 1670 | ** Processing for other control artifacts was added later. The name |
| 1671 | ** of the routine, "manifest_crosslink", and the name of this source |
| 1672 | ** file, is a legacy of its original use. |
| 1673 | */ |
| 1674 | int manifest_crosslink(int rid, Blob *pContent, int flags){ |
| 1675 | int i, result = TH_OK; |
| 1676 | Manifest *p; |
| 1677 | Stmt q; |
| 1678 | int parentid = 0; |
| 1679 | const char *zScript = 0; |
| 1680 | const char *zUuid = 0; |
| 1681 | |
| 1682 | if( (p = manifest_cache_find(rid))!=0 ){ |
| 1683 | blob_reset(pContent); |
| @@ -1698,11 +1699,13 @@ | |
| 1698 | fossil_error(1, "cannot fetch baseline manifest"); |
| 1699 | return 0; |
| 1700 | } |
| 1701 | db_begin_transaction(); |
| 1702 | if( p->type==CFTYPE_MANIFEST ){ |
| 1703 | zScript = xfer_commit_code(); |
| 1704 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1705 | if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d", rid) ){ |
| 1706 | char *zCom; |
| 1707 | for(i=0; i<p->nParent; i++){ |
| 1708 | int pid = uuid_to_rid(p->azParent[i], 1); |
| @@ -1979,11 +1982,13 @@ | |
| 1979 | zTagUuid); |
| 1980 | branchMove = 0; |
| 1981 | if( db_exists("SELECT 1 FROM event, blob" |
| 1982 | " WHERE event.type='ci' AND event.objid=blob.rid" |
| 1983 | " AND blob.uuid='%s'", zTagUuid) ){ |
| 1984 | zScript = xfer_commit_code(); |
| 1985 | zUuid = zTagUuid; |
| 1986 | } |
| 1987 | } |
| 1988 | zName = p->aTag[i].zName; |
| 1989 | zValue = p->aTag[i].zValue; |
| @@ -2053,23 +2058,23 @@ | |
| 2053 | p->rDate, rid, p->zUser, blob_str(&comment)+1 |
| 2054 | ); |
| 2055 | blob_reset(&comment); |
| 2056 | } |
| 2057 | db_end_transaction(0); |
| 2058 | if( zScript && (flags & MC_PERMIT_HOOKS) ){ |
| 2059 | result = xfer_run_common_script(); |
| 2060 | if( result==TH_OK ){ |
| 2061 | result = xfer_run_script(zScript, zUuid); |
| 2062 | } |
| 2063 | } |
| 2064 | if( p->type==CFTYPE_MANIFEST ){ |
| 2065 | manifest_cache_insert(p); |
| 2066 | }else{ |
| 2067 | manifest_destroy(p); |
| 2068 | } |
| 2069 | assert( blob_is_reset(pContent) ); |
| 2070 | return ( result!=TH_ERROR ); |
| 2071 | } |
| 2072 | |
| 2073 | /* |
| 2074 | ** COMMAND: test-crosslink |
| 2075 | ** |
| 2076 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -1502,20 +1502,20 @@ | |
| 1502 | int rc = TH_OK; |
| 1503 | int permitHooks = (flags & MC_PERMIT_HOOKS); |
| 1504 | const char *zScript = 0; |
| 1505 | assert( manifest_crosslink_busy==1 ); |
| 1506 | if( permitHooks ){ |
| 1507 | rc = xfer_run_common_script(); |
| 1508 | if( rc==TH_OK ){ |
| 1509 | zScript = xfer_ticket_code(); |
| 1510 | } |
| 1511 | } |
| 1512 | db_prepare(&q, "SELECT uuid FROM pending_tkt"); |
| 1513 | while( db_step(&q)==SQLITE_ROW ){ |
| 1514 | const char *zUuid = db_column_text(&q, 0); |
| 1515 | ticket_rebuild_entry(zUuid); |
| 1516 | if( permitHooks && rc==TH_OK ){ |
| 1517 | rc = xfer_run_script(zScript, zUuid); |
| 1518 | } |
| 1519 | } |
| 1520 | db_finalize(&q); |
| 1521 | db_multi_exec("DROP TABLE pending_tkt"); |
| @@ -1670,14 +1670,15 @@ | |
| 1670 | ** Processing for other control artifacts was added later. The name |
| 1671 | ** of the routine, "manifest_crosslink", and the name of this source |
| 1672 | ** file, is a legacy of its original use. |
| 1673 | */ |
| 1674 | int manifest_crosslink(int rid, Blob *pContent, int flags){ |
| 1675 | int i, rc = TH_OK; |
| 1676 | Manifest *p; |
| 1677 | Stmt q; |
| 1678 | int parentid = 0; |
| 1679 | int permitHooks = (flags & MC_PERMIT_HOOKS); |
| 1680 | const char *zScript = 0; |
| 1681 | const char *zUuid = 0; |
| 1682 | |
| 1683 | if( (p = manifest_cache_find(rid))!=0 ){ |
| 1684 | blob_reset(pContent); |
| @@ -1698,11 +1699,13 @@ | |
| 1699 | fossil_error(1, "cannot fetch baseline manifest"); |
| 1700 | return 0; |
| 1701 | } |
| 1702 | db_begin_transaction(); |
| 1703 | if( p->type==CFTYPE_MANIFEST ){ |
| 1704 | if( permitHooks ){ |
| 1705 | zScript = xfer_commit_code(); |
| 1706 | } |
| 1707 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1708 | if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d", rid) ){ |
| 1709 | char *zCom; |
| 1710 | for(i=0; i<p->nParent; i++){ |
| 1711 | int pid = uuid_to_rid(p->azParent[i], 1); |
| @@ -1979,11 +1982,13 @@ | |
| 1982 | zTagUuid); |
| 1983 | branchMove = 0; |
| 1984 | if( db_exists("SELECT 1 FROM event, blob" |
| 1985 | " WHERE event.type='ci' AND event.objid=blob.rid" |
| 1986 | " AND blob.uuid='%s'", zTagUuid) ){ |
| 1987 | if( permitHooks ){ |
| 1988 | zScript = xfer_commit_code(); |
| 1989 | } |
| 1990 | zUuid = zTagUuid; |
| 1991 | } |
| 1992 | } |
| 1993 | zName = p->aTag[i].zName; |
| 1994 | zValue = p->aTag[i].zValue; |
| @@ -2053,23 +2058,23 @@ | |
| 2058 | p->rDate, rid, p->zUser, blob_str(&comment)+1 |
| 2059 | ); |
| 2060 | blob_reset(&comment); |
| 2061 | } |
| 2062 | db_end_transaction(0); |
| 2063 | if( permitHooks ){ |
| 2064 | rc = xfer_run_common_script(); |
| 2065 | if( rc==TH_OK ){ |
| 2066 | rc = xfer_run_script(zScript, zUuid); |
| 2067 | } |
| 2068 | } |
| 2069 | if( p->type==CFTYPE_MANIFEST ){ |
| 2070 | manifest_cache_insert(p); |
| 2071 | }else{ |
| 2072 | manifest_destroy(p); |
| 2073 | } |
| 2074 | assert( blob_is_reset(pContent) ); |
| 2075 | return ( rc!=TH_ERROR ); |
| 2076 | } |
| 2077 | |
| 2078 | /* |
| 2079 | ** COMMAND: test-crosslink |
| 2080 | ** |
| 2081 |
+13
-13
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -852,25 +852,25 @@ | ||
| 852 | 852 | |
| 853 | 853 | /* |
| 854 | 854 | ** Run the specified TH1 script, if any, and returns 1 on error. |
| 855 | 855 | */ |
| 856 | 856 | int xfer_run_script(const char *zScript, const char *zUuid){ |
| 857 | - int result; | |
| 857 | + int rc; | |
| 858 | 858 | if( !zScript ) return TH_OK; |
| 859 | 859 | Th_FossilInit(TH_INIT_DEFAULT); |
| 860 | 860 | if( zUuid ){ |
| 861 | - result = Th_SetVar(g.interp, "uuid", -1, zUuid, -1); | |
| 862 | - if( result!=TH_OK ){ | |
| 861 | + rc = Th_SetVar(g.interp, "uuid", -1, zUuid, -1); | |
| 862 | + if( rc!=TH_OK ){ | |
| 863 | 863 | fossil_error(1, "%s", Th_GetResult(g.interp, 0)); |
| 864 | - return result; | |
| 864 | + return rc; | |
| 865 | 865 | } |
| 866 | 866 | } |
| 867 | - result = Th_Eval(g.interp, 0, zScript, -1); | |
| 868 | - if( result!=TH_OK ){ | |
| 867 | + rc = Th_Eval(g.interp, 0, zScript, -1); | |
| 868 | + if( rc!=TH_OK ){ | |
| 869 | 869 | fossil_error(1, "%s", Th_GetResult(g.interp, 0)); |
| 870 | 870 | } |
| 871 | - return result; | |
| 871 | + return rc; | |
| 872 | 872 | } |
| 873 | 873 | |
| 874 | 874 | /* |
| 875 | 875 | ** Runs the pre-transfer TH1 script, if any, and returns its return code. |
| 876 | 876 | ** This script may be run multiple times. If the script performs actions |
| @@ -914,11 +914,11 @@ | ||
| 914 | 914 | int isClone = 0; |
| 915 | 915 | int nGimme = 0; |
| 916 | 916 | int size; |
| 917 | 917 | int recvConfig = 0; |
| 918 | 918 | char *zNow; |
| 919 | - int result; | |
| 919 | + int rc; | |
| 920 | 920 | |
| 921 | 921 | if( fossil_strcmp(PD("REQUEST_METHOD","POST"),"POST") ){ |
| 922 | 922 | fossil_redirect_home(); |
| 923 | 923 | } |
| 924 | 924 | g.zLogin = "anonymous"; |
| @@ -944,12 +944,12 @@ | ||
| 944 | 944 | db_begin_transaction(); |
| 945 | 945 | db_multi_exec( |
| 946 | 946 | "CREATE TEMP TABLE onremote(rid INTEGER PRIMARY KEY);" |
| 947 | 947 | ); |
| 948 | 948 | manifest_crosslink_begin(); |
| 949 | - result = xfer_run_common_script(); | |
| 950 | - if( result==TH_ERROR ){ | |
| 949 | + rc = xfer_run_common_script(); | |
| 950 | + if( rc==TH_ERROR ){ | |
| 951 | 951 | cgi_reset_content(); |
| 952 | 952 | @ error common\sscript\sfailed:\s%F(g.zErrMsg) |
| 953 | 953 | nErr++; |
| 954 | 954 | } |
| 955 | 955 | while( blob_line(xfer.pIn, &xfer.line) ){ |
| @@ -1272,13 +1272,13 @@ | ||
| 1272 | 1272 | } |
| 1273 | 1273 | blobarray_reset(xfer.aToken, xfer.nToken); |
| 1274 | 1274 | blob_reset(&xfer.line); |
| 1275 | 1275 | } |
| 1276 | 1276 | if( isPush ){ |
| 1277 | - if( result==TH_OK ){ | |
| 1278 | - result = xfer_run_script(xfer_push_code(), 0); | |
| 1279 | - if( result==TH_ERROR ){ | |
| 1277 | + if( rc==TH_OK ){ | |
| 1278 | + rc = xfer_run_script(xfer_push_code(), 0); | |
| 1279 | + if( rc==TH_ERROR ){ | |
| 1280 | 1280 | cgi_reset_content(); |
| 1281 | 1281 | @ error push\sscript\sfailed:\s%F(g.zErrMsg) |
| 1282 | 1282 | nErr++; |
| 1283 | 1283 | } |
| 1284 | 1284 | } |
| 1285 | 1285 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -852,25 +852,25 @@ | |
| 852 | |
| 853 | /* |
| 854 | ** Run the specified TH1 script, if any, and returns 1 on error. |
| 855 | */ |
| 856 | int xfer_run_script(const char *zScript, const char *zUuid){ |
| 857 | int result; |
| 858 | if( !zScript ) return TH_OK; |
| 859 | Th_FossilInit(TH_INIT_DEFAULT); |
| 860 | if( zUuid ){ |
| 861 | result = Th_SetVar(g.interp, "uuid", -1, zUuid, -1); |
| 862 | if( result!=TH_OK ){ |
| 863 | fossil_error(1, "%s", Th_GetResult(g.interp, 0)); |
| 864 | return result; |
| 865 | } |
| 866 | } |
| 867 | result = Th_Eval(g.interp, 0, zScript, -1); |
| 868 | if( result!=TH_OK ){ |
| 869 | fossil_error(1, "%s", Th_GetResult(g.interp, 0)); |
| 870 | } |
| 871 | return result; |
| 872 | } |
| 873 | |
| 874 | /* |
| 875 | ** Runs the pre-transfer TH1 script, if any, and returns its return code. |
| 876 | ** This script may be run multiple times. If the script performs actions |
| @@ -914,11 +914,11 @@ | |
| 914 | int isClone = 0; |
| 915 | int nGimme = 0; |
| 916 | int size; |
| 917 | int recvConfig = 0; |
| 918 | char *zNow; |
| 919 | int result; |
| 920 | |
| 921 | if( fossil_strcmp(PD("REQUEST_METHOD","POST"),"POST") ){ |
| 922 | fossil_redirect_home(); |
| 923 | } |
| 924 | g.zLogin = "anonymous"; |
| @@ -944,12 +944,12 @@ | |
| 944 | db_begin_transaction(); |
| 945 | db_multi_exec( |
| 946 | "CREATE TEMP TABLE onremote(rid INTEGER PRIMARY KEY);" |
| 947 | ); |
| 948 | manifest_crosslink_begin(); |
| 949 | result = xfer_run_common_script(); |
| 950 | if( result==TH_ERROR ){ |
| 951 | cgi_reset_content(); |
| 952 | @ error common\sscript\sfailed:\s%F(g.zErrMsg) |
| 953 | nErr++; |
| 954 | } |
| 955 | while( blob_line(xfer.pIn, &xfer.line) ){ |
| @@ -1272,13 +1272,13 @@ | |
| 1272 | } |
| 1273 | blobarray_reset(xfer.aToken, xfer.nToken); |
| 1274 | blob_reset(&xfer.line); |
| 1275 | } |
| 1276 | if( isPush ){ |
| 1277 | if( result==TH_OK ){ |
| 1278 | result = xfer_run_script(xfer_push_code(), 0); |
| 1279 | if( result==TH_ERROR ){ |
| 1280 | cgi_reset_content(); |
| 1281 | @ error push\sscript\sfailed:\s%F(g.zErrMsg) |
| 1282 | nErr++; |
| 1283 | } |
| 1284 | } |
| 1285 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -852,25 +852,25 @@ | |
| 852 | |
| 853 | /* |
| 854 | ** Run the specified TH1 script, if any, and returns 1 on error. |
| 855 | */ |
| 856 | int xfer_run_script(const char *zScript, const char *zUuid){ |
| 857 | int rc; |
| 858 | if( !zScript ) return TH_OK; |
| 859 | Th_FossilInit(TH_INIT_DEFAULT); |
| 860 | if( zUuid ){ |
| 861 | rc = Th_SetVar(g.interp, "uuid", -1, zUuid, -1); |
| 862 | if( rc!=TH_OK ){ |
| 863 | fossil_error(1, "%s", Th_GetResult(g.interp, 0)); |
| 864 | return rc; |
| 865 | } |
| 866 | } |
| 867 | rc = Th_Eval(g.interp, 0, zScript, -1); |
| 868 | if( rc!=TH_OK ){ |
| 869 | fossil_error(1, "%s", Th_GetResult(g.interp, 0)); |
| 870 | } |
| 871 | return rc; |
| 872 | } |
| 873 | |
| 874 | /* |
| 875 | ** Runs the pre-transfer TH1 script, if any, and returns its return code. |
| 876 | ** This script may be run multiple times. If the script performs actions |
| @@ -914,11 +914,11 @@ | |
| 914 | int isClone = 0; |
| 915 | int nGimme = 0; |
| 916 | int size; |
| 917 | int recvConfig = 0; |
| 918 | char *zNow; |
| 919 | int rc; |
| 920 | |
| 921 | if( fossil_strcmp(PD("REQUEST_METHOD","POST"),"POST") ){ |
| 922 | fossil_redirect_home(); |
| 923 | } |
| 924 | g.zLogin = "anonymous"; |
| @@ -944,12 +944,12 @@ | |
| 944 | db_begin_transaction(); |
| 945 | db_multi_exec( |
| 946 | "CREATE TEMP TABLE onremote(rid INTEGER PRIMARY KEY);" |
| 947 | ); |
| 948 | manifest_crosslink_begin(); |
| 949 | rc = xfer_run_common_script(); |
| 950 | if( rc==TH_ERROR ){ |
| 951 | cgi_reset_content(); |
| 952 | @ error common\sscript\sfailed:\s%F(g.zErrMsg) |
| 953 | nErr++; |
| 954 | } |
| 955 | while( blob_line(xfer.pIn, &xfer.line) ){ |
| @@ -1272,13 +1272,13 @@ | |
| 1272 | } |
| 1273 | blobarray_reset(xfer.aToken, xfer.nToken); |
| 1274 | blob_reset(&xfer.line); |
| 1275 | } |
| 1276 | if( isPush ){ |
| 1277 | if( rc==TH_OK ){ |
| 1278 | rc = xfer_run_script(xfer_push_code(), 0); |
| 1279 | if( rc==TH_ERROR ){ |
| 1280 | cgi_reset_content(); |
| 1281 | @ error push\sscript\sfailed:\s%F(g.zErrMsg) |
| 1282 | nErr++; |
| 1283 | } |
| 1284 | } |
| 1285 |