Fossil SCM
For the "fossil sync" command if the -v option is repeated, then the HTTP_VERBOSE flag is set on the http_exchange() call, resulting in additional debugging output for the wire protocol.
Commit
8089622419a9e5fb78e9f33b927a307647b91c30f52f064cf4a0b3e3bb8022d3
Parent
47362306a7dd7c6…
2 files changed
+5
-1
+7
-1
+5
-1
| --- src/sync.c | ||
| +++ src/sync.c | ||
| @@ -234,10 +234,13 @@ | ||
| 234 | 234 | if( find_option("private",0,0)!=0 ){ |
| 235 | 235 | *pSyncFlags |= SYNC_PRIVATE; |
| 236 | 236 | } |
| 237 | 237 | if( find_option("verbose","v",0)!=0 ){ |
| 238 | 238 | *pSyncFlags |= SYNC_VERBOSE; |
| 239 | + if( find_option("verbose","v",0)!=0 ){ | |
| 240 | + *pSyncFlags |= SYNC_XVERBOSE; | |
| 241 | + } | |
| 239 | 242 | } |
| 240 | 243 | if( find_option("no-http-compression",0,0)!=0 ){ |
| 241 | 244 | *pSyncFlags |= SYNC_NOHTTPCOMPRESS; |
| 242 | 245 | } |
| 243 | 246 | if( find_option("all",0,0)!=0 ){ |
| @@ -334,11 +337,12 @@ | ||
| 334 | 337 | ** -R|--repository REPO Local repository to pull into |
| 335 | 338 | ** --ssl-identity FILE Local SSL credentials, if requested by remote |
| 336 | 339 | ** --ssh-command SSH Use SSH as the "ssh" command |
| 337 | 340 | ** --transport-command CMD Use external command CMD to move messages |
| 338 | 341 | ** between client and server |
| 339 | -** -v|--verbose Additional (debugging) output | |
| 342 | +** -v|--verbose Additional (debugging) output - use twice to | |
| 343 | +** also trace network traffic. | |
| 340 | 344 | ** --verily Exchange extra information with the remote |
| 341 | 345 | ** to ensure no content is overlooked |
| 342 | 346 | ** |
| 343 | 347 | ** See also: [[clone]], [[config]], [[push]], [[remote]], [[sync]] |
| 344 | 348 | */ |
| 345 | 349 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -234,10 +234,13 @@ | |
| 234 | if( find_option("private",0,0)!=0 ){ |
| 235 | *pSyncFlags |= SYNC_PRIVATE; |
| 236 | } |
| 237 | if( find_option("verbose","v",0)!=0 ){ |
| 238 | *pSyncFlags |= SYNC_VERBOSE; |
| 239 | } |
| 240 | if( find_option("no-http-compression",0,0)!=0 ){ |
| 241 | *pSyncFlags |= SYNC_NOHTTPCOMPRESS; |
| 242 | } |
| 243 | if( find_option("all",0,0)!=0 ){ |
| @@ -334,11 +337,12 @@ | |
| 334 | ** -R|--repository REPO Local repository to pull into |
| 335 | ** --ssl-identity FILE Local SSL credentials, if requested by remote |
| 336 | ** --ssh-command SSH Use SSH as the "ssh" command |
| 337 | ** --transport-command CMD Use external command CMD to move messages |
| 338 | ** between client and server |
| 339 | ** -v|--verbose Additional (debugging) output |
| 340 | ** --verily Exchange extra information with the remote |
| 341 | ** to ensure no content is overlooked |
| 342 | ** |
| 343 | ** See also: [[clone]], [[config]], [[push]], [[remote]], [[sync]] |
| 344 | */ |
| 345 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -234,10 +234,13 @@ | |
| 234 | if( find_option("private",0,0)!=0 ){ |
| 235 | *pSyncFlags |= SYNC_PRIVATE; |
| 236 | } |
| 237 | if( find_option("verbose","v",0)!=0 ){ |
| 238 | *pSyncFlags |= SYNC_VERBOSE; |
| 239 | if( find_option("verbose","v",0)!=0 ){ |
| 240 | *pSyncFlags |= SYNC_XVERBOSE; |
| 241 | } |
| 242 | } |
| 243 | if( find_option("no-http-compression",0,0)!=0 ){ |
| 244 | *pSyncFlags |= SYNC_NOHTTPCOMPRESS; |
| 245 | } |
| 246 | if( find_option("all",0,0)!=0 ){ |
| @@ -334,11 +337,12 @@ | |
| 337 | ** -R|--repository REPO Local repository to pull into |
| 338 | ** --ssl-identity FILE Local SSL credentials, if requested by remote |
| 339 | ** --ssh-command SSH Use SSH as the "ssh" command |
| 340 | ** --transport-command CMD Use external command CMD to move messages |
| 341 | ** between client and server |
| 342 | ** -v|--verbose Additional (debugging) output - use twice to |
| 343 | ** also trace network traffic. |
| 344 | ** --verily Exchange extra information with the remote |
| 345 | ** to ensure no content is overlooked |
| 346 | ** |
| 347 | ** See also: [[clone]], [[config]], [[push]], [[remote]], [[sync]] |
| 348 | */ |
| 349 |
+7
-1
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -1927,10 +1927,11 @@ | ||
| 1927 | 1927 | #define SYNC_IFABLE 0x01000 /* Inability to sync is not fatal */ |
| 1928 | 1928 | #define SYNC_CKIN_LOCK 0x02000 /* Lock the current check-in */ |
| 1929 | 1929 | #define SYNC_NOHTTPCOMPRESS 0x04000 /* Do not compression HTTP messages */ |
| 1930 | 1930 | #define SYNC_ALLURL 0x08000 /* The --all flag - sync to all URLs */ |
| 1931 | 1931 | #define SYNC_SHARE_LINKS 0x10000 /* Request alternate repo links */ |
| 1932 | +#define SYNC_XVERBOSE 0x20000 /* Extra verbose. Network traffic */ | |
| 1932 | 1933 | #endif |
| 1933 | 1934 | |
| 1934 | 1935 | /* |
| 1935 | 1936 | ** Floating-point absolute value |
| 1936 | 1937 | */ |
| @@ -2260,11 +2261,13 @@ | ||
| 2260 | 2261 | */ |
| 2261 | 2262 | zRandomness = db_text(0, "SELECT hex(randomblob(20))"); |
| 2262 | 2263 | blob_appendf(&send, "# %s\n", zRandomness); |
| 2263 | 2264 | free(zRandomness); |
| 2264 | 2265 | |
| 2265 | - if( syncFlags & SYNC_VERBOSE ){ | |
| 2266 | + if( (syncFlags & SYNC_VERBOSE)!=0 | |
| 2267 | + && (syncFlags & SYNC_XVERBOSE)==0 | |
| 2268 | + ){ | |
| 2266 | 2269 | fossil_print("waiting for server..."); |
| 2267 | 2270 | } |
| 2268 | 2271 | fflush(stdout); |
| 2269 | 2272 | /* Exchange messages with the server */ |
| 2270 | 2273 | if( (syncFlags & SYNC_CLONE)!=0 && nCycle==0 ){ |
| @@ -2273,10 +2276,13 @@ | ||
| 2273 | 2276 | }else{ |
| 2274 | 2277 | mHttpFlags = HTTP_USE_LOGIN; |
| 2275 | 2278 | } |
| 2276 | 2279 | if( syncFlags & SYNC_NOHTTPCOMPRESS ){ |
| 2277 | 2280 | mHttpFlags |= HTTP_NOCOMPRESS; |
| 2281 | + } | |
| 2282 | + if( syncFlags & SYNC_XVERBOSE ){ | |
| 2283 | + mHttpFlags |= HTTP_VERBOSE; | |
| 2278 | 2284 | } |
| 2279 | 2285 | |
| 2280 | 2286 | /* Do the round-trip to the server */ |
| 2281 | 2287 | if( http_exchange(&send, &recv, mHttpFlags, MAX_REDIRECTS, 0) ){ |
| 2282 | 2288 | nErr++; |
| 2283 | 2289 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1927,10 +1927,11 @@ | |
| 1927 | #define SYNC_IFABLE 0x01000 /* Inability to sync is not fatal */ |
| 1928 | #define SYNC_CKIN_LOCK 0x02000 /* Lock the current check-in */ |
| 1929 | #define SYNC_NOHTTPCOMPRESS 0x04000 /* Do not compression HTTP messages */ |
| 1930 | #define SYNC_ALLURL 0x08000 /* The --all flag - sync to all URLs */ |
| 1931 | #define SYNC_SHARE_LINKS 0x10000 /* Request alternate repo links */ |
| 1932 | #endif |
| 1933 | |
| 1934 | /* |
| 1935 | ** Floating-point absolute value |
| 1936 | */ |
| @@ -2260,11 +2261,13 @@ | |
| 2260 | */ |
| 2261 | zRandomness = db_text(0, "SELECT hex(randomblob(20))"); |
| 2262 | blob_appendf(&send, "# %s\n", zRandomness); |
| 2263 | free(zRandomness); |
| 2264 | |
| 2265 | if( syncFlags & SYNC_VERBOSE ){ |
| 2266 | fossil_print("waiting for server..."); |
| 2267 | } |
| 2268 | fflush(stdout); |
| 2269 | /* Exchange messages with the server */ |
| 2270 | if( (syncFlags & SYNC_CLONE)!=0 && nCycle==0 ){ |
| @@ -2273,10 +2276,13 @@ | |
| 2273 | }else{ |
| 2274 | mHttpFlags = HTTP_USE_LOGIN; |
| 2275 | } |
| 2276 | if( syncFlags & SYNC_NOHTTPCOMPRESS ){ |
| 2277 | mHttpFlags |= HTTP_NOCOMPRESS; |
| 2278 | } |
| 2279 | |
| 2280 | /* Do the round-trip to the server */ |
| 2281 | if( http_exchange(&send, &recv, mHttpFlags, MAX_REDIRECTS, 0) ){ |
| 2282 | nErr++; |
| 2283 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1927,10 +1927,11 @@ | |
| 1927 | #define SYNC_IFABLE 0x01000 /* Inability to sync is not fatal */ |
| 1928 | #define SYNC_CKIN_LOCK 0x02000 /* Lock the current check-in */ |
| 1929 | #define SYNC_NOHTTPCOMPRESS 0x04000 /* Do not compression HTTP messages */ |
| 1930 | #define SYNC_ALLURL 0x08000 /* The --all flag - sync to all URLs */ |
| 1931 | #define SYNC_SHARE_LINKS 0x10000 /* Request alternate repo links */ |
| 1932 | #define SYNC_XVERBOSE 0x20000 /* Extra verbose. Network traffic */ |
| 1933 | #endif |
| 1934 | |
| 1935 | /* |
| 1936 | ** Floating-point absolute value |
| 1937 | */ |
| @@ -2260,11 +2261,13 @@ | |
| 2261 | */ |
| 2262 | zRandomness = db_text(0, "SELECT hex(randomblob(20))"); |
| 2263 | blob_appendf(&send, "# %s\n", zRandomness); |
| 2264 | free(zRandomness); |
| 2265 | |
| 2266 | if( (syncFlags & SYNC_VERBOSE)!=0 |
| 2267 | && (syncFlags & SYNC_XVERBOSE)==0 |
| 2268 | ){ |
| 2269 | fossil_print("waiting for server..."); |
| 2270 | } |
| 2271 | fflush(stdout); |
| 2272 | /* Exchange messages with the server */ |
| 2273 | if( (syncFlags & SYNC_CLONE)!=0 && nCycle==0 ){ |
| @@ -2273,10 +2276,13 @@ | |
| 2276 | }else{ |
| 2277 | mHttpFlags = HTTP_USE_LOGIN; |
| 2278 | } |
| 2279 | if( syncFlags & SYNC_NOHTTPCOMPRESS ){ |
| 2280 | mHttpFlags |= HTTP_NOCOMPRESS; |
| 2281 | } |
| 2282 | if( syncFlags & SYNC_XVERBOSE ){ |
| 2283 | mHttpFlags |= HTTP_VERBOSE; |
| 2284 | } |
| 2285 | |
| 2286 | /* Do the round-trip to the server */ |
| 2287 | if( http_exchange(&send, &recv, mHttpFlags, MAX_REDIRECTS, 0) ){ |
| 2288 | nErr++; |
| 2289 |