Fossil SCM

Change the synclog to keep timestamps with unixepoch(). This requires SQLite 3.38.0.

drh 2021-12-20 08:37 synclog
Commit 3be414357f8056651eb7da6d5d78b3949060b6ef228370daa470704fabad8dee
+1 -1
--- auto.def
+++ auto.def
@@ -32,11 +32,11 @@
3232
}
3333
3434
# Update the minimum required SQLite version number here, and also
3535
# in src/main.c near the sqlite3_libversion_number() call. Take care
3636
# that both places agree!
37
-define MINIMUM_SQLITE_VERSION "3.37.0"
37
+define MINIMUM_SQLITE_VERSION "3.38.0"
3838
3939
# This is useful for people wanting Fossil to use an external SQLite library
4040
# to compare the one they have against the minimum required
4141
if {[opt-bool print-minimum-sqlite-version]} {
4242
puts [get-define MINIMUM_SQLITE_VERSION]
4343
--- auto.def
+++ auto.def
@@ -32,11 +32,11 @@
32 }
33
34 # Update the minimum required SQLite version number here, and also
35 # in src/main.c near the sqlite3_libversion_number() call. Take care
36 # that both places agree!
37 define MINIMUM_SQLITE_VERSION "3.37.0"
38
39 # This is useful for people wanting Fossil to use an external SQLite library
40 # to compare the one they have against the minimum required
41 if {[opt-bool print-minimum-sqlite-version]} {
42 puts [get-define MINIMUM_SQLITE_VERSION]
43
--- auto.def
+++ auto.def
@@ -32,11 +32,11 @@
32 }
33
34 # Update the minimum required SQLite version number here, and also
35 # in src/main.c near the sqlite3_libversion_number() call. Take care
36 # that both places agree!
37 define MINIMUM_SQLITE_VERSION "3.38.0"
38
39 # This is useful for people wanting Fossil to use an external SQLite library
40 # to compare the one they have against the minimum required
41 if {[opt-bool print-minimum-sqlite-version]} {
42 puts [get-define MINIMUM_SQLITE_VERSION]
43
+2 -2
--- src/export.c
+++ src/export.c
@@ -1700,11 +1700,11 @@
17001700
fossil_system(zRepack);
17011701
}
17021702
17031703
/* Record this export into the sync log */
17041704
zMirrorAbs = file_canonical_name_dup(zMirror);
1705
- sync_log_entry(SYNC_PUSH, zMirrorAbs, "git");
1705
+ sync_log_entry(SYNC_PUSH, zMirrorAbs, "git", 0);
17061706
fossil_free(zMirrorAbs);
17071707
17081708
/* Optionally do a "git push" */
17091709
zPushUrl = db_text(0, "SELECT value FROM mconfig WHERE key='autopush'");
17101710
if( zPushUrl ){
@@ -1725,11 +1725,11 @@
17251725
}else if( db_is_writeable("repository") ){
17261726
db_unprotect(PROTECT_CONFIG);
17271727
db_multi_exec("REPLACE INTO config(name,value,mtime)"
17281728
"VALUES('gitpush:%q',1,now())", zPushUrl);
17291729
db_protect_pop();
1730
- sync_log_entry(SYNC_PUSH, zPushUrl, "git-push");
1730
+ sync_log_entry(SYNC_PUSH, zPushUrl, "git-push", 0);
17311731
}
17321732
fossil_free(zPushCmd);
17331733
}
17341734
}
17351735
17361736
--- src/export.c
+++ src/export.c
@@ -1700,11 +1700,11 @@
1700 fossil_system(zRepack);
1701 }
1702
1703 /* Record this export into the sync log */
1704 zMirrorAbs = file_canonical_name_dup(zMirror);
1705 sync_log_entry(SYNC_PUSH, zMirrorAbs, "git");
1706 fossil_free(zMirrorAbs);
1707
1708 /* Optionally do a "git push" */
1709 zPushUrl = db_text(0, "SELECT value FROM mconfig WHERE key='autopush'");
1710 if( zPushUrl ){
@@ -1725,11 +1725,11 @@
1725 }else if( db_is_writeable("repository") ){
1726 db_unprotect(PROTECT_CONFIG);
1727 db_multi_exec("REPLACE INTO config(name,value,mtime)"
1728 "VALUES('gitpush:%q',1,now())", zPushUrl);
1729 db_protect_pop();
1730 sync_log_entry(SYNC_PUSH, zPushUrl, "git-push");
1731 }
1732 fossil_free(zPushCmd);
1733 }
1734 }
1735
1736
--- src/export.c
+++ src/export.c
@@ -1700,11 +1700,11 @@
1700 fossil_system(zRepack);
1701 }
1702
1703 /* Record this export into the sync log */
1704 zMirrorAbs = file_canonical_name_dup(zMirror);
1705 sync_log_entry(SYNC_PUSH, zMirrorAbs, "git", 0);
1706 fossil_free(zMirrorAbs);
1707
1708 /* Optionally do a "git push" */
1709 zPushUrl = db_text(0, "SELECT value FROM mconfig WHERE key='autopush'");
1710 if( zPushUrl ){
@@ -1725,11 +1725,11 @@
1725 }else if( db_is_writeable("repository") ){
1726 db_unprotect(PROTECT_CONFIG);
1727 db_multi_exec("REPLACE INTO config(name,value,mtime)"
1728 "VALUES('gitpush:%q',1,now())", zPushUrl);
1729 db_protect_pop();
1730 sync_log_entry(SYNC_PUSH, zPushUrl, "git-push", 0);
1731 }
1732 fossil_free(zPushCmd);
1733 }
1734 }
1735
1736
+1 -1
--- src/main.c
+++ src/main.c
@@ -701,11 +701,11 @@
701701
702702
/* When updating the minimum SQLite version, change the number here,
703703
** and also MINIMUM_SQLITE_VERSION value set in ../auto.def. Take
704704
** care that both places agree! */
705705
if( sqlite3_libversion_number()<3037000 ){
706
- fossil_panic("Unsuitable SQLite version %s, must be at least 3.37.0",
706
+ fossil_panic("Unsuitable SQLite version %s, must be at least 3.38.0",
707707
sqlite3_libversion());
708708
}
709709
710710
sqlite3_config(SQLITE_CONFIG_MULTITHREAD);
711711
sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
712712
--- src/main.c
+++ src/main.c
@@ -701,11 +701,11 @@
701
702 /* When updating the minimum SQLite version, change the number here,
703 ** and also MINIMUM_SQLITE_VERSION value set in ../auto.def. Take
704 ** care that both places agree! */
705 if( sqlite3_libversion_number()<3037000 ){
706 fossil_panic("Unsuitable SQLite version %s, must be at least 3.37.0",
707 sqlite3_libversion());
708 }
709
710 sqlite3_config(SQLITE_CONFIG_MULTITHREAD);
711 sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
712
--- src/main.c
+++ src/main.c
@@ -701,11 +701,11 @@
701
702 /* When updating the minimum SQLite version, change the number here,
703 ** and also MINIMUM_SQLITE_VERSION value set in ../auto.def. Take
704 ** care that both places agree! */
705 if( sqlite3_libversion_number()<3037000 ){
706 fossil_panic("Unsuitable SQLite version %s, must be at least 3.38.0",
707 sqlite3_libversion());
708 }
709
710 sqlite3_config(SQLITE_CONFIG_MULTITHREAD);
711 sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
712
+4 -4
--- src/schema.c
+++ src/schema.c
@@ -626,14 +626,14 @@
626626
** this repository has synced, as well as servers with which those
627627
** servers have synced, and so forth.
628628
*/
629629
static const char zSynclogSchema[] =
630630
@ CREATE TABLE repository.synclog(
631
-@ sfrom TEXT, -- Sync client. "self" means this repo
632
-@ sto TEXT, -- Sync server
633
-@ stime DATETIME, -- Time of transfer (julian day)
634
-@ stype TEXT, -- "push", "pull", "git", "backup", "import", etc...
631
+@ sfrom TEXT, -- Sync client. "self" means this repo
632
+@ sto TEXT, -- Sync server
633
+@ stime INT NOT NULL, -- Time of transfer (unixepoch)
634
+@ stype TEXT, -- "push", "pull", "git", "backup", "import", etc...
635635
@ PRIMARY KEY(sfrom,sto)
636636
@ ) WITHOUT ROWID;
637637
;
638638
639639
/* Create the forum-post schema if it does not already exist */
640640
--- src/schema.c
+++ src/schema.c
@@ -626,14 +626,14 @@
626 ** this repository has synced, as well as servers with which those
627 ** servers have synced, and so forth.
628 */
629 static const char zSynclogSchema[] =
630 @ CREATE TABLE repository.synclog(
631 @ sfrom TEXT, -- Sync client. "self" means this repo
632 @ sto TEXT, -- Sync server
633 @ stime DATETIME, -- Time of transfer (julian day)
634 @ stype TEXT, -- "push", "pull", "git", "backup", "import", etc...
635 @ PRIMARY KEY(sfrom,sto)
636 @ ) WITHOUT ROWID;
637 ;
638
639 /* Create the forum-post schema if it does not already exist */
640
--- src/schema.c
+++ src/schema.c
@@ -626,14 +626,14 @@
626 ** this repository has synced, as well as servers with which those
627 ** servers have synced, and so forth.
628 */
629 static const char zSynclogSchema[] =
630 @ CREATE TABLE repository.synclog(
631 @ sfrom TEXT, -- Sync client. "self" means this repo
632 @ sto TEXT, -- Sync server
633 @ stime INT NOT NULL, -- Time of transfer (unixepoch)
634 @ stype TEXT, -- "push", "pull", "git", "backup", "import", etc...
635 @ PRIMARY KEY(sfrom,sto)
636 @ ) WITHOUT ROWID;
637 ;
638
639 /* Create the forum-post schema if it does not already exist */
640
+21 -9
--- src/sync.c
+++ src/sync.c
@@ -109,30 +109,39 @@
109109
** are updated (or both).
110110
*/
111111
void sync_log_entry(
112112
int syncFlags, /* Indicates whether a PUSH or PULL or both */
113113
const char *zRemote, /* Server with which we push or pull */
114
- const char *zType /* Type of sync. NULL for normal */
114
+ const char *zType, /* Type of sync. NULL for normal */
115
+ i64 iTime /* Seconds since 1970, or 0 for "now" */
115116
){
116117
Stmt s;
117
- db_prepare(&s,
118
- "INSERT INTO repository.synclog(sfrom,sto,stime,stype)"
119
- " VALUES(:sfrom,:sto,julianday(),:stype)"
120
- " ON CONFLICT DO UPDATE SET stime=julianday()"
121
- );
122118
schema_synclog();
119
+ if( iTime<=0 ){
120
+ db_prepare(&s,
121
+ "INSERT INTO repository.synclog(sfrom,sto,stime,stype)"
122
+ " VALUES(:sfrom,:sto,unixepoch(),%Q)"
123
+ " ON CONFLICT DO UPDATE SET stime=unixepoch()",
124
+ zType
125
+ );
126
+ }else{
127
+ db_prepare(&s,
128
+ "INSERT INTO repository.synclog(sfrom,sto,stime,stype)"
129
+ " VALUES(:sfrom,:sto,%lld,%Q)"
130
+ " ON CONFLICT DO UPDATE SET stime=%lld WHERE stime<%lld",
131
+ iTime, zType, iTime, iTime
132
+ );
133
+ }
123134
if( syncFlags & (SYNC_PULL|SYNC_CLONE) ){
124135
db_bind_text(&s, ":sfrom", zRemote);
125136
db_bind_text(&s, ":sto", "this");
126
- db_bind_text(&s, ":stype", zType);
127137
db_step(&s);
128138
db_reset(&s);
129139
}
130140
if( syncFlags & (SYNC_PUSH) ){
131141
db_bind_text(&s, ":sfrom", "this");
132142
db_bind_text(&s, ":sto", zRemote);
133
- db_bind_text(&s, ":stype", zType);
134143
db_step(&s);
135144
}
136145
db_finalize(&s);
137146
}
138147
@@ -273,10 +282,13 @@
273282
if( find_option("no-http-compression",0,0)!=0 ){
274283
*pSyncFlags |= SYNC_NOHTTPCOMPRESS;
275284
}
276285
if( find_option("all",0,0)!=0 ){
277286
*pSyncFlags |= SYNC_ALLURL;
287
+ }
288
+ if( find_option("synclog",0,0)!=0 ){
289
+ *pSyncFlags |= SYNC_PUSH_SYNCLOG;
278290
}
279291
url_proxy_options();
280292
clone_ssh_find_options();
281293
if( !uvOnly ) db_find_and_open_repository(0, 0);
282294
db_open_config(0, 1);
@@ -747,8 +759,8 @@
747759
}
748760
}
749761
db_unprotect(PROTECT_ALL);
750762
db_multi_exec("VACUUM repository INTO %Q", zDest);
751763
zFullName = file_canonical_name_dup(zDest);
752
- sync_log_entry(SYNC_PUSH, zFullName, "backup");
764
+ sync_log_entry(SYNC_PUSH, zFullName, "backup", 0);
753765
fossil_free(zFullName);
754766
}
755767
--- src/sync.c
+++ src/sync.c
@@ -109,30 +109,39 @@
109 ** are updated (or both).
110 */
111 void sync_log_entry(
112 int syncFlags, /* Indicates whether a PUSH or PULL or both */
113 const char *zRemote, /* Server with which we push or pull */
114 const char *zType /* Type of sync. NULL for normal */
 
115 ){
116 Stmt s;
117 db_prepare(&s,
118 "INSERT INTO repository.synclog(sfrom,sto,stime,stype)"
119 " VALUES(:sfrom,:sto,julianday(),:stype)"
120 " ON CONFLICT DO UPDATE SET stime=julianday()"
121 );
122 schema_synclog();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123 if( syncFlags & (SYNC_PULL|SYNC_CLONE) ){
124 db_bind_text(&s, ":sfrom", zRemote);
125 db_bind_text(&s, ":sto", "this");
126 db_bind_text(&s, ":stype", zType);
127 db_step(&s);
128 db_reset(&s);
129 }
130 if( syncFlags & (SYNC_PUSH) ){
131 db_bind_text(&s, ":sfrom", "this");
132 db_bind_text(&s, ":sto", zRemote);
133 db_bind_text(&s, ":stype", zType);
134 db_step(&s);
135 }
136 db_finalize(&s);
137 }
138
@@ -273,10 +282,13 @@
273 if( find_option("no-http-compression",0,0)!=0 ){
274 *pSyncFlags |= SYNC_NOHTTPCOMPRESS;
275 }
276 if( find_option("all",0,0)!=0 ){
277 *pSyncFlags |= SYNC_ALLURL;
 
 
 
278 }
279 url_proxy_options();
280 clone_ssh_find_options();
281 if( !uvOnly ) db_find_and_open_repository(0, 0);
282 db_open_config(0, 1);
@@ -747,8 +759,8 @@
747 }
748 }
749 db_unprotect(PROTECT_ALL);
750 db_multi_exec("VACUUM repository INTO %Q", zDest);
751 zFullName = file_canonical_name_dup(zDest);
752 sync_log_entry(SYNC_PUSH, zFullName, "backup");
753 fossil_free(zFullName);
754 }
755
--- src/sync.c
+++ src/sync.c
@@ -109,30 +109,39 @@
109 ** are updated (or both).
110 */
111 void sync_log_entry(
112 int syncFlags, /* Indicates whether a PUSH or PULL or both */
113 const char *zRemote, /* Server with which we push or pull */
114 const char *zType, /* Type of sync. NULL for normal */
115 i64 iTime /* Seconds since 1970, or 0 for "now" */
116 ){
117 Stmt s;
 
 
 
 
 
118 schema_synclog();
119 if( iTime<=0 ){
120 db_prepare(&s,
121 "INSERT INTO repository.synclog(sfrom,sto,stime,stype)"
122 " VALUES(:sfrom,:sto,unixepoch(),%Q)"
123 " ON CONFLICT DO UPDATE SET stime=unixepoch()",
124 zType
125 );
126 }else{
127 db_prepare(&s,
128 "INSERT INTO repository.synclog(sfrom,sto,stime,stype)"
129 " VALUES(:sfrom,:sto,%lld,%Q)"
130 " ON CONFLICT DO UPDATE SET stime=%lld WHERE stime<%lld",
131 iTime, zType, iTime, iTime
132 );
133 }
134 if( syncFlags & (SYNC_PULL|SYNC_CLONE) ){
135 db_bind_text(&s, ":sfrom", zRemote);
136 db_bind_text(&s, ":sto", "this");
 
137 db_step(&s);
138 db_reset(&s);
139 }
140 if( syncFlags & (SYNC_PUSH) ){
141 db_bind_text(&s, ":sfrom", "this");
142 db_bind_text(&s, ":sto", zRemote);
 
143 db_step(&s);
144 }
145 db_finalize(&s);
146 }
147
@@ -273,10 +282,13 @@
282 if( find_option("no-http-compression",0,0)!=0 ){
283 *pSyncFlags |= SYNC_NOHTTPCOMPRESS;
284 }
285 if( find_option("all",0,0)!=0 ){
286 *pSyncFlags |= SYNC_ALLURL;
287 }
288 if( find_option("synclog",0,0)!=0 ){
289 *pSyncFlags |= SYNC_PUSH_SYNCLOG;
290 }
291 url_proxy_options();
292 clone_ssh_find_options();
293 if( !uvOnly ) db_find_and_open_repository(0, 0);
294 db_open_config(0, 1);
@@ -747,8 +759,8 @@
759 }
760 }
761 db_unprotect(PROTECT_ALL);
762 db_multi_exec("VACUUM repository INTO %Q", zDest);
763 zFullName = file_canonical_name_dup(zDest);
764 sync_log_entry(SYNC_PUSH, zFullName, "backup", 0);
765 fossil_free(zFullName);
766 }
767
+28 -16
--- src/xfer.c
+++ src/xfer.c
@@ -1807,25 +1807,26 @@
18071807
18081808
#if INTERFACE
18091809
/*
18101810
** Flag options for controlling client_sync()
18111811
*/
1812
-#define SYNC_PUSH 0x0001 /* push content client to server */
1813
-#define SYNC_PULL 0x0002 /* pull content server to client */
1814
-#define SYNC_CLONE 0x0004 /* clone the repository */
1815
-#define SYNC_PRIVATE 0x0008 /* Also transfer private content */
1816
-#define SYNC_VERBOSE 0x0010 /* Extra diagnostics */
1817
-#define SYNC_RESYNC 0x0020 /* --verily */
1818
-#define SYNC_FROMPARENT 0x0040 /* Pull from the parent project */
1819
-#define SYNC_UNVERSIONED 0x0100 /* Sync unversioned content */
1820
-#define SYNC_UV_REVERT 0x0200 /* Copy server unversioned to client */
1821
-#define SYNC_UV_TRACE 0x0400 /* Describe UV activities */
1822
-#define SYNC_UV_DRYRUN 0x0800 /* Do not actually exchange files */
1823
-#define SYNC_IFABLE 0x1000 /* Inability to sync is not fatal */
1824
-#define SYNC_CKIN_LOCK 0x2000 /* Lock the current check-in */
1825
-#define SYNC_NOHTTPCOMPRESS 0x4000 /* Do not compression HTTP messages */
1826
-#define SYNC_ALLURL 0x8000 /* The --all flag - sync to all URLs */
1812
+#define SYNC_PUSH 0x00001 /* push content client to server */
1813
+#define SYNC_PULL 0x00002 /* pull content server to client */
1814
+#define SYNC_CLONE 0x00004 /* clone the repository */
1815
+#define SYNC_PRIVATE 0x00008 /* Also transfer private content */
1816
+#define SYNC_VERBOSE 0x00010 /* Extra diagnostics */
1817
+#define SYNC_RESYNC 0x00020 /* --verily */
1818
+#define SYNC_FROMPARENT 0x00040 /* Pull from the parent project */
1819
+#define SYNC_UNVERSIONED 0x00100 /* Sync unversioned content */
1820
+#define SYNC_UV_REVERT 0x00200 /* Copy server unversioned to client */
1821
+#define SYNC_UV_TRACE 0x00400 /* Describe UV activities */
1822
+#define SYNC_UV_DRYRUN 0x00800 /* Do not actually exchange files */
1823
+#define SYNC_IFABLE 0x01000 /* Inability to sync is not fatal */
1824
+#define SYNC_CKIN_LOCK 0x02000 /* Lock the current check-in */
1825
+#define SYNC_NOHTTPCOMPRESS 0x04000 /* Do not compression HTTP messages */
1826
+#define SYNC_ALLURL 0x08000 /* The --all flag - sync to all URLs */
1827
+#define SYNC_PUSH_SYNCLOG 0x10000 /* Uplink SYNCLOG info */
18271828
#endif
18281829
18291830
/*
18301831
** Floating-point absolute value
18311832
*/
@@ -2522,10 +2523,21 @@
25222523
if( xfer.nToken>=5 ){
25232524
xfer.remoteDate = atoi(blob_str(&xfer.aToken[3]));
25242525
xfer.remoteTime = atoi(blob_str(&xfer.aToken[4]));
25252526
}
25262527
}
2528
+
2529
+ /* pragma synclog FROM TO MTIME TYPE
2530
+ **
2531
+ ** The server is downloading an entry from its SYNCLOG table. Merge
2532
+ ** this into the local SYNCLOG table if appropriate.
2533
+ ** is running. The DATE and TIME are a pure numeric ISO8601 time
2534
+ ** for the specific check-in of the client.
2535
+ */
2536
+ if( xfer.nToken==5 && blob_eq(&xfer.aToken[1], "synclog") ){
2537
+ /* TBD */
2538
+ }
25272539
25282540
/* pragma uv-pull-only
25292541
** pragma uv-push-ok
25302542
**
25312543
** If the server is unwill to accept new unversioned content (because
@@ -2693,11 +2705,11 @@
26932705
db_timespan_name(-rSkew));
26942706
g.clockSkewSeen = 1;
26952707
}
26962708
26972709
if( nErr==0 ){
2698
- sync_log_entry(syncFlags, g.url.canonical, zAltPCode!=0 ? "import" : 0);
2710
+ sync_log_entry(syncFlags, g.url.canonical, zAltPCode!=0 ? "import" : 0, 0);
26992711
}
27002712
27012713
fossil_force_newline();
27022714
fossil_print(
27032715
"%s done, wire bytes sent: %lld received: %lld ip: %s\n",
27042716
--- src/xfer.c
+++ src/xfer.c
@@ -1807,25 +1807,26 @@
1807
1808 #if INTERFACE
1809 /*
1810 ** Flag options for controlling client_sync()
1811 */
1812 #define SYNC_PUSH 0x0001 /* push content client to server */
1813 #define SYNC_PULL 0x0002 /* pull content server to client */
1814 #define SYNC_CLONE 0x0004 /* clone the repository */
1815 #define SYNC_PRIVATE 0x0008 /* Also transfer private content */
1816 #define SYNC_VERBOSE 0x0010 /* Extra diagnostics */
1817 #define SYNC_RESYNC 0x0020 /* --verily */
1818 #define SYNC_FROMPARENT 0x0040 /* Pull from the parent project */
1819 #define SYNC_UNVERSIONED 0x0100 /* Sync unversioned content */
1820 #define SYNC_UV_REVERT 0x0200 /* Copy server unversioned to client */
1821 #define SYNC_UV_TRACE 0x0400 /* Describe UV activities */
1822 #define SYNC_UV_DRYRUN 0x0800 /* Do not actually exchange files */
1823 #define SYNC_IFABLE 0x1000 /* Inability to sync is not fatal */
1824 #define SYNC_CKIN_LOCK 0x2000 /* Lock the current check-in */
1825 #define SYNC_NOHTTPCOMPRESS 0x4000 /* Do not compression HTTP messages */
1826 #define SYNC_ALLURL 0x8000 /* The --all flag - sync to all URLs */
 
1827 #endif
1828
1829 /*
1830 ** Floating-point absolute value
1831 */
@@ -2522,10 +2523,21 @@
2522 if( xfer.nToken>=5 ){
2523 xfer.remoteDate = atoi(blob_str(&xfer.aToken[3]));
2524 xfer.remoteTime = atoi(blob_str(&xfer.aToken[4]));
2525 }
2526 }
 
 
 
 
 
 
 
 
 
 
 
2527
2528 /* pragma uv-pull-only
2529 ** pragma uv-push-ok
2530 **
2531 ** If the server is unwill to accept new unversioned content (because
@@ -2693,11 +2705,11 @@
2693 db_timespan_name(-rSkew));
2694 g.clockSkewSeen = 1;
2695 }
2696
2697 if( nErr==0 ){
2698 sync_log_entry(syncFlags, g.url.canonical, zAltPCode!=0 ? "import" : 0);
2699 }
2700
2701 fossil_force_newline();
2702 fossil_print(
2703 "%s done, wire bytes sent: %lld received: %lld ip: %s\n",
2704
--- src/xfer.c
+++ src/xfer.c
@@ -1807,25 +1807,26 @@
1807
1808 #if INTERFACE
1809 /*
1810 ** Flag options for controlling client_sync()
1811 */
1812 #define SYNC_PUSH 0x00001 /* push content client to server */
1813 #define SYNC_PULL 0x00002 /* pull content server to client */
1814 #define SYNC_CLONE 0x00004 /* clone the repository */
1815 #define SYNC_PRIVATE 0x00008 /* Also transfer private content */
1816 #define SYNC_VERBOSE 0x00010 /* Extra diagnostics */
1817 #define SYNC_RESYNC 0x00020 /* --verily */
1818 #define SYNC_FROMPARENT 0x00040 /* Pull from the parent project */
1819 #define SYNC_UNVERSIONED 0x00100 /* Sync unversioned content */
1820 #define SYNC_UV_REVERT 0x00200 /* Copy server unversioned to client */
1821 #define SYNC_UV_TRACE 0x00400 /* Describe UV activities */
1822 #define SYNC_UV_DRYRUN 0x00800 /* Do not actually exchange files */
1823 #define SYNC_IFABLE 0x01000 /* Inability to sync is not fatal */
1824 #define SYNC_CKIN_LOCK 0x02000 /* Lock the current check-in */
1825 #define SYNC_NOHTTPCOMPRESS 0x04000 /* Do not compression HTTP messages */
1826 #define SYNC_ALLURL 0x08000 /* The --all flag - sync to all URLs */
1827 #define SYNC_PUSH_SYNCLOG 0x10000 /* Uplink SYNCLOG info */
1828 #endif
1829
1830 /*
1831 ** Floating-point absolute value
1832 */
@@ -2522,10 +2523,21 @@
2523 if( xfer.nToken>=5 ){
2524 xfer.remoteDate = atoi(blob_str(&xfer.aToken[3]));
2525 xfer.remoteTime = atoi(blob_str(&xfer.aToken[4]));
2526 }
2527 }
2528
2529 /* pragma synclog FROM TO MTIME TYPE
2530 **
2531 ** The server is downloading an entry from its SYNCLOG table. Merge
2532 ** this into the local SYNCLOG table if appropriate.
2533 ** is running. The DATE and TIME are a pure numeric ISO8601 time
2534 ** for the specific check-in of the client.
2535 */
2536 if( xfer.nToken==5 && blob_eq(&xfer.aToken[1], "synclog") ){
2537 /* TBD */
2538 }
2539
2540 /* pragma uv-pull-only
2541 ** pragma uv-push-ok
2542 **
2543 ** If the server is unwill to accept new unversioned content (because
@@ -2693,11 +2705,11 @@
2705 db_timespan_name(-rSkew));
2706 g.clockSkewSeen = 1;
2707 }
2708
2709 if( nErr==0 ){
2710 sync_log_entry(syncFlags, g.url.canonical, zAltPCode!=0 ? "import" : 0, 0);
2711 }
2712
2713 fossil_force_newline();
2714 fossil_print(
2715 "%s done, wire bytes sent: %lld received: %lld ip: %s\n",
2716

Keyboard Shortcuts

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