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.

drh 2023-11-02 19:37 trunk
Commit 8089622419a9e5fb78e9f33b927a307647b91c30f52f064cf4a0b3e3bb8022d3
2 files changed +5 -1 +7 -1
+5 -1
--- src/sync.c
+++ src/sync.c
@@ -234,10 +234,13 @@
234234
if( find_option("private",0,0)!=0 ){
235235
*pSyncFlags |= SYNC_PRIVATE;
236236
}
237237
if( find_option("verbose","v",0)!=0 ){
238238
*pSyncFlags |= SYNC_VERBOSE;
239
+ if( find_option("verbose","v",0)!=0 ){
240
+ *pSyncFlags |= SYNC_XVERBOSE;
241
+ }
239242
}
240243
if( find_option("no-http-compression",0,0)!=0 ){
241244
*pSyncFlags |= SYNC_NOHTTPCOMPRESS;
242245
}
243246
if( find_option("all",0,0)!=0 ){
@@ -334,11 +337,12 @@
334337
** -R|--repository REPO Local repository to pull into
335338
** --ssl-identity FILE Local SSL credentials, if requested by remote
336339
** --ssh-command SSH Use SSH as the "ssh" command
337340
** --transport-command CMD Use external command CMD to move messages
338341
** between client and server
339
-** -v|--verbose Additional (debugging) output
342
+** -v|--verbose Additional (debugging) output - use twice to
343
+** also trace network traffic.
340344
** --verily Exchange extra information with the remote
341345
** to ensure no content is overlooked
342346
**
343347
** See also: [[clone]], [[config]], [[push]], [[remote]], [[sync]]
344348
*/
345349
--- 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 @@
19271927
#define SYNC_IFABLE 0x01000 /* Inability to sync is not fatal */
19281928
#define SYNC_CKIN_LOCK 0x02000 /* Lock the current check-in */
19291929
#define SYNC_NOHTTPCOMPRESS 0x04000 /* Do not compression HTTP messages */
19301930
#define SYNC_ALLURL 0x08000 /* The --all flag - sync to all URLs */
19311931
#define SYNC_SHARE_LINKS 0x10000 /* Request alternate repo links */
1932
+#define SYNC_XVERBOSE 0x20000 /* Extra verbose. Network traffic */
19321933
#endif
19331934
19341935
/*
19351936
** Floating-point absolute value
19361937
*/
@@ -2260,11 +2261,13 @@
22602261
*/
22612262
zRandomness = db_text(0, "SELECT hex(randomblob(20))");
22622263
blob_appendf(&send, "# %s\n", zRandomness);
22632264
free(zRandomness);
22642265
2265
- if( syncFlags & SYNC_VERBOSE ){
2266
+ if( (syncFlags & SYNC_VERBOSE)!=0
2267
+ && (syncFlags & SYNC_XVERBOSE)==0
2268
+ ){
22662269
fossil_print("waiting for server...");
22672270
}
22682271
fflush(stdout);
22692272
/* Exchange messages with the server */
22702273
if( (syncFlags & SYNC_CLONE)!=0 && nCycle==0 ){
@@ -2273,10 +2276,13 @@
22732276
}else{
22742277
mHttpFlags = HTTP_USE_LOGIN;
22752278
}
22762279
if( syncFlags & SYNC_NOHTTPCOMPRESS ){
22772280
mHttpFlags |= HTTP_NOCOMPRESS;
2281
+ }
2282
+ if( syncFlags & SYNC_XVERBOSE ){
2283
+ mHttpFlags |= HTTP_VERBOSE;
22782284
}
22792285
22802286
/* Do the round-trip to the server */
22812287
if( http_exchange(&send, &recv, mHttpFlags, MAX_REDIRECTS, 0) ){
22822288
nErr++;
22832289
--- 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

Keyboard Shortcuts

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