Fossil SCM

Merge from trunk.

dg 2013-09-07 22:13 dg-codenames merge
Commit b5ccc136aee4cdb92ea4101af4ed77d9044ad882
+14
--- src/cgi.c
+++ src/cgi.c
@@ -40,10 +40,14 @@
4040
#include <time.h>
4141
#include <stdio.h>
4242
#include <stdlib.h>
4343
#include <unistd.h>
4444
#include "cgi.h"
45
+#ifdef __CYGWIN__
46
+ __declspec(dllimport) extern __stdcall int ShellExecuteW(void *, void *,
47
+ void *, void *, void *, int);
48
+#endif
4549
4650
#if INTERFACE
4751
/*
4852
** Shortcuts for cgi_parameter. P("x") returns the value of query parameter
4953
** or cookie "x", or NULL if there is no such parameter or cookie. PD("x","y")
@@ -1435,10 +1439,20 @@
14351439
(flags & HTTP_SERVER_SCGI)!=0?"SCGI":"HTTP", iPort);
14361440
fflush(stdout);
14371441
}
14381442
if( zBrowser ){
14391443
zBrowser = mprintf(zBrowser, iPort);
1444
+#if defined(__CYGWIN__)
1445
+ /* On Cygwin, we can do better than "echo" */
1446
+ if( memcmp(zBrowser, "echo ", 5)==0 ){
1447
+ wchar_t *wUrl = fossil_utf8_to_unicode(zBrowser+5);
1448
+ wUrl[wcslen(wUrl)-2] = 0; /* Strip terminating " &" */
1449
+ if( ShellExecuteW(0, L"open", wUrl, 0, 0, 1)<33 ){
1450
+ fossil_warning("cannot start browser\n");
1451
+ }
1452
+ }else
1453
+#endif
14401454
if( system(zBrowser)<0 ){
14411455
fossil_warning("cannot start browser: %s\n", zBrowser);
14421456
}
14431457
}
14441458
while( 1 ){
14451459
--- src/cgi.c
+++ src/cgi.c
@@ -40,10 +40,14 @@
40 #include <time.h>
41 #include <stdio.h>
42 #include <stdlib.h>
43 #include <unistd.h>
44 #include "cgi.h"
 
 
 
 
45
46 #if INTERFACE
47 /*
48 ** Shortcuts for cgi_parameter. P("x") returns the value of query parameter
49 ** or cookie "x", or NULL if there is no such parameter or cookie. PD("x","y")
@@ -1435,10 +1439,20 @@
1435 (flags & HTTP_SERVER_SCGI)!=0?"SCGI":"HTTP", iPort);
1436 fflush(stdout);
1437 }
1438 if( zBrowser ){
1439 zBrowser = mprintf(zBrowser, iPort);
 
 
 
 
 
 
 
 
 
 
1440 if( system(zBrowser)<0 ){
1441 fossil_warning("cannot start browser: %s\n", zBrowser);
1442 }
1443 }
1444 while( 1 ){
1445
--- src/cgi.c
+++ src/cgi.c
@@ -40,10 +40,14 @@
40 #include <time.h>
41 #include <stdio.h>
42 #include <stdlib.h>
43 #include <unistd.h>
44 #include "cgi.h"
45 #ifdef __CYGWIN__
46 __declspec(dllimport) extern __stdcall int ShellExecuteW(void *, void *,
47 void *, void *, void *, int);
48 #endif
49
50 #if INTERFACE
51 /*
52 ** Shortcuts for cgi_parameter. P("x") returns the value of query parameter
53 ** or cookie "x", or NULL if there is no such parameter or cookie. PD("x","y")
@@ -1435,10 +1439,20 @@
1439 (flags & HTTP_SERVER_SCGI)!=0?"SCGI":"HTTP", iPort);
1440 fflush(stdout);
1441 }
1442 if( zBrowser ){
1443 zBrowser = mprintf(zBrowser, iPort);
1444 #if defined(__CYGWIN__)
1445 /* On Cygwin, we can do better than "echo" */
1446 if( memcmp(zBrowser, "echo ", 5)==0 ){
1447 wchar_t *wUrl = fossil_utf8_to_unicode(zBrowser+5);
1448 wUrl[wcslen(wUrl)-2] = 0; /* Strip terminating " &" */
1449 if( ShellExecuteW(0, L"open", wUrl, 0, 0, 1)<33 ){
1450 fossil_warning("cannot start browser\n");
1451 }
1452 }else
1453 #endif
1454 if( system(zBrowser)<0 ){
1455 fossil_warning("cannot start browser: %s\n", zBrowser);
1456 }
1457 }
1458 while( 1 ){
1459
+1 -1
--- src/checkin.c
+++ src/checkin.c
@@ -714,11 +714,11 @@
714714
char *zInit,
715715
CheckinInfo *p,
716716
int parent_rid
717717
){
718718
Blob prompt;
719
-#ifdef _WIN32
719
+#if defined(_WIN32) || defined(__CYGWIN__)
720720
int bomSize;
721721
const unsigned char *bom = get_utf8_bom(&bomSize);
722722
blob_init(&prompt, (const char *) bom, bomSize);
723723
if( zInit && zInit[0]) {
724724
blob_append(&prompt, zInit, -1);
725725
--- src/checkin.c
+++ src/checkin.c
@@ -714,11 +714,11 @@
714 char *zInit,
715 CheckinInfo *p,
716 int parent_rid
717 ){
718 Blob prompt;
719 #ifdef _WIN32
720 int bomSize;
721 const unsigned char *bom = get_utf8_bom(&bomSize);
722 blob_init(&prompt, (const char *) bom, bomSize);
723 if( zInit && zInit[0]) {
724 blob_append(&prompt, zInit, -1);
725
--- src/checkin.c
+++ src/checkin.c
@@ -714,11 +714,11 @@
714 char *zInit,
715 CheckinInfo *p,
716 int parent_rid
717 ){
718 Blob prompt;
719 #if defined(_WIN32) || defined(__CYGWIN__)
720 int bomSize;
721 const unsigned char *bom = get_utf8_bom(&bomSize);
722 blob_init(&prompt, (const char *) bom, bomSize);
723 if( zInit && zInit[0]) {
724 blob_append(&prompt, zInit, -1);
725
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -1576,14 +1576,29 @@
15761576
};
15771577
#define cson_string_empty_m {0/*length*/}
15781578
static const cson_string cson_string_empty = cson_string_empty_m;
15791579
15801580
1581
-
1581
+/**
1582
+ Assumes V is a (cson_value*) ans V->value is a (T*). Returns
1583
+ V->value cast to a (T*).
1584
+*/
15821585
#define CSON_CAST(T,V) ((T*)((V)->value))
1586
+/**
1587
+ Assumes V is a pointer to memory which is allocated as part of a
1588
+ cson_value instance (the bytes immediately after that part).
1589
+ Returns a pointer a a cson_value by subtracting sizeof(cson_value)
1590
+ from that address and casting it to a (cson_value*)
1591
+*/
15831592
#define CSON_VCAST(V) ((cson_value *)(((unsigned char *)(V))-sizeof(cson_value)))
15841593
1594
+/**
1595
+ CSON_INT(V) assumes that V is a (cson_value*) of type
1596
+ CSON_TYPE_INTEGER. This macro returns a (cson_int_t*) representing
1597
+ its value (how that is stored depends on whether we are running in
1598
+ 32- or 64-bit mode).
1599
+ */
15851600
#if CSON_VOID_PTR_IS_BIG
15861601
# define CSON_INT(V) ((cson_int_t*)(&((V)->value)))
15871602
#else
15881603
# define CSON_INT(V) ((cson_int_t*)(V)->value)
15891604
#endif
@@ -1592,14 +1607,12 @@
15921607
#define CSON_STR(V) CSON_CAST(cson_string,(V))
15931608
#define CSON_OBJ(V) CSON_CAST(cson_object,(V))
15941609
#define CSON_ARRAY(V) CSON_CAST(cson_array,(V))
15951610
15961611
/**
1597
-
15981612
Holds special shared "constant" (though they are non-const)
1599
- values.
1600
-
1613
+ values.
16011614
*/
16021615
static struct CSON_EMPTY_HOLDER_
16031616
{
16041617
char trueValue;
16051618
cson_string stringValue;
@@ -1809,11 +1822,11 @@
18091822
Frees any resources owned by val, but does not free val itself
18101823
(which may be stack-allocated). If !val or val->api or
18111824
val->api->cleanup are NULL then this is a no-op.
18121825
18131826
If v is a container type (object or array) its children are also
1814
- cleaned up (BUT NOT FREED), recursively.
1827
+ cleaned up, recursively.
18151828
18161829
After calling this, val will have the special "undefined" type.
18171830
*/
18181831
static void cson_value_clean( cson_value * val );
18191832
@@ -1889,11 +1902,11 @@
18891902
18901903
18911904
/**
18921905
Fetches v's string value as a non-const string.
18931906
1894
- cson_strings are supposed to be immutable, but this form provides
1907
+ cson_strings are intended to be immutable, but this form provides
18951908
access to the immutable bits, which are v->length bytes long. A
18961909
length-0 string is returned as NULL from here, as opposed to
18971910
"". (This is a side-effect of the string allocation mechanism.)
18981911
Returns NULL if !v or if v is the internal empty-string singleton.
18991912
*/
@@ -3781,11 +3794,31 @@
37813794
assert( next > pos );
37823795
clen = next - pos;
37833796
assert( clen );
37843797
if( 1 == clen )
37853798
{ /* ASCII */
3786
- assert( *pos == ch );
3799
+#if defined(CSON_FOSSIL_MODE)
3800
+ /* Workaround for fossil repo artifact
3801
+ f460839cff85d4e4f1360b366bb2858cef1411ea,
3802
+ which has what appears to be latin1-encoded
3803
+ text. file(1) thinks it's a FORTRAN program.
3804
+ */
3805
+ if(0xfffd==ch){
3806
+ assert(*pos != ch);
3807
+ /* MARKER("ch=%04x, *pos=%04x\n", ch, *pos); */
3808
+ ch = *pos
3809
+ /* We should arguably translate to '?', and
3810
+ will if this problem ever comes up with a
3811
+ non-latin1 encoding. For latin1 this
3812
+ workaround incidentally corrects the output
3813
+ to proper UTF8-escaped characters, and only
3814
+ for that reason is it being kept around.
3815
+ */;
3816
+ goto assume_latin1;
3817
+ }
3818
+#endif
3819
+ assert( (*pos == ch) && "Invalid UTF8" );
37873820
escChar[1] = 0;
37883821
switch(ch)
37893822
{
37903823
case '\t': escChar[1] = 't'; break;
37913824
case '\r': escChar[1] = 'r'; break;
@@ -3836,10 +3869,13 @@
38363869
}
38373870
continue;
38383871
}
38393872
else
38403873
{ /* UTF: transform it to \uXXXX */
3874
+#if defined(CSON_FOSSIL_MODE)
3875
+ assume_latin1:
3876
+#endif
38413877
memset(ubuf,0,UBLen);
38423878
rc = sprintf(ubuf, "\\u%04x",ch);
38433879
if( rc != 6 )
38443880
{
38453881
rc = cson_rc.RangeError;
@@ -4105,11 +4141,11 @@
41054141
rc = f(state, ",", 1);
41064142
if( 0 == rc )
41074143
{
41084144
rc = doIndent
41094145
? cson_output_indent( f, state, fmt->indentation, level )
4110
- : f( state, " ", 1 );
4146
+ : 0 /*f( state, " ", 1 )*/;
41114147
}
41124148
}
41134149
}
41144150
}
41154151
--level;
@@ -4183,11 +4219,11 @@
41834219
rc = f(state, ",", 1);
41844220
if( 0 == rc )
41854221
{
41864222
rc = doIndent
41874223
? cson_output_indent( f, state, fmt->indentation, level )
4188
- : f( state, " ", 1 );
4224
+ : 0 /*f( state, " ", 1 )*/;
41894225
}
41904226
}
41914227
}
41924228
}
41934229
--level;
@@ -4396,11 +4432,11 @@
43964432
const cson_size_t oldCap = sb->capacity;
43974433
const cson_size_t asz = npos * 2;
43984434
if( asz < npos ) return cson_rc.ArgError; /* overflow */
43994435
else if( 0 != cson_buffer_reserve( sb, asz ) ) return cson_rc.AllocError;
44004436
assert( (sb->capacity > oldCap) && "Internal error in memory buffer management!" );
4401
- /* make sure it gets NULL terminated. */
4437
+ /* make sure it gets NUL terminated. */
44024438
memset( sb->mem + oldCap, 0, (sb->capacity - oldCap) );
44034439
}
44044440
for( i = 0; i < n; ++i, ++sb->used )
44054441
{
44064442
sb->mem[sb->used] = data[i];
44074443
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -1576,14 +1576,29 @@
1576 };
1577 #define cson_string_empty_m {0/*length*/}
1578 static const cson_string cson_string_empty = cson_string_empty_m;
1579
1580
1581
 
 
 
1582 #define CSON_CAST(T,V) ((T*)((V)->value))
 
 
 
 
 
 
1583 #define CSON_VCAST(V) ((cson_value *)(((unsigned char *)(V))-sizeof(cson_value)))
1584
 
 
 
 
 
 
1585 #if CSON_VOID_PTR_IS_BIG
1586 # define CSON_INT(V) ((cson_int_t*)(&((V)->value)))
1587 #else
1588 # define CSON_INT(V) ((cson_int_t*)(V)->value)
1589 #endif
@@ -1592,14 +1607,12 @@
1592 #define CSON_STR(V) CSON_CAST(cson_string,(V))
1593 #define CSON_OBJ(V) CSON_CAST(cson_object,(V))
1594 #define CSON_ARRAY(V) CSON_CAST(cson_array,(V))
1595
1596 /**
1597
1598 Holds special shared "constant" (though they are non-const)
1599 values.
1600
1601 */
1602 static struct CSON_EMPTY_HOLDER_
1603 {
1604 char trueValue;
1605 cson_string stringValue;
@@ -1809,11 +1822,11 @@
1809 Frees any resources owned by val, but does not free val itself
1810 (which may be stack-allocated). If !val or val->api or
1811 val->api->cleanup are NULL then this is a no-op.
1812
1813 If v is a container type (object or array) its children are also
1814 cleaned up (BUT NOT FREED), recursively.
1815
1816 After calling this, val will have the special "undefined" type.
1817 */
1818 static void cson_value_clean( cson_value * val );
1819
@@ -1889,11 +1902,11 @@
1889
1890
1891 /**
1892 Fetches v's string value as a non-const string.
1893
1894 cson_strings are supposed to be immutable, but this form provides
1895 access to the immutable bits, which are v->length bytes long. A
1896 length-0 string is returned as NULL from here, as opposed to
1897 "". (This is a side-effect of the string allocation mechanism.)
1898 Returns NULL if !v or if v is the internal empty-string singleton.
1899 */
@@ -3781,11 +3794,31 @@
3781 assert( next > pos );
3782 clen = next - pos;
3783 assert( clen );
3784 if( 1 == clen )
3785 { /* ASCII */
3786 assert( *pos == ch );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3787 escChar[1] = 0;
3788 switch(ch)
3789 {
3790 case '\t': escChar[1] = 't'; break;
3791 case '\r': escChar[1] = 'r'; break;
@@ -3836,10 +3869,13 @@
3836 }
3837 continue;
3838 }
3839 else
3840 { /* UTF: transform it to \uXXXX */
 
 
 
3841 memset(ubuf,0,UBLen);
3842 rc = sprintf(ubuf, "\\u%04x",ch);
3843 if( rc != 6 )
3844 {
3845 rc = cson_rc.RangeError;
@@ -4105,11 +4141,11 @@
4105 rc = f(state, ",", 1);
4106 if( 0 == rc )
4107 {
4108 rc = doIndent
4109 ? cson_output_indent( f, state, fmt->indentation, level )
4110 : f( state, " ", 1 );
4111 }
4112 }
4113 }
4114 }
4115 --level;
@@ -4183,11 +4219,11 @@
4183 rc = f(state, ",", 1);
4184 if( 0 == rc )
4185 {
4186 rc = doIndent
4187 ? cson_output_indent( f, state, fmt->indentation, level )
4188 : f( state, " ", 1 );
4189 }
4190 }
4191 }
4192 }
4193 --level;
@@ -4396,11 +4432,11 @@
4396 const cson_size_t oldCap = sb->capacity;
4397 const cson_size_t asz = npos * 2;
4398 if( asz < npos ) return cson_rc.ArgError; /* overflow */
4399 else if( 0 != cson_buffer_reserve( sb, asz ) ) return cson_rc.AllocError;
4400 assert( (sb->capacity > oldCap) && "Internal error in memory buffer management!" );
4401 /* make sure it gets NULL terminated. */
4402 memset( sb->mem + oldCap, 0, (sb->capacity - oldCap) );
4403 }
4404 for( i = 0; i < n; ++i, ++sb->used )
4405 {
4406 sb->mem[sb->used] = data[i];
4407
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -1576,14 +1576,29 @@
1576 };
1577 #define cson_string_empty_m {0/*length*/}
1578 static const cson_string cson_string_empty = cson_string_empty_m;
1579
1580
1581 /**
1582 Assumes V is a (cson_value*) ans V->value is a (T*). Returns
1583 V->value cast to a (T*).
1584 */
1585 #define CSON_CAST(T,V) ((T*)((V)->value))
1586 /**
1587 Assumes V is a pointer to memory which is allocated as part of a
1588 cson_value instance (the bytes immediately after that part).
1589 Returns a pointer a a cson_value by subtracting sizeof(cson_value)
1590 from that address and casting it to a (cson_value*)
1591 */
1592 #define CSON_VCAST(V) ((cson_value *)(((unsigned char *)(V))-sizeof(cson_value)))
1593
1594 /**
1595 CSON_INT(V) assumes that V is a (cson_value*) of type
1596 CSON_TYPE_INTEGER. This macro returns a (cson_int_t*) representing
1597 its value (how that is stored depends on whether we are running in
1598 32- or 64-bit mode).
1599 */
1600 #if CSON_VOID_PTR_IS_BIG
1601 # define CSON_INT(V) ((cson_int_t*)(&((V)->value)))
1602 #else
1603 # define CSON_INT(V) ((cson_int_t*)(V)->value)
1604 #endif
@@ -1592,14 +1607,12 @@
1607 #define CSON_STR(V) CSON_CAST(cson_string,(V))
1608 #define CSON_OBJ(V) CSON_CAST(cson_object,(V))
1609 #define CSON_ARRAY(V) CSON_CAST(cson_array,(V))
1610
1611 /**
 
1612 Holds special shared "constant" (though they are non-const)
1613 values.
 
1614 */
1615 static struct CSON_EMPTY_HOLDER_
1616 {
1617 char trueValue;
1618 cson_string stringValue;
@@ -1809,11 +1822,11 @@
1822 Frees any resources owned by val, but does not free val itself
1823 (which may be stack-allocated). If !val or val->api or
1824 val->api->cleanup are NULL then this is a no-op.
1825
1826 If v is a container type (object or array) its children are also
1827 cleaned up, recursively.
1828
1829 After calling this, val will have the special "undefined" type.
1830 */
1831 static void cson_value_clean( cson_value * val );
1832
@@ -1889,11 +1902,11 @@
1902
1903
1904 /**
1905 Fetches v's string value as a non-const string.
1906
1907 cson_strings are intended to be immutable, but this form provides
1908 access to the immutable bits, which are v->length bytes long. A
1909 length-0 string is returned as NULL from here, as opposed to
1910 "". (This is a side-effect of the string allocation mechanism.)
1911 Returns NULL if !v or if v is the internal empty-string singleton.
1912 */
@@ -3781,11 +3794,31 @@
3794 assert( next > pos );
3795 clen = next - pos;
3796 assert( clen );
3797 if( 1 == clen )
3798 { /* ASCII */
3799 #if defined(CSON_FOSSIL_MODE)
3800 /* Workaround for fossil repo artifact
3801 f460839cff85d4e4f1360b366bb2858cef1411ea,
3802 which has what appears to be latin1-encoded
3803 text. file(1) thinks it's a FORTRAN program.
3804 */
3805 if(0xfffd==ch){
3806 assert(*pos != ch);
3807 /* MARKER("ch=%04x, *pos=%04x\n", ch, *pos); */
3808 ch = *pos
3809 /* We should arguably translate to '?', and
3810 will if this problem ever comes up with a
3811 non-latin1 encoding. For latin1 this
3812 workaround incidentally corrects the output
3813 to proper UTF8-escaped characters, and only
3814 for that reason is it being kept around.
3815 */;
3816 goto assume_latin1;
3817 }
3818 #endif
3819 assert( (*pos == ch) && "Invalid UTF8" );
3820 escChar[1] = 0;
3821 switch(ch)
3822 {
3823 case '\t': escChar[1] = 't'; break;
3824 case '\r': escChar[1] = 'r'; break;
@@ -3836,10 +3869,13 @@
3869 }
3870 continue;
3871 }
3872 else
3873 { /* UTF: transform it to \uXXXX */
3874 #if defined(CSON_FOSSIL_MODE)
3875 assume_latin1:
3876 #endif
3877 memset(ubuf,0,UBLen);
3878 rc = sprintf(ubuf, "\\u%04x",ch);
3879 if( rc != 6 )
3880 {
3881 rc = cson_rc.RangeError;
@@ -4105,11 +4141,11 @@
4141 rc = f(state, ",", 1);
4142 if( 0 == rc )
4143 {
4144 rc = doIndent
4145 ? cson_output_indent( f, state, fmt->indentation, level )
4146 : 0 /*f( state, " ", 1 )*/;
4147 }
4148 }
4149 }
4150 }
4151 --level;
@@ -4183,11 +4219,11 @@
4219 rc = f(state, ",", 1);
4220 if( 0 == rc )
4221 {
4222 rc = doIndent
4223 ? cson_output_indent( f, state, fmt->indentation, level )
4224 : 0 /*f( state, " ", 1 )*/;
4225 }
4226 }
4227 }
4228 }
4229 --level;
@@ -4396,11 +4432,11 @@
4432 const cson_size_t oldCap = sb->capacity;
4433 const cson_size_t asz = npos * 2;
4434 if( asz < npos ) return cson_rc.ArgError; /* overflow */
4435 else if( 0 != cson_buffer_reserve( sb, asz ) ) return cson_rc.AllocError;
4436 assert( (sb->capacity > oldCap) && "Internal error in memory buffer management!" );
4437 /* make sure it gets NUL terminated. */
4438 memset( sb->mem + oldCap, 0, (sb->capacity - oldCap) );
4439 }
4440 for( i = 0; i < n; ++i, ++sb->used )
4441 {
4442 sb->mem[sb->used] = data[i];
4443
+4 -4
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -642,12 +642,12 @@
642642
@ proc colType {c} {
643643
@ regexp {[a-z]+} $c type
644644
@ return $type
645645
@ }
646646
@
647
-@ proc readDiffs {cmd} {
648
-@ set in [open $cmd r]
647
+@ proc readDiffs {fossilcmd} {
648
+@ set in [open $fossilcmd r]
649649
@ fconfigure $in -encoding utf-8
650650
@ set nDiffs 0
651651
@ array set widths {txt 0 ln 0 mkr 0}
652652
@ while {[gets $in line] != -1} {
653653
@ if {![regexp {^=+\s+(.*?)\s+=+$} $line all fn]} {
@@ -883,11 +883,11 @@
883883
@ ::ttk::scrollbar .sby -command {.txtA yview} -orient vertical
884884
@ ::ttk::scrollbar .sbxA -command {.txtA xview} -orient horizontal
885885
@ ::ttk::scrollbar .sbxB -command {.txtB xview} -orient horizontal
886886
@ frame .spacer
887887
@
888
-@ if {[readDiffs $cmd] == 0} {
888
+@ if {[readDiffs $fossilcmd] == 0} {
889889
@ tk_messageBox -type ok -title $CFG(TITLE) -message "No changes"
890890
@ exit
891891
@ }
892892
@ update idletasks
893893
@
@@ -918,11 +918,11 @@
918918
int i;
919919
Blob script;
920920
char *zTempFile;
921921
char *zCmd;
922922
blob_zero(&script);
923
- blob_appendf(&script, "set cmd {| \"%/\" %s --html -y -i -v",
923
+ blob_appendf(&script, "set fossilcmd {| \"%/\" %s --html -y -i -v",
924924
g.nameOfExe, zSubCmd);
925925
for(i=firstArg; i<g.argc; i++){
926926
const char *z = g.argv[i];
927927
if( z[0]=='-' ){
928928
if( strglob("*-html",z) ) continue;
929929
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -642,12 +642,12 @@
642 @ proc colType {c} {
643 @ regexp {[a-z]+} $c type
644 @ return $type
645 @ }
646 @
647 @ proc readDiffs {cmd} {
648 @ set in [open $cmd r]
649 @ fconfigure $in -encoding utf-8
650 @ set nDiffs 0
651 @ array set widths {txt 0 ln 0 mkr 0}
652 @ while {[gets $in line] != -1} {
653 @ if {![regexp {^=+\s+(.*?)\s+=+$} $line all fn]} {
@@ -883,11 +883,11 @@
883 @ ::ttk::scrollbar .sby -command {.txtA yview} -orient vertical
884 @ ::ttk::scrollbar .sbxA -command {.txtA xview} -orient horizontal
885 @ ::ttk::scrollbar .sbxB -command {.txtB xview} -orient horizontal
886 @ frame .spacer
887 @
888 @ if {[readDiffs $cmd] == 0} {
889 @ tk_messageBox -type ok -title $CFG(TITLE) -message "No changes"
890 @ exit
891 @ }
892 @ update idletasks
893 @
@@ -918,11 +918,11 @@
918 int i;
919 Blob script;
920 char *zTempFile;
921 char *zCmd;
922 blob_zero(&script);
923 blob_appendf(&script, "set cmd {| \"%/\" %s --html -y -i -v",
924 g.nameOfExe, zSubCmd);
925 for(i=firstArg; i<g.argc; i++){
926 const char *z = g.argv[i];
927 if( z[0]=='-' ){
928 if( strglob("*-html",z) ) continue;
929
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -642,12 +642,12 @@
642 @ proc colType {c} {
643 @ regexp {[a-z]+} $c type
644 @ return $type
645 @ }
646 @
647 @ proc readDiffs {fossilcmd} {
648 @ set in [open $fossilcmd r]
649 @ fconfigure $in -encoding utf-8
650 @ set nDiffs 0
651 @ array set widths {txt 0 ln 0 mkr 0}
652 @ while {[gets $in line] != -1} {
653 @ if {![regexp {^=+\s+(.*?)\s+=+$} $line all fn]} {
@@ -883,11 +883,11 @@
883 @ ::ttk::scrollbar .sby -command {.txtA yview} -orient vertical
884 @ ::ttk::scrollbar .sbxA -command {.txtA xview} -orient horizontal
885 @ ::ttk::scrollbar .sbxB -command {.txtB xview} -orient horizontal
886 @ frame .spacer
887 @
888 @ if {[readDiffs $fossilcmd] == 0} {
889 @ tk_messageBox -type ok -title $CFG(TITLE) -message "No changes"
890 @ exit
891 @ }
892 @ update idletasks
893 @
@@ -918,11 +918,11 @@
918 int i;
919 Blob script;
920 char *zTempFile;
921 char *zCmd;
922 blob_zero(&script);
923 blob_appendf(&script, "set fossilcmd {| \"%/\" %s --html -y -i -v",
924 g.nameOfExe, zSubCmd);
925 for(i=firstArg; i<g.argc; i++){
926 const char *z = g.argv[i];
927 if( z[0]=='-' ){
928 if( strglob("*-html",z) ) continue;
929
--- src/json_artifact.c
+++ src/json_artifact.c
@@ -131,11 +131,11 @@
131131
zEUser = db_text(0,
132132
"SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
133133
TAG_USER, rid);
134134
if(zEUser){
135135
SET("user", json_new_string(zEUser));
136
- if(0!=strcmp(zEUser,zUser)){
136
+ if(0!=fossil_strcmp(zEUser,zUser)){
137137
SET("originUser",json_new_string(zUser));
138138
}
139139
free(zEUser);
140140
}else{
141141
SET("user",json_new_string(zUser));
@@ -145,11 +145,11 @@
145145
zEComment = db_text(0,
146146
"SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
147147
TAG_COMMENT, rid);
148148
if(zEComment){
149149
SET("comment",json_new_string(zEComment));
150
- if(0 != strcmp(zEComment,zComment)){
150
+ if(0 != fossil_strcmp(zEComment,zComment)){
151151
SET("originComment", json_new_string(zComment));
152152
}
153153
free(zEComment);
154154
}else{
155155
SET("comment",json_new_string(zComment));
@@ -470,11 +470,11 @@
470470
471471
handle_entry:
472472
pay = cson_new_object();
473473
assert( (NULL != zType) && "Internal dispatching error." );
474474
for( ; dispatcher->name; ++dispatcher ){
475
- if(0!=strcmp(dispatcher->name, zType)){
475
+ if(0!=fossil_strcmp(dispatcher->name, zType)){
476476
continue;
477477
}else{
478478
entry = (*dispatcher->func)(pay, rid);
479479
break;
480480
}
481481
--- src/json_artifact.c
+++ src/json_artifact.c
@@ -131,11 +131,11 @@
131 zEUser = db_text(0,
132 "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
133 TAG_USER, rid);
134 if(zEUser){
135 SET("user", json_new_string(zEUser));
136 if(0!=strcmp(zEUser,zUser)){
137 SET("originUser",json_new_string(zUser));
138 }
139 free(zEUser);
140 }else{
141 SET("user",json_new_string(zUser));
@@ -145,11 +145,11 @@
145 zEComment = db_text(0,
146 "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
147 TAG_COMMENT, rid);
148 if(zEComment){
149 SET("comment",json_new_string(zEComment));
150 if(0 != strcmp(zEComment,zComment)){
151 SET("originComment", json_new_string(zComment));
152 }
153 free(zEComment);
154 }else{
155 SET("comment",json_new_string(zComment));
@@ -470,11 +470,11 @@
470
471 handle_entry:
472 pay = cson_new_object();
473 assert( (NULL != zType) && "Internal dispatching error." );
474 for( ; dispatcher->name; ++dispatcher ){
475 if(0!=strcmp(dispatcher->name, zType)){
476 continue;
477 }else{
478 entry = (*dispatcher->func)(pay, rid);
479 break;
480 }
481
--- src/json_artifact.c
+++ src/json_artifact.c
@@ -131,11 +131,11 @@
131 zEUser = db_text(0,
132 "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
133 TAG_USER, rid);
134 if(zEUser){
135 SET("user", json_new_string(zEUser));
136 if(0!=fossil_strcmp(zEUser,zUser)){
137 SET("originUser",json_new_string(zUser));
138 }
139 free(zEUser);
140 }else{
141 SET("user",json_new_string(zUser));
@@ -145,11 +145,11 @@
145 zEComment = db_text(0,
146 "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
147 TAG_COMMENT, rid);
148 if(zEComment){
149 SET("comment",json_new_string(zEComment));
150 if(0 != fossil_strcmp(zEComment,zComment)){
151 SET("originComment", json_new_string(zComment));
152 }
153 free(zEComment);
154 }else{
155 SET("comment",json_new_string(zComment));
@@ -470,11 +470,11 @@
470
471 handle_entry:
472 pay = cson_new_object();
473 assert( (NULL != zType) && "Internal dispatching error." );
474 for( ; dispatcher->name; ++dispatcher ){
475 if(0!=fossil_strcmp(dispatcher->name, zType)){
476 continue;
477 }else{
478 entry = (*dispatcher->func)(pay, rid);
479 break;
480 }
481
-17
--- src/main.c
+++ src/main.c
@@ -1859,28 +1859,11 @@
18591859
zBrowser = db_get("web-browser", 0);
18601860
if( zBrowser==0 ){
18611861
static const char *const azBrowserProg[] =
18621862
{ "xdg-open", "gnome-open", "firefox", "google-chrome" };
18631863
int i;
1864
-#if defined(__CYGWIN__)
1865
- const char *path = fossil_getenv("ProgramFiles(x86)");
1866
- if( !path ){
1867
- path = fossil_getenv("PROGRAMFILES");
1868
- }
1869
- path = fossil_utf8_to_filename(path);
1870
- zBrowser = mprintf("%s/Google/Chrome/Application/chrome.exe", path);
1871
- if( file_access(zBrowser, X_OK) ){
1872
- zBrowser = mprintf("%s/Mozilla Firefox/firefox.exe", path);
1873
- }
1874
- if( file_access(zBrowser, X_OK) ){
1875
- path = fossil_utf8_to_filename(fossil_getenv("PROGRAMFILES"));
1876
- zBrowser = mprintf("%s/Internet Explorer/iexplore.exe", path);
1877
- }
1878
- zBrowser = mprintf("\"%s\"", zBrowser);
1879
-#else
18801864
zBrowser = "echo";
1881
-#endif
18821865
for(i=0; i<sizeof(azBrowserProg)/sizeof(azBrowserProg[0]); i++){
18831866
if( binaryOnPath(azBrowserProg[i]) ){
18841867
zBrowser = azBrowserProg[i];
18851868
break;
18861869
}
18871870
--- src/main.c
+++ src/main.c
@@ -1859,28 +1859,11 @@
1859 zBrowser = db_get("web-browser", 0);
1860 if( zBrowser==0 ){
1861 static const char *const azBrowserProg[] =
1862 { "xdg-open", "gnome-open", "firefox", "google-chrome" };
1863 int i;
1864 #if defined(__CYGWIN__)
1865 const char *path = fossil_getenv("ProgramFiles(x86)");
1866 if( !path ){
1867 path = fossil_getenv("PROGRAMFILES");
1868 }
1869 path = fossil_utf8_to_filename(path);
1870 zBrowser = mprintf("%s/Google/Chrome/Application/chrome.exe", path);
1871 if( file_access(zBrowser, X_OK) ){
1872 zBrowser = mprintf("%s/Mozilla Firefox/firefox.exe", path);
1873 }
1874 if( file_access(zBrowser, X_OK) ){
1875 path = fossil_utf8_to_filename(fossil_getenv("PROGRAMFILES"));
1876 zBrowser = mprintf("%s/Internet Explorer/iexplore.exe", path);
1877 }
1878 zBrowser = mprintf("\"%s\"", zBrowser);
1879 #else
1880 zBrowser = "echo";
1881 #endif
1882 for(i=0; i<sizeof(azBrowserProg)/sizeof(azBrowserProg[0]); i++){
1883 if( binaryOnPath(azBrowserProg[i]) ){
1884 zBrowser = azBrowserProg[i];
1885 break;
1886 }
1887
--- src/main.c
+++ src/main.c
@@ -1859,28 +1859,11 @@
1859 zBrowser = db_get("web-browser", 0);
1860 if( zBrowser==0 ){
1861 static const char *const azBrowserProg[] =
1862 { "xdg-open", "gnome-open", "firefox", "google-chrome" };
1863 int i;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1864 zBrowser = "echo";
 
1865 for(i=0; i<sizeof(azBrowserProg)/sizeof(azBrowserProg[0]); i++){
1866 if( binaryOnPath(azBrowserProg[i]) ){
1867 zBrowser = azBrowserProg[i];
1868 break;
1869 }
1870
+2 -1
--- src/stash.c
+++ src/stash.c
@@ -158,11 +158,11 @@
158158
zComment = find_option("comment", "m", 1);
159159
verify_all_options();
160160
if( zComment==0 ){
161161
Blob prompt; /* Prompt for stash comment */
162162
Blob comment; /* User comment reply */
163
-#ifdef _WIN32
163
+#if defined(_WIN32) || defined(__CYGWIN__)
164164
int bomSize;
165165
const unsigned char *bom = get_utf8_bom(&bomSize);
166166
blob_init(&prompt, (const char *) bom, bomSize);
167167
#else
168168
blob_zero(&prompt);
@@ -639,10 +639,11 @@
639639
}
640640
if( find_option("internal","i",0)==0 ){
641641
zDiffCmd = diff_command_external(0);
642642
}
643643
diffFlags = diff_options();
644
+ if( find_option("verbose","v",0)!=0 ) diffFlags |= DIFF_VERBOSE;
644645
if( g.argc>4 ) usage(mprintf("%s STASHID", zCmd));
645646
if( zDiffCmd ){
646647
zBinGlob = diff_get_binary_glob();
647648
fIncludeBinary = diff_include_binary_files();
648649
}
649650
--- src/stash.c
+++ src/stash.c
@@ -158,11 +158,11 @@
158 zComment = find_option("comment", "m", 1);
159 verify_all_options();
160 if( zComment==0 ){
161 Blob prompt; /* Prompt for stash comment */
162 Blob comment; /* User comment reply */
163 #ifdef _WIN32
164 int bomSize;
165 const unsigned char *bom = get_utf8_bom(&bomSize);
166 blob_init(&prompt, (const char *) bom, bomSize);
167 #else
168 blob_zero(&prompt);
@@ -639,10 +639,11 @@
639 }
640 if( find_option("internal","i",0)==0 ){
641 zDiffCmd = diff_command_external(0);
642 }
643 diffFlags = diff_options();
 
644 if( g.argc>4 ) usage(mprintf("%s STASHID", zCmd));
645 if( zDiffCmd ){
646 zBinGlob = diff_get_binary_glob();
647 fIncludeBinary = diff_include_binary_files();
648 }
649
--- src/stash.c
+++ src/stash.c
@@ -158,11 +158,11 @@
158 zComment = find_option("comment", "m", 1);
159 verify_all_options();
160 if( zComment==0 ){
161 Blob prompt; /* Prompt for stash comment */
162 Blob comment; /* User comment reply */
163 #if defined(_WIN32) || defined(__CYGWIN__)
164 int bomSize;
165 const unsigned char *bom = get_utf8_bom(&bomSize);
166 blob_init(&prompt, (const char *) bom, bomSize);
167 #else
168 blob_zero(&prompt);
@@ -639,10 +639,11 @@
639 }
640 if( find_option("internal","i",0)==0 ){
641 zDiffCmd = diff_command_external(0);
642 }
643 diffFlags = diff_options();
644 if( find_option("verbose","v",0)!=0 ) diffFlags |= DIFF_VERBOSE;
645 if( g.argc>4 ) usage(mprintf("%s STASHID", zCmd));
646 if( zDiffCmd ){
647 zBinGlob = diff_get_binary_glob();
648 fIncludeBinary = diff_include_binary_files();
649 }
650
--- src/style.c
+++ src/style.c
@@ -263,10 +263,11 @@
263263
Th_Store("title", zTitle);
264264
Th_Store("baseurl", g.zBaseURL);
265265
Th_Store("home", g.zTop);
266266
Th_Store("index_page", db_get("index-page","/home"));
267267
Th_Store("current_page", local_zCurrentPage ? local_zCurrentPage : g.zPath);
268
+ Th_Store("csrf_token", g.zCsrfToken);
268269
Th_Store("release_version", RELEASE_VERSION);
269270
Th_Store("manifest_version", MANIFEST_VERSION);
270271
Th_Store("manifest_date", MANIFEST_DATE);
271272
Th_Store("compiler_name", COMPILER_NAME);
272273
if( g.zLogin ){
273274
--- src/style.c
+++ src/style.c
@@ -263,10 +263,11 @@
263 Th_Store("title", zTitle);
264 Th_Store("baseurl", g.zBaseURL);
265 Th_Store("home", g.zTop);
266 Th_Store("index_page", db_get("index-page","/home"));
267 Th_Store("current_page", local_zCurrentPage ? local_zCurrentPage : g.zPath);
 
268 Th_Store("release_version", RELEASE_VERSION);
269 Th_Store("manifest_version", MANIFEST_VERSION);
270 Th_Store("manifest_date", MANIFEST_DATE);
271 Th_Store("compiler_name", COMPILER_NAME);
272 if( g.zLogin ){
273
--- src/style.c
+++ src/style.c
@@ -263,10 +263,11 @@
263 Th_Store("title", zTitle);
264 Th_Store("baseurl", g.zBaseURL);
265 Th_Store("home", g.zTop);
266 Th_Store("index_page", db_get("index-page","/home"));
267 Th_Store("current_page", local_zCurrentPage ? local_zCurrentPage : g.zPath);
268 Th_Store("csrf_token", g.zCsrfToken);
269 Th_Store("release_version", RELEASE_VERSION);
270 Th_Store("manifest_version", MANIFEST_VERSION);
271 Th_Store("manifest_date", MANIFEST_DATE);
272 Th_Store("compiler_name", COMPILER_NAME);
273 if( g.zLogin ){
274
+20 -9
--- src/xfer.c
+++ src/xfer.c
@@ -1318,10 +1318,17 @@
13181318
#define SYNC_CLONE 0x0004
13191319
#define SYNC_PRIVATE 0x0008
13201320
#define SYNC_VERBOSE 0x0010
13211321
#define SYNC_RESYNC 0x0020
13221322
#endif
1323
+
1324
+/*
1325
+** Floating-point absolute value
1326
+*/
1327
+static double fossil_fabs(double x){
1328
+ return x>0.0 ? x : -x;
1329
+}
13231330
13241331
/*
13251332
** Sync to the host identified in g.urlName and g.urlPath. This
13261333
** routine is called by the client.
13271334
**
@@ -1356,10 +1363,11 @@
13561363
int nErr = 0; /* Number of errors */
13571364
int nRoundtrip= 0; /* Number of HTTP requests */
13581365
int nArtifactSent = 0; /* Total artifacts sent */
13591366
int nArtifactRcvd = 0; /* Total artifacts received */
13601367
const char *zOpType = 0;/* Push, Pull, Sync, Clone */
1368
+ double rSkew = 0.0; /* Maximum time skew */
13611369
13621370
if( db_get_boolean("dont-push", 0) ) syncFlags &= ~SYNC_PUSH;
13631371
if( (syncFlags & (SYNC_PUSH|SYNC_PULL|SYNC_CLONE))==0
13641372
&& configRcvMask==0 && configSendMask==0 ) return 0;
13651373
@@ -1554,19 +1562,12 @@
15541562
double rDiff;
15551563
sqlite3_snprintf(sizeof(zTime), zTime, "%.19s", &zLine[12]);
15561564
rDiff = db_double(9e99, "SELECT julianday('%q') - %.17g",
15571565
zTime, rArrivalTime);
15581566
if( rDiff>9e98 || rDiff<-9e98 ) rDiff = 0.0;
1559
- if( (rDiff*24.0*3600.0) > 10.0 ){
1560
- fossil_warning("*** time skew *** server is fast by %s",
1561
- db_timespan_name(rDiff));
1562
- g.clockSkewSeen = 1;
1563
- }else if( rDiff*24.0*3600.0 < -(blob_size(&recv)/5000.0 + 20.0) ){
1564
- fossil_warning("*** time skew *** server is slow by %s",
1565
- db_timespan_name(-rDiff));
1566
- g.clockSkewSeen = 1;
1567
- }
1567
+ if( rDiff*24.0*3600.0 >= -(blob_size(&recv)/5000.0 + 20) ) rDiff = 0.0;
1568
+ if( fossil_fabs(rDiff)>fossil_fabs(rSkew) ) rSkew = rDiff;
15681569
}
15691570
nCardRcvd++;
15701571
continue;
15711572
}
15721573
xfer.nToken = blob_tokenize(&xfer.line, xfer.aToken, count(xfer.aToken));
@@ -1856,10 +1857,20 @@
18561857
** information which is only sent on the second round.
18571858
*/
18581859
if( cloneSeqno<=0 && nCycle>1 ) go = 0;
18591860
};
18601861
transport_stats(&nSent, &nRcvd, 1);
1862
+ if( (rSkew*24.0*3600.0) > 10.0 ){
1863
+ fossil_warning("*** time skew *** server is fast by %s",
1864
+ db_timespan_name(rSkew));
1865
+ g.clockSkewSeen = 1;
1866
+ }else if( rSkew*24.0*3600.0 < -10.0 ){
1867
+ fossil_warning("*** time skew *** server is slow by %s",
1868
+ db_timespan_name(-rSkew));
1869
+ g.clockSkewSeen = 1;
1870
+ }
1871
+
18611872
fossil_force_newline();
18621873
fossil_print(
18631874
"%s finished with %lld bytes sent, %lld bytes received\n",
18641875
zOpType, nSent, nRcvd);
18651876
transport_close();
18661877
--- src/xfer.c
+++ src/xfer.c
@@ -1318,10 +1318,17 @@
1318 #define SYNC_CLONE 0x0004
1319 #define SYNC_PRIVATE 0x0008
1320 #define SYNC_VERBOSE 0x0010
1321 #define SYNC_RESYNC 0x0020
1322 #endif
 
 
 
 
 
 
 
1323
1324 /*
1325 ** Sync to the host identified in g.urlName and g.urlPath. This
1326 ** routine is called by the client.
1327 **
@@ -1356,10 +1363,11 @@
1356 int nErr = 0; /* Number of errors */
1357 int nRoundtrip= 0; /* Number of HTTP requests */
1358 int nArtifactSent = 0; /* Total artifacts sent */
1359 int nArtifactRcvd = 0; /* Total artifacts received */
1360 const char *zOpType = 0;/* Push, Pull, Sync, Clone */
 
1361
1362 if( db_get_boolean("dont-push", 0) ) syncFlags &= ~SYNC_PUSH;
1363 if( (syncFlags & (SYNC_PUSH|SYNC_PULL|SYNC_CLONE))==0
1364 && configRcvMask==0 && configSendMask==0 ) return 0;
1365
@@ -1554,19 +1562,12 @@
1554 double rDiff;
1555 sqlite3_snprintf(sizeof(zTime), zTime, "%.19s", &zLine[12]);
1556 rDiff = db_double(9e99, "SELECT julianday('%q') - %.17g",
1557 zTime, rArrivalTime);
1558 if( rDiff>9e98 || rDiff<-9e98 ) rDiff = 0.0;
1559 if( (rDiff*24.0*3600.0) > 10.0 ){
1560 fossil_warning("*** time skew *** server is fast by %s",
1561 db_timespan_name(rDiff));
1562 g.clockSkewSeen = 1;
1563 }else if( rDiff*24.0*3600.0 < -(blob_size(&recv)/5000.0 + 20.0) ){
1564 fossil_warning("*** time skew *** server is slow by %s",
1565 db_timespan_name(-rDiff));
1566 g.clockSkewSeen = 1;
1567 }
1568 }
1569 nCardRcvd++;
1570 continue;
1571 }
1572 xfer.nToken = blob_tokenize(&xfer.line, xfer.aToken, count(xfer.aToken));
@@ -1856,10 +1857,20 @@
1856 ** information which is only sent on the second round.
1857 */
1858 if( cloneSeqno<=0 && nCycle>1 ) go = 0;
1859 };
1860 transport_stats(&nSent, &nRcvd, 1);
 
 
 
 
 
 
 
 
 
 
1861 fossil_force_newline();
1862 fossil_print(
1863 "%s finished with %lld bytes sent, %lld bytes received\n",
1864 zOpType, nSent, nRcvd);
1865 transport_close();
1866
--- src/xfer.c
+++ src/xfer.c
@@ -1318,10 +1318,17 @@
1318 #define SYNC_CLONE 0x0004
1319 #define SYNC_PRIVATE 0x0008
1320 #define SYNC_VERBOSE 0x0010
1321 #define SYNC_RESYNC 0x0020
1322 #endif
1323
1324 /*
1325 ** Floating-point absolute value
1326 */
1327 static double fossil_fabs(double x){
1328 return x>0.0 ? x : -x;
1329 }
1330
1331 /*
1332 ** Sync to the host identified in g.urlName and g.urlPath. This
1333 ** routine is called by the client.
1334 **
@@ -1356,10 +1363,11 @@
1363 int nErr = 0; /* Number of errors */
1364 int nRoundtrip= 0; /* Number of HTTP requests */
1365 int nArtifactSent = 0; /* Total artifacts sent */
1366 int nArtifactRcvd = 0; /* Total artifacts received */
1367 const char *zOpType = 0;/* Push, Pull, Sync, Clone */
1368 double rSkew = 0.0; /* Maximum time skew */
1369
1370 if( db_get_boolean("dont-push", 0) ) syncFlags &= ~SYNC_PUSH;
1371 if( (syncFlags & (SYNC_PUSH|SYNC_PULL|SYNC_CLONE))==0
1372 && configRcvMask==0 && configSendMask==0 ) return 0;
1373
@@ -1554,19 +1562,12 @@
1562 double rDiff;
1563 sqlite3_snprintf(sizeof(zTime), zTime, "%.19s", &zLine[12]);
1564 rDiff = db_double(9e99, "SELECT julianday('%q') - %.17g",
1565 zTime, rArrivalTime);
1566 if( rDiff>9e98 || rDiff<-9e98 ) rDiff = 0.0;
1567 if( rDiff*24.0*3600.0 >= -(blob_size(&recv)/5000.0 + 20) ) rDiff = 0.0;
1568 if( fossil_fabs(rDiff)>fossil_fabs(rSkew) ) rSkew = rDiff;
 
 
 
 
 
 
 
1569 }
1570 nCardRcvd++;
1571 continue;
1572 }
1573 xfer.nToken = blob_tokenize(&xfer.line, xfer.aToken, count(xfer.aToken));
@@ -1856,10 +1857,20 @@
1857 ** information which is only sent on the second round.
1858 */
1859 if( cloneSeqno<=0 && nCycle>1 ) go = 0;
1860 };
1861 transport_stats(&nSent, &nRcvd, 1);
1862 if( (rSkew*24.0*3600.0) > 10.0 ){
1863 fossil_warning("*** time skew *** server is fast by %s",
1864 db_timespan_name(rSkew));
1865 g.clockSkewSeen = 1;
1866 }else if( rSkew*24.0*3600.0 < -10.0 ){
1867 fossil_warning("*** time skew *** server is slow by %s",
1868 db_timespan_name(-rSkew));
1869 g.clockSkewSeen = 1;
1870 }
1871
1872 fossil_force_newline();
1873 fossil_print(
1874 "%s finished with %lld bytes sent, %lld bytes received\n",
1875 zOpType, nSent, nRcvd);
1876 transport_close();
1877
--- test/release-checklist.wiki
+++ test/release-checklist.wiki
@@ -55,11 +55,12 @@
5555
<li> <b>valgrind fossil rebuild</b>
5656
<li> <b>valgrind fossil sync</b>
5757
</ol>
5858
5959
<li><p>
60
-Inspect all code changes since the previous release, paying particular
60
+
61
+Inspect [http://www.fossil-scm.org/index.html/vdiff?from=release&to=trunk&sbs=1|all code changes since the previous release], paying particular
6162
attention to the following details:
6263
<ol type="a">
6364
<li> Can a malicious HTTP request cause a buffer overrun.
6465
<li> Can a malicious HTTP request expose privileged information to
6566
unauthorized users.
6667
--- test/release-checklist.wiki
+++ test/release-checklist.wiki
@@ -55,11 +55,12 @@
55 <li> <b>valgrind fossil rebuild</b>
56 <li> <b>valgrind fossil sync</b>
57 </ol>
58
59 <li><p>
60 Inspect all code changes since the previous release, paying particular
 
61 attention to the following details:
62 <ol type="a">
63 <li> Can a malicious HTTP request cause a buffer overrun.
64 <li> Can a malicious HTTP request expose privileged information to
65 unauthorized users.
66
--- test/release-checklist.wiki
+++ test/release-checklist.wiki
@@ -55,11 +55,12 @@
55 <li> <b>valgrind fossil rebuild</b>
56 <li> <b>valgrind fossil sync</b>
57 </ol>
58
59 <li><p>
60
61 Inspect [http://www.fossil-scm.org/index.html/vdiff?from=release&to=trunk&sbs=1|all code changes since the previous release], paying particular
62 attention to the following details:
63 <ol type="a">
64 <li> Can a malicious HTTP request cause a buffer overrun.
65 <li> Can a malicious HTTP request expose privileged information to
66 unauthorized users.
67
--- www/changes.wiki
+++ www/changes.wiki
@@ -15,10 +15,17 @@
1515
part of a repository database file, corrupting it. This problem has only
1616
been seen once in the wild.
1717
* Added support for unlimited line lengths in side-by-side diffs.
1818
* New --close option to [/help?cmd=commit | fossil commit], which
1919
immediately closes the branch being committed.
20
+ * Added <tt>chart</tt> option to [/help?cmd=bisect | fossil bisect].
21
+ * Improvements to the "human or bot?" determination.
22
+ * Reports errors about missing CGI-standard environment variables for HTTP
23
+ servers which do not support them.
24
+ * Minor improvements to sync support on Windows.
25
+ * Added <tt>--scgi</tt> option to [/help?cmd=server | fossil server].
26
+ * Internal improvements to the sync process.
2027
2128
<h2>Changes For Version 1.26 (2013-06-18)</h2>
2229
* The argument to the --port option for the [/help?cmd=ui | fossil ui] and
2330
[/help?cmd=server | fossil server] commands can take an IP address in addition
2431
to the port number, causing Fossil to bind to just that one IP address.
2532
--- www/changes.wiki
+++ www/changes.wiki
@@ -15,10 +15,17 @@
15 part of a repository database file, corrupting it. This problem has only
16 been seen once in the wild.
17 * Added support for unlimited line lengths in side-by-side diffs.
18 * New --close option to [/help?cmd=commit | fossil commit], which
19 immediately closes the branch being committed.
 
 
 
 
 
 
 
20
21 <h2>Changes For Version 1.26 (2013-06-18)</h2>
22 * The argument to the --port option for the [/help?cmd=ui | fossil ui] and
23 [/help?cmd=server | fossil server] commands can take an IP address in addition
24 to the port number, causing Fossil to bind to just that one IP address.
25
--- www/changes.wiki
+++ www/changes.wiki
@@ -15,10 +15,17 @@
15 part of a repository database file, corrupting it. This problem has only
16 been seen once in the wild.
17 * Added support for unlimited line lengths in side-by-side diffs.
18 * New --close option to [/help?cmd=commit | fossil commit], which
19 immediately closes the branch being committed.
20 * Added <tt>chart</tt> option to [/help?cmd=bisect | fossil bisect].
21 * Improvements to the "human or bot?" determination.
22 * Reports errors about missing CGI-standard environment variables for HTTP
23 servers which do not support them.
24 * Minor improvements to sync support on Windows.
25 * Added <tt>--scgi</tt> option to [/help?cmd=server | fossil server].
26 * Internal improvements to the sync process.
27
28 <h2>Changes For Version 1.26 (2013-06-18)</h2>
29 * The argument to the --port option for the [/help?cmd=ui | fossil ui] and
30 [/help?cmd=server | fossil server] commands can take an IP address in addition
31 to the port number, causing Fossil to bind to just that one IP address.
32

Keyboard Shortcuts

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