Fossil SCM

Add the -u/--unversioned flag to the "fossil sync" command. Implement the "fossil unversioned revert" command.

drh 2016-08-17 22:19 trunk
Commit c18f23190a109b580b55ceb31239f7871013e415
3 files changed +8 -6 +5 -3 +44 -22
+8 -6
--- src/sync.c
+++ src/sync.c
@@ -141,13 +141,10 @@
141141
*/
142142
if( find_option("verily",0,0)!=0 ){
143143
*pSyncFlags |= SYNC_RESYNC;
144144
}
145145
}
146
- if( find_option("uv",0,0)!=0 ){
147
- *pSyncFlags |= SYNC_UNVERSIONED;
148
- }
149146
if( find_option("private",0,0)!=0 ){
150147
*pSyncFlags |= SYNC_PRIVATE;
151148
}
152149
if( find_option("verbose","v",0)!=0 ){
153150
*pSyncFlags |= SYNC_VERBOSE;
@@ -299,19 +296,23 @@
299296
** --proxy PROXY Use the specified HTTP proxy
300297
** --private Sync private branches too
301298
** -R|--repository REPO Repository to pull into
302299
** --ssl-identity FILE Local SSL credentials, if requested by remote
303300
** --ssh-command SSH Use SSH as the "ssh" command
301
+** -u|--unversioned Also sync unversioned content
304302
** -v|--verbose Additional (debugging) output
305303
** --verily Exchange extra information with the remote
306304
** to ensure no content is overlooked
307305
**
308306
** See also: clone, pull, push, remote-url
309307
*/
310308
void sync_cmd(void){
311309
unsigned configFlags = 0;
312310
unsigned syncFlags = SYNC_PUSH|SYNC_PULL;
311
+ if( find_option("unversioned","u",0)!=0 ){
312
+ syncFlags |= SYNC_UNVERSIONED;
313
+ }
313314
process_sync_args(&configFlags, &syncFlags, 0);
314315
315316
/* We should be done with options.. */
316317
verify_all_options();
317318
@@ -321,15 +322,16 @@
321322
fossil_warning("pull only: the 'dont-push' option is set");
322323
}
323324
}
324325
325326
/*
326
-** Handle the "fossil unversioned sync" command.
327
+** Handle the "fossil unversioned sync" and "fossil unversioned revert"
328
+** commands.
327329
*/
328
-void sync_unversioned(void){
330
+void sync_unversioned(unsigned syncFlags){
329331
unsigned configFlags = 0;
330
- unsigned syncFlags = SYNC_UNVERSIONED;
332
+ (void)find_option("uv-noop",0,0);
331333
process_sync_args(&configFlags, &syncFlags, 1);
332334
verify_all_options();
333335
client_sync(syncFlags, 0, 0);
334336
}
335337
336338
--- src/sync.c
+++ src/sync.c
@@ -141,13 +141,10 @@
141 */
142 if( find_option("verily",0,0)!=0 ){
143 *pSyncFlags |= SYNC_RESYNC;
144 }
145 }
146 if( find_option("uv",0,0)!=0 ){
147 *pSyncFlags |= SYNC_UNVERSIONED;
148 }
149 if( find_option("private",0,0)!=0 ){
150 *pSyncFlags |= SYNC_PRIVATE;
151 }
152 if( find_option("verbose","v",0)!=0 ){
153 *pSyncFlags |= SYNC_VERBOSE;
@@ -299,19 +296,23 @@
299 ** --proxy PROXY Use the specified HTTP proxy
300 ** --private Sync private branches too
301 ** -R|--repository REPO Repository to pull into
302 ** --ssl-identity FILE Local SSL credentials, if requested by remote
303 ** --ssh-command SSH Use SSH as the "ssh" command
 
304 ** -v|--verbose Additional (debugging) output
305 ** --verily Exchange extra information with the remote
306 ** to ensure no content is overlooked
307 **
308 ** See also: clone, pull, push, remote-url
309 */
310 void sync_cmd(void){
311 unsigned configFlags = 0;
312 unsigned syncFlags = SYNC_PUSH|SYNC_PULL;
 
 
 
313 process_sync_args(&configFlags, &syncFlags, 0);
314
315 /* We should be done with options.. */
316 verify_all_options();
317
@@ -321,15 +322,16 @@
321 fossil_warning("pull only: the 'dont-push' option is set");
322 }
323 }
324
325 /*
326 ** Handle the "fossil unversioned sync" command.
 
327 */
328 void sync_unversioned(void){
329 unsigned configFlags = 0;
330 unsigned syncFlags = SYNC_UNVERSIONED;
331 process_sync_args(&configFlags, &syncFlags, 1);
332 verify_all_options();
333 client_sync(syncFlags, 0, 0);
334 }
335
336
--- src/sync.c
+++ src/sync.c
@@ -141,13 +141,10 @@
141 */
142 if( find_option("verily",0,0)!=0 ){
143 *pSyncFlags |= SYNC_RESYNC;
144 }
145 }
 
 
 
146 if( find_option("private",0,0)!=0 ){
147 *pSyncFlags |= SYNC_PRIVATE;
148 }
149 if( find_option("verbose","v",0)!=0 ){
150 *pSyncFlags |= SYNC_VERBOSE;
@@ -299,19 +296,23 @@
296 ** --proxy PROXY Use the specified HTTP proxy
297 ** --private Sync private branches too
298 ** -R|--repository REPO Repository to pull into
299 ** --ssl-identity FILE Local SSL credentials, if requested by remote
300 ** --ssh-command SSH Use SSH as the "ssh" command
301 ** -u|--unversioned Also sync unversioned content
302 ** -v|--verbose Additional (debugging) output
303 ** --verily Exchange extra information with the remote
304 ** to ensure no content is overlooked
305 **
306 ** See also: clone, pull, push, remote-url
307 */
308 void sync_cmd(void){
309 unsigned configFlags = 0;
310 unsigned syncFlags = SYNC_PUSH|SYNC_PULL;
311 if( find_option("unversioned","u",0)!=0 ){
312 syncFlags |= SYNC_UNVERSIONED;
313 }
314 process_sync_args(&configFlags, &syncFlags, 0);
315
316 /* We should be done with options.. */
317 verify_all_options();
318
@@ -321,15 +322,16 @@
322 fossil_warning("pull only: the 'dont-push' option is set");
323 }
324 }
325
326 /*
327 ** Handle the "fossil unversioned sync" and "fossil unversioned revert"
328 ** commands.
329 */
330 void sync_unversioned(unsigned syncFlags){
331 unsigned configFlags = 0;
332 (void)find_option("uv-noop",0,0);
333 process_sync_args(&configFlags, &syncFlags, 1);
334 verify_all_options();
335 client_sync(syncFlags, 0, 0);
336 }
337
338
--- src/unversioned.c
+++ src/unversioned.c
@@ -309,11 +309,13 @@
309309
);
310310
}
311311
}
312312
db_finalize(&q);
313313
}else if( memcmp(zCmd, "revert", nCmd)==0 ){
314
- fossil_fatal("not yet implemented...");
314
+ g.argv[1] = "sync";
315
+ g.argv[2] = "--uv-noop";
316
+ sync_unversioned(SYNC_UNVERSIONED|SYNC_UV_REVERT);
315317
}else if( memcmp(zCmd, "rm", nCmd)==0 ){
316318
int i;
317319
verify_all_options();
318320
db_begin_transaction();
319321
for(i=3; i<g.argc; i++){
@@ -325,12 +327,12 @@
325327
}
326328
db_unset("uv-hash", 0);
327329
db_end_transaction(0);
328330
}else if( memcmp(zCmd,"sync",nCmd)==0 ){
329331
g.argv[1] = "sync";
330
- g.argv[2] = "--uv";
331
- sync_unversioned();
332
+ g.argv[2] = "--uv-noop";
333
+ sync_unversioned(SYNC_UNVERSIONED);
332334
}else if( memcmp(zCmd, "touch", nCmd)==0 ){
333335
int i;
334336
verify_all_options();
335337
db_begin_transaction();
336338
for(i=3; i<g.argc; i++){
337339
--- src/unversioned.c
+++ src/unversioned.c
@@ -309,11 +309,13 @@
309 );
310 }
311 }
312 db_finalize(&q);
313 }else if( memcmp(zCmd, "revert", nCmd)==0 ){
314 fossil_fatal("not yet implemented...");
 
 
315 }else if( memcmp(zCmd, "rm", nCmd)==0 ){
316 int i;
317 verify_all_options();
318 db_begin_transaction();
319 for(i=3; i<g.argc; i++){
@@ -325,12 +327,12 @@
325 }
326 db_unset("uv-hash", 0);
327 db_end_transaction(0);
328 }else if( memcmp(zCmd,"sync",nCmd)==0 ){
329 g.argv[1] = "sync";
330 g.argv[2] = "--uv";
331 sync_unversioned();
332 }else if( memcmp(zCmd, "touch", nCmd)==0 ){
333 int i;
334 verify_all_options();
335 db_begin_transaction();
336 for(i=3; i<g.argc; i++){
337
--- src/unversioned.c
+++ src/unversioned.c
@@ -309,11 +309,13 @@
309 );
310 }
311 }
312 db_finalize(&q);
313 }else if( memcmp(zCmd, "revert", nCmd)==0 ){
314 g.argv[1] = "sync";
315 g.argv[2] = "--uv-noop";
316 sync_unversioned(SYNC_UNVERSIONED|SYNC_UV_REVERT);
317 }else if( memcmp(zCmd, "rm", nCmd)==0 ){
318 int i;
319 verify_all_options();
320 db_begin_transaction();
321 for(i=3; i<g.argc; i++){
@@ -325,12 +327,12 @@
327 }
328 db_unset("uv-hash", 0);
329 db_end_transaction(0);
330 }else if( memcmp(zCmd,"sync",nCmd)==0 ){
331 g.argv[1] = "sync";
332 g.argv[2] = "--uv-noop";
333 sync_unversioned(SYNC_UNVERSIONED);
334 }else if( memcmp(zCmd, "touch", nCmd)==0 ){
335 int i;
336 verify_all_options();
337 db_begin_transaction();
338 for(i=3; i<g.argc; i++){
339
+44 -22
--- src/xfer.c
+++ src/xfer.c
@@ -1644,18 +1644,19 @@
16441644
16451645
#if INTERFACE
16461646
/*
16471647
** Flag options for controlling client_sync()
16481648
*/
1649
-#define SYNC_PUSH 0x0001
1650
-#define SYNC_PULL 0x0002
1651
-#define SYNC_CLONE 0x0004
1652
-#define SYNC_PRIVATE 0x0008
1653
-#define SYNC_VERBOSE 0x0010
1654
-#define SYNC_RESYNC 0x0020
1655
-#define SYNC_UNVERSIONED 0x0040
1656
-#define SYNC_FROMPARENT 0x0080
1649
+#define SYNC_PUSH 0x0001 /* push content client to server */
1650
+#define SYNC_PULL 0x0002 /* pull content server to client */
1651
+#define SYNC_CLONE 0x0004 /* clone the repository */
1652
+#define SYNC_PRIVATE 0x0008 /* Also transfer private content */
1653
+#define SYNC_VERBOSE 0x0010 /* Extra diagnostics */
1654
+#define SYNC_RESYNC 0x0020 /* --verily */
1655
+#define SYNC_UNVERSIONED 0x0040 /* Sync unversioned content */
1656
+#define SYNC_UV_REVERT 0x0080 /* Copy server unversioned to client */
1657
+#define SYNC_FROMPARENT 0x0100 /* Pull from the parent project */
16571658
#endif
16581659
16591660
/*
16601661
** Floating-point absolute value
16611662
*/
@@ -1749,11 +1750,11 @@
17491750
}
17501751
17511752
/* When syncing unversioned files, create a TEMP table in which to store
17521753
** the names of files that do not need to be sent from client to server.
17531754
*/
1754
- if( syncFlags & SYNC_UNVERSIONED ){
1755
+ if( (syncFlags & SYNC_UNVERSIONED)!=0 ){
17551756
db_multi_exec(
17561757
"CREATE TEMP TABLE uv_tosend("
17571758
" name TEXT PRIMARY KEY,"
17581759
" mtimeOnly BOOLEAN"
17591760
") WITHOUT ROWID;"
@@ -1877,27 +1878,42 @@
18771878
configSendMask = 0;
18781879
}
18791880
18801881
/* Send unversioned files present here on the client but missing or
18811882
** obsolete on the server.
1883
+ **
1884
+ ** Or, if the SYNC_UV_REVERT flag is set, delete the local unversioned
1885
+ ** files that do not exist on the server.
18821886
*/
18831887
if( uvDoPush ){
1884
- Stmt uvq;
1885
- int rc = SQLITE_OK;
18861888
assert( (syncFlags & SYNC_UNVERSIONED)!=0 );
18871889
assert( uvStatus==2 );
1888
- db_prepare(&uvq, "SELECT name, mtimeOnly FROM uv_tosend");
1889
- while( (rc = db_step(&uvq))==SQLITE_ROW ){
1890
- const char *zName = db_column_text(&uvq, 0);
1891
- send_unversioned_file(&xfer, zName, db_column_int(&uvq,1));
1892
- nCardSent++;
1893
- nArtifactSent++;
1894
- db_multi_exec("DELETE FROM uv_tosend WHERE name=%Q", zName);
1895
- if( blob_size(xfer.pOut)>xfer.mxSend ) break;
1896
- }
1897
- db_finalize(&uvq);
1898
- if( rc==SQLITE_DONE ) uvDoPush = 0;
1890
+ if( syncFlags & SYNC_UV_REVERT ){
1891
+ db_multi_exec(
1892
+ "DELETE FROM unversioned"
1893
+ " WHERE name IN (SELECT name FROM uv_tosend);"
1894
+ "DELETE FROM uv_tosend;"
1895
+ );
1896
+ uvDoPush = 0;
1897
+ }else{
1898
+ Stmt uvq;
1899
+ int rc = SQLITE_OK;
1900
+ db_prepare(&uvq, "SELECT name, mtimeOnly FROM uv_tosend");
1901
+ while( (rc = db_step(&uvq))==SQLITE_ROW ){
1902
+ const char *zName = db_column_text(&uvq, 0);
1903
+ send_unversioned_file(&xfer, zName, db_column_int(&uvq,1));
1904
+ nCardSent++;
1905
+ nArtifactSent++;
1906
+ db_multi_exec("DELETE FROM uv_tosend WHERE name=%Q", zName);
1907
+ if( syncFlags & SYNC_VERBOSE ){
1908
+ fossil_print("\rUnversioned-file sent: %s\n", zName);
1909
+ }
1910
+ if( blob_size(xfer.pOut)>xfer.mxSend ) break;
1911
+ }
1912
+ db_finalize(&uvq);
1913
+ if( rc==SQLITE_DONE ) uvDoPush = 0;
1914
+ }
18991915
}
19001916
19011917
/* Append randomness to the end of the message. This makes all
19021918
** messages unique so that that the login-card nonce will always
19031919
** be unique.
@@ -2016,10 +2032,14 @@
20162032
*/
20172033
if( blob_eq(&xfer.aToken[0], "uvfile") ){
20182034
xfer_accept_unversioned_file(&xfer, 1);
20192035
nArtifactRcvd++;
20202036
nUvFileRcvd++;
2037
+ if( syncFlags & SYNC_VERBOSE ){
2038
+ fossil_print("\rUnversioned-file received: %s\n",
2039
+ blob_str(&xfer.aToken[1]));
2040
+ }
20212041
}else
20222042
20232043
/* gimme UUID
20242044
**
20252045
** Server is requesting a file. If the file is a manifest, assume
@@ -2089,10 +2109,11 @@
20892109
const char *zName = blob_str(&xfer.aToken[1]);
20902110
const char *zHash = blob_str(&xfer.aToken[3]);
20912111
int iStatus;
20922112
if( uvStatus==0 ) uvStatus = 2;
20932113
iStatus = unversioned_status(zName, mtime, zHash);
2114
+ if( (syncFlags & SYNC_UV_REVERT)!=0 && iStatus==4 ) iStatus = 2;
20942115
if( iStatus<=1 ){
20952116
if( zHash[0]!='-' ){
20962117
blob_appendf(xfer.pOut, "uvgimme %s\n", zName);
20972118
nCardSent++;
20982119
nUvGimmeSent++;
@@ -2229,10 +2250,11 @@
22292250
** bandwidth trying to upload unversioned content. If the server
22302251
** does accept new unversioned content, it sends "uv-push-ok".
22312252
*/
22322253
if( blob_eq(&xfer.aToken[1], "uv-pull-only") ){
22332254
uvStatus = 1;
2255
+ if( syncFlags & SYNC_UV_REVERT ) uvDoPush = 1;
22342256
}else if( blob_eq(&xfer.aToken[1], "uv-push-ok") ){
22352257
uvStatus = 2;
22362258
uvDoPush = 1;
22372259
}
22382260
}else
22392261
--- src/xfer.c
+++ src/xfer.c
@@ -1644,18 +1644,19 @@
1644
1645 #if INTERFACE
1646 /*
1647 ** Flag options for controlling client_sync()
1648 */
1649 #define SYNC_PUSH 0x0001
1650 #define SYNC_PULL 0x0002
1651 #define SYNC_CLONE 0x0004
1652 #define SYNC_PRIVATE 0x0008
1653 #define SYNC_VERBOSE 0x0010
1654 #define SYNC_RESYNC 0x0020
1655 #define SYNC_UNVERSIONED 0x0040
1656 #define SYNC_FROMPARENT 0x0080
 
1657 #endif
1658
1659 /*
1660 ** Floating-point absolute value
1661 */
@@ -1749,11 +1750,11 @@
1749 }
1750
1751 /* When syncing unversioned files, create a TEMP table in which to store
1752 ** the names of files that do not need to be sent from client to server.
1753 */
1754 if( syncFlags & SYNC_UNVERSIONED ){
1755 db_multi_exec(
1756 "CREATE TEMP TABLE uv_tosend("
1757 " name TEXT PRIMARY KEY,"
1758 " mtimeOnly BOOLEAN"
1759 ") WITHOUT ROWID;"
@@ -1877,27 +1878,42 @@
1877 configSendMask = 0;
1878 }
1879
1880 /* Send unversioned files present here on the client but missing or
1881 ** obsolete on the server.
 
 
 
1882 */
1883 if( uvDoPush ){
1884 Stmt uvq;
1885 int rc = SQLITE_OK;
1886 assert( (syncFlags & SYNC_UNVERSIONED)!=0 );
1887 assert( uvStatus==2 );
1888 db_prepare(&uvq, "SELECT name, mtimeOnly FROM uv_tosend");
1889 while( (rc = db_step(&uvq))==SQLITE_ROW ){
1890 const char *zName = db_column_text(&uvq, 0);
1891 send_unversioned_file(&xfer, zName, db_column_int(&uvq,1));
1892 nCardSent++;
1893 nArtifactSent++;
1894 db_multi_exec("DELETE FROM uv_tosend WHERE name=%Q", zName);
1895 if( blob_size(xfer.pOut)>xfer.mxSend ) break;
1896 }
1897 db_finalize(&uvq);
1898 if( rc==SQLITE_DONE ) uvDoPush = 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1899 }
1900
1901 /* Append randomness to the end of the message. This makes all
1902 ** messages unique so that that the login-card nonce will always
1903 ** be unique.
@@ -2016,10 +2032,14 @@
2016 */
2017 if( blob_eq(&xfer.aToken[0], "uvfile") ){
2018 xfer_accept_unversioned_file(&xfer, 1);
2019 nArtifactRcvd++;
2020 nUvFileRcvd++;
 
 
 
 
2021 }else
2022
2023 /* gimme UUID
2024 **
2025 ** Server is requesting a file. If the file is a manifest, assume
@@ -2089,10 +2109,11 @@
2089 const char *zName = blob_str(&xfer.aToken[1]);
2090 const char *zHash = blob_str(&xfer.aToken[3]);
2091 int iStatus;
2092 if( uvStatus==0 ) uvStatus = 2;
2093 iStatus = unversioned_status(zName, mtime, zHash);
 
2094 if( iStatus<=1 ){
2095 if( zHash[0]!='-' ){
2096 blob_appendf(xfer.pOut, "uvgimme %s\n", zName);
2097 nCardSent++;
2098 nUvGimmeSent++;
@@ -2229,10 +2250,11 @@
2229 ** bandwidth trying to upload unversioned content. If the server
2230 ** does accept new unversioned content, it sends "uv-push-ok".
2231 */
2232 if( blob_eq(&xfer.aToken[1], "uv-pull-only") ){
2233 uvStatus = 1;
 
2234 }else if( blob_eq(&xfer.aToken[1], "uv-push-ok") ){
2235 uvStatus = 2;
2236 uvDoPush = 1;
2237 }
2238 }else
2239
--- src/xfer.c
+++ src/xfer.c
@@ -1644,18 +1644,19 @@
1644
1645 #if INTERFACE
1646 /*
1647 ** Flag options for controlling client_sync()
1648 */
1649 #define SYNC_PUSH 0x0001 /* push content client to server */
1650 #define SYNC_PULL 0x0002 /* pull content server to client */
1651 #define SYNC_CLONE 0x0004 /* clone the repository */
1652 #define SYNC_PRIVATE 0x0008 /* Also transfer private content */
1653 #define SYNC_VERBOSE 0x0010 /* Extra diagnostics */
1654 #define SYNC_RESYNC 0x0020 /* --verily */
1655 #define SYNC_UNVERSIONED 0x0040 /* Sync unversioned content */
1656 #define SYNC_UV_REVERT 0x0080 /* Copy server unversioned to client */
1657 #define SYNC_FROMPARENT 0x0100 /* Pull from the parent project */
1658 #endif
1659
1660 /*
1661 ** Floating-point absolute value
1662 */
@@ -1749,11 +1750,11 @@
1750 }
1751
1752 /* When syncing unversioned files, create a TEMP table in which to store
1753 ** the names of files that do not need to be sent from client to server.
1754 */
1755 if( (syncFlags & SYNC_UNVERSIONED)!=0 ){
1756 db_multi_exec(
1757 "CREATE TEMP TABLE uv_tosend("
1758 " name TEXT PRIMARY KEY,"
1759 " mtimeOnly BOOLEAN"
1760 ") WITHOUT ROWID;"
@@ -1877,27 +1878,42 @@
1878 configSendMask = 0;
1879 }
1880
1881 /* Send unversioned files present here on the client but missing or
1882 ** obsolete on the server.
1883 **
1884 ** Or, if the SYNC_UV_REVERT flag is set, delete the local unversioned
1885 ** files that do not exist on the server.
1886 */
1887 if( uvDoPush ){
 
 
1888 assert( (syncFlags & SYNC_UNVERSIONED)!=0 );
1889 assert( uvStatus==2 );
1890 if( syncFlags & SYNC_UV_REVERT ){
1891 db_multi_exec(
1892 "DELETE FROM unversioned"
1893 " WHERE name IN (SELECT name FROM uv_tosend);"
1894 "DELETE FROM uv_tosend;"
1895 );
1896 uvDoPush = 0;
1897 }else{
1898 Stmt uvq;
1899 int rc = SQLITE_OK;
1900 db_prepare(&uvq, "SELECT name, mtimeOnly FROM uv_tosend");
1901 while( (rc = db_step(&uvq))==SQLITE_ROW ){
1902 const char *zName = db_column_text(&uvq, 0);
1903 send_unversioned_file(&xfer, zName, db_column_int(&uvq,1));
1904 nCardSent++;
1905 nArtifactSent++;
1906 db_multi_exec("DELETE FROM uv_tosend WHERE name=%Q", zName);
1907 if( syncFlags & SYNC_VERBOSE ){
1908 fossil_print("\rUnversioned-file sent: %s\n", zName);
1909 }
1910 if( blob_size(xfer.pOut)>xfer.mxSend ) break;
1911 }
1912 db_finalize(&uvq);
1913 if( rc==SQLITE_DONE ) uvDoPush = 0;
1914 }
1915 }
1916
1917 /* Append randomness to the end of the message. This makes all
1918 ** messages unique so that that the login-card nonce will always
1919 ** be unique.
@@ -2016,10 +2032,14 @@
2032 */
2033 if( blob_eq(&xfer.aToken[0], "uvfile") ){
2034 xfer_accept_unversioned_file(&xfer, 1);
2035 nArtifactRcvd++;
2036 nUvFileRcvd++;
2037 if( syncFlags & SYNC_VERBOSE ){
2038 fossil_print("\rUnversioned-file received: %s\n",
2039 blob_str(&xfer.aToken[1]));
2040 }
2041 }else
2042
2043 /* gimme UUID
2044 **
2045 ** Server is requesting a file. If the file is a manifest, assume
@@ -2089,10 +2109,11 @@
2109 const char *zName = blob_str(&xfer.aToken[1]);
2110 const char *zHash = blob_str(&xfer.aToken[3]);
2111 int iStatus;
2112 if( uvStatus==0 ) uvStatus = 2;
2113 iStatus = unversioned_status(zName, mtime, zHash);
2114 if( (syncFlags & SYNC_UV_REVERT)!=0 && iStatus==4 ) iStatus = 2;
2115 if( iStatus<=1 ){
2116 if( zHash[0]!='-' ){
2117 blob_appendf(xfer.pOut, "uvgimme %s\n", zName);
2118 nCardSent++;
2119 nUvGimmeSent++;
@@ -2229,10 +2250,11 @@
2250 ** bandwidth trying to upload unversioned content. If the server
2251 ** does accept new unversioned content, it sends "uv-push-ok".
2252 */
2253 if( blob_eq(&xfer.aToken[1], "uv-pull-only") ){
2254 uvStatus = 1;
2255 if( syncFlags & SYNC_UV_REVERT ) uvDoPush = 1;
2256 }else if( blob_eq(&xfer.aToken[1], "uv-push-ok") ){
2257 uvStatus = 2;
2258 uvDoPush = 1;
2259 }
2260 }else
2261

Keyboard Shortcuts

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