Fossil SCM
Only check for forks if content was received.
Commit
440ed5da095da58161376dd9d08d5217df896e02
Parent
fc3d9f52ee54e29…
3 files changed
+1
+1
+1
-1
+1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -656,10 +656,11 @@ | ||
| 656 | 656 | "in conjunction with any other flags.\n"); |
| 657 | 657 | fossil_exit(1); |
| 658 | 658 | }else{ |
| 659 | 659 | const char *zChdir = find_option("chdir",0,1); |
| 660 | 660 | g.isHTTP = 0; |
| 661 | + g.rcvid = 0; | |
| 661 | 662 | g.fQuiet = find_option("quiet", 0, 0)!=0; |
| 662 | 663 | g.fSqlTrace = find_option("sqltrace", 0, 0)!=0; |
| 663 | 664 | g.fSqlStats = find_option("sqlstats", 0, 0)!=0; |
| 664 | 665 | g.fSystemTrace = find_option("systemtrace", 0, 0)!=0; |
| 665 | 666 | g.fSshTrace = find_option("sshtrace", 0, 0)!=0; |
| 666 | 667 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -656,10 +656,11 @@ | |
| 656 | "in conjunction with any other flags.\n"); |
| 657 | fossil_exit(1); |
| 658 | }else{ |
| 659 | const char *zChdir = find_option("chdir",0,1); |
| 660 | g.isHTTP = 0; |
| 661 | g.fQuiet = find_option("quiet", 0, 0)!=0; |
| 662 | g.fSqlTrace = find_option("sqltrace", 0, 0)!=0; |
| 663 | g.fSqlStats = find_option("sqlstats", 0, 0)!=0; |
| 664 | g.fSystemTrace = find_option("systemtrace", 0, 0)!=0; |
| 665 | g.fSshTrace = find_option("sshtrace", 0, 0)!=0; |
| 666 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -656,10 +656,11 @@ | |
| 656 | "in conjunction with any other flags.\n"); |
| 657 | fossil_exit(1); |
| 658 | }else{ |
| 659 | const char *zChdir = find_option("chdir",0,1); |
| 660 | g.isHTTP = 0; |
| 661 | g.rcvid = 0; |
| 662 | g.fQuiet = find_option("quiet", 0, 0)!=0; |
| 663 | g.fSqlTrace = find_option("sqltrace", 0, 0)!=0; |
| 664 | g.fSqlStats = find_option("sqlstats", 0, 0)!=0; |
| 665 | g.fSystemTrace = find_option("systemtrace", 0, 0)!=0; |
| 666 | g.fSshTrace = find_option("sshtrace", 0, 0)!=0; |
| 667 |
+1
| --- src/merge.c | ||
| +++ src/merge.c | ||
| @@ -107,10 +107,11 @@ | ||
| 107 | 107 | */ |
| 108 | 108 | int fossil_any_has_fork(int rcvid){ |
| 109 | 109 | static Stmt q; |
| 110 | 110 | int fForkSeen = 0; |
| 111 | 111 | |
| 112 | + if( rcvid==0 ) return 0; | |
| 112 | 113 | db_static_prepare(&q, |
| 113 | 114 | " SELECT pid FROM plink WHERE pid>0 AND isprim" |
| 114 | 115 | " AND cid IN (SELECT blob.rid FROM blob" |
| 115 | 116 | " WHERE rcvid=:rcvid)"); |
| 116 | 117 | db_bind_int(&q, ":rcvid", rcvid); |
| 117 | 118 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -107,10 +107,11 @@ | |
| 107 | */ |
| 108 | int fossil_any_has_fork(int rcvid){ |
| 109 | static Stmt q; |
| 110 | int fForkSeen = 0; |
| 111 | |
| 112 | db_static_prepare(&q, |
| 113 | " SELECT pid FROM plink WHERE pid>0 AND isprim" |
| 114 | " AND cid IN (SELECT blob.rid FROM blob" |
| 115 | " WHERE rcvid=:rcvid)"); |
| 116 | db_bind_int(&q, ":rcvid", rcvid); |
| 117 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -107,10 +107,11 @@ | |
| 107 | */ |
| 108 | int fossil_any_has_fork(int rcvid){ |
| 109 | static Stmt q; |
| 110 | int fForkSeen = 0; |
| 111 | |
| 112 | if( rcvid==0 ) return 0; |
| 113 | db_static_prepare(&q, |
| 114 | " SELECT pid FROM plink WHERE pid>0 AND isprim" |
| 115 | " AND cid IN (SELECT blob.rid FROM blob" |
| 116 | " WHERE rcvid=:rcvid)"); |
| 117 | db_bind_int(&q, ":rcvid", rcvid); |
| 118 |
+1
-1
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -1972,11 +1972,11 @@ | ||
| 1972 | 1972 | db_multi_exec("DROP TABLE onremote"); |
| 1973 | 1973 | manifest_crosslink_end(MC_PERMIT_HOOKS); |
| 1974 | 1974 | content_enable_dephantomize(1); |
| 1975 | 1975 | db_end_transaction(0); |
| 1976 | 1976 | } |
| 1977 | - if( (syncFlags & SYNC_CLONE)==0 && fossil_any_has_fork(g.rcvid) ){ | |
| 1977 | + if( (syncFlags & SYNC_CLONE)==0 && g.rcvid && fossil_any_has_fork(g.rcvid) ){ | |
| 1978 | 1978 | fossil_warning("***** WARNING: a fork has occurred *****\n" |
| 1979 | 1979 | "use \"fossil leaves -multiple\" for more details."); |
| 1980 | 1980 | } |
| 1981 | 1981 | return nErr; |
| 1982 | 1982 | } |
| 1983 | 1983 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1972,11 +1972,11 @@ | |
| 1972 | db_multi_exec("DROP TABLE onremote"); |
| 1973 | manifest_crosslink_end(MC_PERMIT_HOOKS); |
| 1974 | content_enable_dephantomize(1); |
| 1975 | db_end_transaction(0); |
| 1976 | } |
| 1977 | if( (syncFlags & SYNC_CLONE)==0 && fossil_any_has_fork(g.rcvid) ){ |
| 1978 | fossil_warning("***** WARNING: a fork has occurred *****\n" |
| 1979 | "use \"fossil leaves -multiple\" for more details."); |
| 1980 | } |
| 1981 | return nErr; |
| 1982 | } |
| 1983 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1972,11 +1972,11 @@ | |
| 1972 | db_multi_exec("DROP TABLE onremote"); |
| 1973 | manifest_crosslink_end(MC_PERMIT_HOOKS); |
| 1974 | content_enable_dephantomize(1); |
| 1975 | db_end_transaction(0); |
| 1976 | } |
| 1977 | if( (syncFlags & SYNC_CLONE)==0 && g.rcvid && fossil_any_has_fork(g.rcvid) ){ |
| 1978 | fossil_warning("***** WARNING: a fork has occurred *****\n" |
| 1979 | "use \"fossil leaves -multiple\" for more details."); |
| 1980 | } |
| 1981 | return nErr; |
| 1982 | } |
| 1983 |