Fossil SCM

Merge all enhancements from trunk.

drh 2019-05-18 00:13 tooltips merge
Commit 1989a13acb4fbab35b38c8933c4ce45dca9232ad720c0fd6c54d737f99365295
+5 -2
--- src/export.c
+++ src/export.c
@@ -1061,10 +1061,11 @@
10611061
char *zMark; /* The Git-name of the check-in */
10621062
Blob sql; /* String of SQL for part of the query */
10631063
Blob comment; /* The comment text for the check-in */
10641064
int nErr = 0; /* Number of errors */
10651065
int bPhantomOk; /* True if phantom files should be ignored */
1066
+ char buf[24];
10661067
10671068
pMan = manifest_get(rid, CFTYPE_MANIFEST, 0);
10681069
if( pMan==0 ){
10691070
/* Must be a phantom. Return without doing anything, and in particular
10701071
** without creating a mark for this check-in. */
@@ -1134,13 +1135,15 @@
11341135
fprintf(xCmd, "commit refs/heads/%s\n", zBranch);
11351136
fossil_free(zBranch);
11361137
zMark = gitmirror_find_mark(zUuid,0,1);
11371138
fprintf(xCmd, "mark %s\n", zMark);
11381139
fossil_free(zMark);
1139
- fprintf(xCmd, "committer %s <%[email protected]> %lld +0000\n",
1140
- pMan->zUser, pMan->zUser,
1140
+ sqlite3_snprintf(sizeof(buf), buf, "%lld",
11411141
(sqlite3_int64)((pMan->rDate-2440587.5)*86400.0)
1142
+ );
1143
+ fprintf(xCmd, "committer %s <%[email protected]> %s +0000\n",
1144
+ pMan->zUser, pMan->zUser, buf
11421145
);
11431146
blob_init(&comment, pMan->zComment, -1);
11441147
if( blob_size(&comment)==0 ){
11451148
blob_append(&comment, "(no comment)", -1);
11461149
}
11471150
--- src/export.c
+++ src/export.c
@@ -1061,10 +1061,11 @@
1061 char *zMark; /* The Git-name of the check-in */
1062 Blob sql; /* String of SQL for part of the query */
1063 Blob comment; /* The comment text for the check-in */
1064 int nErr = 0; /* Number of errors */
1065 int bPhantomOk; /* True if phantom files should be ignored */
 
1066
1067 pMan = manifest_get(rid, CFTYPE_MANIFEST, 0);
1068 if( pMan==0 ){
1069 /* Must be a phantom. Return without doing anything, and in particular
1070 ** without creating a mark for this check-in. */
@@ -1134,13 +1135,15 @@
1134 fprintf(xCmd, "commit refs/heads/%s\n", zBranch);
1135 fossil_free(zBranch);
1136 zMark = gitmirror_find_mark(zUuid,0,1);
1137 fprintf(xCmd, "mark %s\n", zMark);
1138 fossil_free(zMark);
1139 fprintf(xCmd, "committer %s <%[email protected]> %lld +0000\n",
1140 pMan->zUser, pMan->zUser,
1141 (sqlite3_int64)((pMan->rDate-2440587.5)*86400.0)
 
 
 
1142 );
1143 blob_init(&comment, pMan->zComment, -1);
1144 if( blob_size(&comment)==0 ){
1145 blob_append(&comment, "(no comment)", -1);
1146 }
1147
--- src/export.c
+++ src/export.c
@@ -1061,10 +1061,11 @@
1061 char *zMark; /* The Git-name of the check-in */
1062 Blob sql; /* String of SQL for part of the query */
1063 Blob comment; /* The comment text for the check-in */
1064 int nErr = 0; /* Number of errors */
1065 int bPhantomOk; /* True if phantom files should be ignored */
1066 char buf[24];
1067
1068 pMan = manifest_get(rid, CFTYPE_MANIFEST, 0);
1069 if( pMan==0 ){
1070 /* Must be a phantom. Return without doing anything, and in particular
1071 ** without creating a mark for this check-in. */
@@ -1134,13 +1135,15 @@
1135 fprintf(xCmd, "commit refs/heads/%s\n", zBranch);
1136 fossil_free(zBranch);
1137 zMark = gitmirror_find_mark(zUuid,0,1);
1138 fprintf(xCmd, "mark %s\n", zMark);
1139 fossil_free(zMark);
1140 sqlite3_snprintf(sizeof(buf), buf, "%lld",
 
1141 (sqlite3_int64)((pMan->rDate-2440587.5)*86400.0)
1142 );
1143 fprintf(xCmd, "committer %s <%[email protected]> %s +0000\n",
1144 pMan->zUser, pMan->zUser, buf
1145 );
1146 blob_init(&comment, pMan->zComment, -1);
1147 if( blob_size(&comment)==0 ){
1148 blob_append(&comment, "(no comment)", -1);
1149 }
1150
+14 -11
--- src/graph.c
+++ src/graph.c
@@ -515,16 +515,13 @@
515515
if( pRow->nParent<=0 ) continue; /* Root node */
516516
pParent = hashFind(p, pRow->aParent[0]);
517517
if( pParent==0 ) continue; /* Parent off-screen */
518518
if( pParent->zBranch!=pRow->zBranch ) continue; /* Different branch */
519519
if( pParent->idx <= pRow->idx ){
520
- pParent->timeWarp = 1;
521
- continue; /* Time-warp */
522
- }
523
- if( pRow->idxTop < pParent->idxTop ){
520
+ pParent->timeWarp = 1;
521
+ }else if( pRow->idx < pParent->idx ){
524522
pParent->pChild = pRow;
525
- pParent->idxTop = pRow->idxTop;
526523
}
527524
}
528525
529526
if( tmFlags & TIMELINE_FILLGAPS ){
530527
/* If a node has no pChild but there is a node higher up in the graph
@@ -538,34 +535,40 @@
538535
if( pLoop->nParent>0
539536
&& pLoop->zBranch==pRow->zBranch
540537
&& hashFind(p,pLoop->aParent[0])==0
541538
){
542539
pRow->pChild = pLoop;
543
- pRow->idxTop = pLoop->idxTop;
544540
pRow->isStepParent = 1;
545541
pLoop->aParent[0] = pRow->rid;
546542
break;
547543
}
548544
}
549545
}
550546
}
547
+
548
+ /* Set the idxTop values for all entries. The idxTop value is the
549
+ ** "idx" value for the top entry in its stack of children.
550
+ */
551
+ for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
552
+ GraphRow *pChild = pRow->pChild;
553
+ if( pChild && pRow->idxTop>pChild->idxTop ){
554
+ pRow->idxTop = pChild->idxTop;
555
+ }
556
+ }
551557
552558
/* Identify rows where the primary parent is off screen. Assign
553559
** each to a rail and draw descenders downward.
554560
**
555561
** Strive to put the "trunk" branch on far left.
556562
*/
557563
zTrunk = persistBranchName(p, "trunk");
558564
for(i=0; i<2; i++){
559565
for(pRow=p->pLast; pRow; pRow=pRow->pPrev){
566
+ if( i==0 && pRow->zBranch!=zTrunk ) continue;
567
+ if( pRow->iRail>=0 ) continue;
560568
if( pRow->isDup ) continue;
561569
if( pRow->nParent<0 ) continue;
562
- if( i==0 ){
563
- if( pRow->zBranch!=zTrunk ) continue;
564
- }else {
565
- if( pRow->iRail>=0 ) continue;
566
- }
567570
if( pRow->nParent==0 || hashFind(p,pRow->aParent[0])==0 ){
568571
pRow->iRail = findFreeRail(p, pRow->idxTop, pRow->idx+RISER_MARGIN, 0);
569572
if( p->mxRail>=GR_MAX_RAIL ) return;
570573
mask = BIT(pRow->iRail);
571574
if( !omitDescenders ){
572575
--- src/graph.c
+++ src/graph.c
@@ -515,16 +515,13 @@
515 if( pRow->nParent<=0 ) continue; /* Root node */
516 pParent = hashFind(p, pRow->aParent[0]);
517 if( pParent==0 ) continue; /* Parent off-screen */
518 if( pParent->zBranch!=pRow->zBranch ) continue; /* Different branch */
519 if( pParent->idx <= pRow->idx ){
520 pParent->timeWarp = 1;
521 continue; /* Time-warp */
522 }
523 if( pRow->idxTop < pParent->idxTop ){
524 pParent->pChild = pRow;
525 pParent->idxTop = pRow->idxTop;
526 }
527 }
528
529 if( tmFlags & TIMELINE_FILLGAPS ){
530 /* If a node has no pChild but there is a node higher up in the graph
@@ -538,34 +535,40 @@
538 if( pLoop->nParent>0
539 && pLoop->zBranch==pRow->zBranch
540 && hashFind(p,pLoop->aParent[0])==0
541 ){
542 pRow->pChild = pLoop;
543 pRow->idxTop = pLoop->idxTop;
544 pRow->isStepParent = 1;
545 pLoop->aParent[0] = pRow->rid;
546 break;
547 }
548 }
549 }
550 }
 
 
 
 
 
 
 
 
 
 
551
552 /* Identify rows where the primary parent is off screen. Assign
553 ** each to a rail and draw descenders downward.
554 **
555 ** Strive to put the "trunk" branch on far left.
556 */
557 zTrunk = persistBranchName(p, "trunk");
558 for(i=0; i<2; i++){
559 for(pRow=p->pLast; pRow; pRow=pRow->pPrev){
 
 
560 if( pRow->isDup ) continue;
561 if( pRow->nParent<0 ) continue;
562 if( i==0 ){
563 if( pRow->zBranch!=zTrunk ) continue;
564 }else {
565 if( pRow->iRail>=0 ) continue;
566 }
567 if( pRow->nParent==0 || hashFind(p,pRow->aParent[0])==0 ){
568 pRow->iRail = findFreeRail(p, pRow->idxTop, pRow->idx+RISER_MARGIN, 0);
569 if( p->mxRail>=GR_MAX_RAIL ) return;
570 mask = BIT(pRow->iRail);
571 if( !omitDescenders ){
572
--- src/graph.c
+++ src/graph.c
@@ -515,16 +515,13 @@
515 if( pRow->nParent<=0 ) continue; /* Root node */
516 pParent = hashFind(p, pRow->aParent[0]);
517 if( pParent==0 ) continue; /* Parent off-screen */
518 if( pParent->zBranch!=pRow->zBranch ) continue; /* Different branch */
519 if( pParent->idx <= pRow->idx ){
520 pParent->timeWarp = 1;
521 }else if( pRow->idx < pParent->idx ){
 
 
522 pParent->pChild = pRow;
 
523 }
524 }
525
526 if( tmFlags & TIMELINE_FILLGAPS ){
527 /* If a node has no pChild but there is a node higher up in the graph
@@ -538,34 +535,40 @@
535 if( pLoop->nParent>0
536 && pLoop->zBranch==pRow->zBranch
537 && hashFind(p,pLoop->aParent[0])==0
538 ){
539 pRow->pChild = pLoop;
 
540 pRow->isStepParent = 1;
541 pLoop->aParent[0] = pRow->rid;
542 break;
543 }
544 }
545 }
546 }
547
548 /* Set the idxTop values for all entries. The idxTop value is the
549 ** "idx" value for the top entry in its stack of children.
550 */
551 for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
552 GraphRow *pChild = pRow->pChild;
553 if( pChild && pRow->idxTop>pChild->idxTop ){
554 pRow->idxTop = pChild->idxTop;
555 }
556 }
557
558 /* Identify rows where the primary parent is off screen. Assign
559 ** each to a rail and draw descenders downward.
560 **
561 ** Strive to put the "trunk" branch on far left.
562 */
563 zTrunk = persistBranchName(p, "trunk");
564 for(i=0; i<2; i++){
565 for(pRow=p->pLast; pRow; pRow=pRow->pPrev){
566 if( i==0 && pRow->zBranch!=zTrunk ) continue;
567 if( pRow->iRail>=0 ) continue;
568 if( pRow->isDup ) continue;
569 if( pRow->nParent<0 ) continue;
 
 
 
 
 
570 if( pRow->nParent==0 || hashFind(p,pRow->aParent[0])==0 ){
571 pRow->iRail = findFreeRail(p, pRow->idxTop, pRow->idx+RISER_MARGIN, 0);
572 if( p->mxRail>=GR_MAX_RAIL ) return;
573 mask = BIT(pRow->iRail);
574 if( !omitDescenders ){
575
+4 -4
--- src/http.c
+++ src/http.c
@@ -286,11 +286,11 @@
286286
g.zHttpAuth = prompt_for_httpauth_creds();
287287
transport_close(&g.url);
288288
return http_exchange(pSend, pReply, useLogin, maxRedirect);
289289
}
290290
}
291
- if( rc!=200 && rc!=301 && rc!=302 ){
291
+ if( rc!=200 && rc!=301 && rc!=302 && rc!=307 && rc!=308 ){
292292
int ii;
293293
for(ii=7; zLine[ii] && zLine[ii]!=' '; ii++){}
294294
while( zLine[ii]==' ' ) ii++;
295295
fossil_warning("server says: %s", &zLine[ii]);
296296
goto write_err;
@@ -300,11 +300,11 @@
300300
}else{
301301
closeConnection = 0;
302302
}
303303
}else if( g.url.isSsh && fossil_strnicmp(zLine, "status:", 7)==0 ){
304304
if( sscanf(zLine, "Status: %d", &rc)!=1 ) goto write_err;
305
- if( rc!=200 && rc!=301 && rc!=302 ){
305
+ if( rc!=200 && rc!=301 && rc!=302 && rc!=307 && rc!=308 ){
306306
int ii;
307307
for(ii=7; zLine[ii] && zLine[ii]!=' '; ii++){}
308308
while( zLine[ii]==' ' ) ii++;
309309
fossil_warning("server says: %s", &zLine[ii]);
310310
goto write_err;
@@ -320,11 +320,11 @@
320320
if( c=='c' || c=='C' ){
321321
closeConnection = 1;
322322
}else if( c=='k' || c=='K' ){
323323
closeConnection = 0;
324324
}
325
- }else if( ( rc==301 || rc==302 ) &&
325
+ }else if( ( rc==301 || rc==302 || rc==307 || rc==308 ) &&
326326
fossil_strnicmp(zLine, "location:", 9)==0 ){
327327
int i, j;
328328
329329
if ( --maxRedirect == 0){
330330
fossil_warning("redirect limit exceeded");
@@ -345,11 +345,11 @@
345345
transport_close(&g.url);
346346
transport_global_shutdown(&g.url);
347347
fSeenHttpAuth = 0;
348348
if( g.zHttpAuth ) free(g.zHttpAuth);
349349
g.zHttpAuth = get_httpauth();
350
- url_remember();
350
+ if( rc==301 || rc==308 ) url_remember();
351351
return http_exchange(pSend, pReply, useLogin, maxRedirect);
352352
}else if( fossil_strnicmp(zLine, "content-type: ", 14)==0 ){
353353
if( fossil_strnicmp(&zLine[14], "application/x-fossil-debug", -1)==0 ){
354354
isCompressed = 0;
355355
}else if( fossil_strnicmp(&zLine[14],
356356
--- src/http.c
+++ src/http.c
@@ -286,11 +286,11 @@
286 g.zHttpAuth = prompt_for_httpauth_creds();
287 transport_close(&g.url);
288 return http_exchange(pSend, pReply, useLogin, maxRedirect);
289 }
290 }
291 if( rc!=200 && rc!=301 && rc!=302 ){
292 int ii;
293 for(ii=7; zLine[ii] && zLine[ii]!=' '; ii++){}
294 while( zLine[ii]==' ' ) ii++;
295 fossil_warning("server says: %s", &zLine[ii]);
296 goto write_err;
@@ -300,11 +300,11 @@
300 }else{
301 closeConnection = 0;
302 }
303 }else if( g.url.isSsh && fossil_strnicmp(zLine, "status:", 7)==0 ){
304 if( sscanf(zLine, "Status: %d", &rc)!=1 ) goto write_err;
305 if( rc!=200 && rc!=301 && rc!=302 ){
306 int ii;
307 for(ii=7; zLine[ii] && zLine[ii]!=' '; ii++){}
308 while( zLine[ii]==' ' ) ii++;
309 fossil_warning("server says: %s", &zLine[ii]);
310 goto write_err;
@@ -320,11 +320,11 @@
320 if( c=='c' || c=='C' ){
321 closeConnection = 1;
322 }else if( c=='k' || c=='K' ){
323 closeConnection = 0;
324 }
325 }else if( ( rc==301 || rc==302 ) &&
326 fossil_strnicmp(zLine, "location:", 9)==0 ){
327 int i, j;
328
329 if ( --maxRedirect == 0){
330 fossil_warning("redirect limit exceeded");
@@ -345,11 +345,11 @@
345 transport_close(&g.url);
346 transport_global_shutdown(&g.url);
347 fSeenHttpAuth = 0;
348 if( g.zHttpAuth ) free(g.zHttpAuth);
349 g.zHttpAuth = get_httpauth();
350 url_remember();
351 return http_exchange(pSend, pReply, useLogin, maxRedirect);
352 }else if( fossil_strnicmp(zLine, "content-type: ", 14)==0 ){
353 if( fossil_strnicmp(&zLine[14], "application/x-fossil-debug", -1)==0 ){
354 isCompressed = 0;
355 }else if( fossil_strnicmp(&zLine[14],
356
--- src/http.c
+++ src/http.c
@@ -286,11 +286,11 @@
286 g.zHttpAuth = prompt_for_httpauth_creds();
287 transport_close(&g.url);
288 return http_exchange(pSend, pReply, useLogin, maxRedirect);
289 }
290 }
291 if( rc!=200 && rc!=301 && rc!=302 && rc!=307 && rc!=308 ){
292 int ii;
293 for(ii=7; zLine[ii] && zLine[ii]!=' '; ii++){}
294 while( zLine[ii]==' ' ) ii++;
295 fossil_warning("server says: %s", &zLine[ii]);
296 goto write_err;
@@ -300,11 +300,11 @@
300 }else{
301 closeConnection = 0;
302 }
303 }else if( g.url.isSsh && fossil_strnicmp(zLine, "status:", 7)==0 ){
304 if( sscanf(zLine, "Status: %d", &rc)!=1 ) goto write_err;
305 if( rc!=200 && rc!=301 && rc!=302 && rc!=307 && rc!=308 ){
306 int ii;
307 for(ii=7; zLine[ii] && zLine[ii]!=' '; ii++){}
308 while( zLine[ii]==' ' ) ii++;
309 fossil_warning("server says: %s", &zLine[ii]);
310 goto write_err;
@@ -320,11 +320,11 @@
320 if( c=='c' || c=='C' ){
321 closeConnection = 1;
322 }else if( c=='k' || c=='K' ){
323 closeConnection = 0;
324 }
325 }else if( ( rc==301 || rc==302 || rc==307 || rc==308 ) &&
326 fossil_strnicmp(zLine, "location:", 9)==0 ){
327 int i, j;
328
329 if ( --maxRedirect == 0){
330 fossil_warning("redirect limit exceeded");
@@ -345,11 +345,11 @@
345 transport_close(&g.url);
346 transport_global_shutdown(&g.url);
347 fSeenHttpAuth = 0;
348 if( g.zHttpAuth ) free(g.zHttpAuth);
349 g.zHttpAuth = get_httpauth();
350 if( rc==301 || rc==308 ) url_remember();
351 return http_exchange(pSend, pReply, useLogin, maxRedirect);
352 }else if( fossil_strnicmp(zLine, "content-type: ", 14)==0 ){
353 if( fossil_strnicmp(&zLine[14], "application/x-fossil-debug", -1)==0 ){
354 isCompressed = 0;
355 }else if( fossil_strnicmp(&zLine[14],
356
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -825,10 +825,12 @@
825825
826826
# With HTTPS support
827827
ifdef FOSSIL_ENABLE_SSL
828828
TCC += -DFOSSIL_ENABLE_SSL=1
829829
RCC += -DFOSSIL_ENABLE_SSL=1
830
+TCC += -DHAVE_BIO_ADDR_HOSTNAME_STRING=1
831
+RCC += -DHAVE_BIO_ADDR_HOSTNAME_STRING=1
830832
endif
831833
832834
# With relative paths in external diff/gdiff
833835
ifdef FOSSIL_ENABLE_EXEC_REL_PATHS
834836
TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
@@ -1705,10 +1707,12 @@
17051707
!endif
17061708
17071709
!if $(FOSSIL_ENABLE_SSL)!=0
17081710
TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
17091711
RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
1712
+TCC = $(TCC) /DHAVE_BIO_ADDR_HOSTNAME_STRING=1
1713
+RCC = $(RCC) /DHAVE_BIO_ADDR_HOSTNAME_STRING=1
17101714
LIBS = $(LIBS) $(SSLLIB)
17111715
LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
17121716
!endif
17131717
17141718
!if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0
17151719
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -825,10 +825,12 @@
825
826 # With HTTPS support
827 ifdef FOSSIL_ENABLE_SSL
828 TCC += -DFOSSIL_ENABLE_SSL=1
829 RCC += -DFOSSIL_ENABLE_SSL=1
 
 
830 endif
831
832 # With relative paths in external diff/gdiff
833 ifdef FOSSIL_ENABLE_EXEC_REL_PATHS
834 TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
@@ -1705,10 +1707,12 @@
1705 !endif
1706
1707 !if $(FOSSIL_ENABLE_SSL)!=0
1708 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
1709 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
 
 
1710 LIBS = $(LIBS) $(SSLLIB)
1711 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
1712 !endif
1713
1714 !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0
1715
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -825,10 +825,12 @@
825
826 # With HTTPS support
827 ifdef FOSSIL_ENABLE_SSL
828 TCC += -DFOSSIL_ENABLE_SSL=1
829 RCC += -DFOSSIL_ENABLE_SSL=1
830 TCC += -DHAVE_BIO_ADDR_HOSTNAME_STRING=1
831 RCC += -DHAVE_BIO_ADDR_HOSTNAME_STRING=1
832 endif
833
834 # With relative paths in external diff/gdiff
835 ifdef FOSSIL_ENABLE_EXEC_REL_PATHS
836 TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
@@ -1705,10 +1707,12 @@
1707 !endif
1708
1709 !if $(FOSSIL_ENABLE_SSL)!=0
1710 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
1711 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
1712 TCC = $(TCC) /DHAVE_BIO_ADDR_HOSTNAME_STRING=1
1713 RCC = $(RCC) /DHAVE_BIO_ADDR_HOSTNAME_STRING=1
1714 LIBS = $(LIBS) $(SSLLIB)
1715 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
1716 !endif
1717
1718 !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0
1719
--- src/printf.c
+++ src/printf.c
@@ -788,10 +788,15 @@
788788
break;
789789
}
790790
case etJSONSTR: {
791791
int limit = flag_alternateform ? va_arg(ap,int) : -1;
792792
char *zMem = va_arg(ap,char*);
793
+ if( limit!=0 ){
794
+ /* Ignore the limit flag, if set, for JSON string
795
+ ** output. This block exists to squelch the associated
796
+ ** "unused variable" compiler warning. */
797
+ }
793798
if( zMem==0 ) zMem = "";
794799
zExtra = bufpt = encode_json_string_literal(zMem);
795800
length = strlen(bufpt);
796801
if( precision>=0 && precision<length ) length = precision;
797802
break;
798803
--- src/printf.c
+++ src/printf.c
@@ -788,10 +788,15 @@
788 break;
789 }
790 case etJSONSTR: {
791 int limit = flag_alternateform ? va_arg(ap,int) : -1;
792 char *zMem = va_arg(ap,char*);
 
 
 
 
 
793 if( zMem==0 ) zMem = "";
794 zExtra = bufpt = encode_json_string_literal(zMem);
795 length = strlen(bufpt);
796 if( precision>=0 && precision<length ) length = precision;
797 break;
798
--- src/printf.c
+++ src/printf.c
@@ -788,10 +788,15 @@
788 break;
789 }
790 case etJSONSTR: {
791 int limit = flag_alternateform ? va_arg(ap,int) : -1;
792 char *zMem = va_arg(ap,char*);
793 if( limit!=0 ){
794 /* Ignore the limit flag, if set, for JSON string
795 ** output. This block exists to squelch the associated
796 ** "unused variable" compiler warning. */
797 }
798 if( zMem==0 ) zMem = "";
799 zExtra = bufpt = encode_json_string_literal(zMem);
800 length = strlen(bufpt);
801 if( precision>=0 && precision<length ) length = precision;
802 break;
803
--- src/style.c
+++ src/style.c
@@ -628,10 +628,11 @@
628628
if( nSubmenu+nSubmenuCtrl>0 ){
629629
int i;
630630
if( nSubmenuCtrl ){
631631
@ <form id='f01' method='GET' action='%R/%s(g.zPath)'>
632632
@ <input type='hidden' name='udc' value='1'>
633
+ cgi_tag_query_parameter("udc");
633634
}
634635
@ <div class="submenu">
635636
if( nSubmenu>0 ){
636637
qsort(aSubmenu, nSubmenu, sizeof(aSubmenu[0]), submenuCompare);
637638
for(i=0; i<nSubmenu; i++){
638639
--- src/style.c
+++ src/style.c
@@ -628,10 +628,11 @@
628 if( nSubmenu+nSubmenuCtrl>0 ){
629 int i;
630 if( nSubmenuCtrl ){
631 @ <form id='f01' method='GET' action='%R/%s(g.zPath)'>
632 @ <input type='hidden' name='udc' value='1'>
 
633 }
634 @ <div class="submenu">
635 if( nSubmenu>0 ){
636 qsort(aSubmenu, nSubmenu, sizeof(aSubmenu[0]), submenuCompare);
637 for(i=0; i<nSubmenu; i++){
638
--- src/style.c
+++ src/style.c
@@ -628,10 +628,11 @@
628 if( nSubmenu+nSubmenuCtrl>0 ){
629 int i;
630 if( nSubmenuCtrl ){
631 @ <form id='f01' method='GET' action='%R/%s(g.zPath)'>
632 @ <input type='hidden' name='udc' value='1'>
633 cgi_tag_query_parameter("udc");
634 }
635 @ <div class="submenu">
636 if( nSubmenu>0 ){
637 qsort(aSubmenu, nSubmenu, sizeof(aSubmenu[0]), submenuCompare);
638 for(i=0; i<nSubmenu; i++){
639
+4 -2
--- src/user.c
+++ src/user.c
@@ -498,10 +498,11 @@
498498
** (8) Check if the user can be extracted from the remote URL.
499499
**
500500
** The user name is stored in g.zLogin. The uid is in g.userUid.
501501
*/
502502
void user_select(void){
503
+ UrlData url;
503504
if( g.userUid ) return;
504505
if( g.zLogin ){
505506
if( attempt_user(g.zLogin)==0 ){
506507
fossil_fatal("no such user: %s", g.zLogin);
507508
}else{
@@ -519,12 +520,13 @@
519520
520521
if( attempt_user(fossil_getenv("LOGNAME")) ) return;
521522
522523
if( attempt_user(fossil_getenv("USERNAME")) ) return;
523524
524
- url_parse(0, 0);
525
- if( g.url.user && attempt_user(g.url.user) ) return;
525
+ memset(&url, 0, sizeof(url));
526
+ url_parse_local(0, 0, &url);
527
+ if( url.user && attempt_user(url.user) ) return;
526528
527529
fossil_print(
528530
"Cannot figure out who you are! Consider using the --user\n"
529531
"command line option, setting your USER environment variable,\n"
530532
"or setting a default user with \"fossil user default USER\".\n"
531533
--- src/user.c
+++ src/user.c
@@ -498,10 +498,11 @@
498 ** (8) Check if the user can be extracted from the remote URL.
499 **
500 ** The user name is stored in g.zLogin. The uid is in g.userUid.
501 */
502 void user_select(void){
 
503 if( g.userUid ) return;
504 if( g.zLogin ){
505 if( attempt_user(g.zLogin)==0 ){
506 fossil_fatal("no such user: %s", g.zLogin);
507 }else{
@@ -519,12 +520,13 @@
519
520 if( attempt_user(fossil_getenv("LOGNAME")) ) return;
521
522 if( attempt_user(fossil_getenv("USERNAME")) ) return;
523
524 url_parse(0, 0);
525 if( g.url.user && attempt_user(g.url.user) ) return;
 
526
527 fossil_print(
528 "Cannot figure out who you are! Consider using the --user\n"
529 "command line option, setting your USER environment variable,\n"
530 "or setting a default user with \"fossil user default USER\".\n"
531
--- src/user.c
+++ src/user.c
@@ -498,10 +498,11 @@
498 ** (8) Check if the user can be extracted from the remote URL.
499 **
500 ** The user name is stored in g.zLogin. The uid is in g.userUid.
501 */
502 void user_select(void){
503 UrlData url;
504 if( g.userUid ) return;
505 if( g.zLogin ){
506 if( attempt_user(g.zLogin)==0 ){
507 fossil_fatal("no such user: %s", g.zLogin);
508 }else{
@@ -519,12 +520,13 @@
520
521 if( attempt_user(fossil_getenv("LOGNAME")) ) return;
522
523 if( attempt_user(fossil_getenv("USERNAME")) ) return;
524
525 memset(&url, 0, sizeof(url));
526 url_parse_local(0, 0, &url);
527 if( url.user && attempt_user(url.user) ) return;
528
529 fossil_print(
530 "Cannot figure out who you are! Consider using the --user\n"
531 "command line option, setting your USER environment variable,\n"
532 "or setting a default user with \"fossil user default USER\".\n"
533
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -288,10 +288,12 @@
288288
289289
# With HTTPS support
290290
ifdef FOSSIL_ENABLE_SSL
291291
TCC += -DFOSSIL_ENABLE_SSL=1
292292
RCC += -DFOSSIL_ENABLE_SSL=1
293
+TCC += -DHAVE_BIO_ADDR_HOSTNAME_STRING=1
294
+RCC += -DHAVE_BIO_ADDR_HOSTNAME_STRING=1
293295
endif
294296
295297
# With relative paths in external diff/gdiff
296298
ifdef FOSSIL_ENABLE_EXEC_REL_PATHS
297299
TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
298300
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -288,10 +288,12 @@
288
289 # With HTTPS support
290 ifdef FOSSIL_ENABLE_SSL
291 TCC += -DFOSSIL_ENABLE_SSL=1
292 RCC += -DFOSSIL_ENABLE_SSL=1
 
 
293 endif
294
295 # With relative paths in external diff/gdiff
296 ifdef FOSSIL_ENABLE_EXEC_REL_PATHS
297 TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
298
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -288,10 +288,12 @@
288
289 # With HTTPS support
290 ifdef FOSSIL_ENABLE_SSL
291 TCC += -DFOSSIL_ENABLE_SSL=1
292 RCC += -DFOSSIL_ENABLE_SSL=1
293 TCC += -DHAVE_BIO_ADDR_HOSTNAME_STRING=1
294 RCC += -DHAVE_BIO_ADDR_HOSTNAME_STRING=1
295 endif
296
297 # With relative paths in external diff/gdiff
298 ifdef FOSSIL_ENABLE_EXEC_REL_PATHS
299 TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
300
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -288,10 +288,12 @@
288288
289289
# With HTTPS support
290290
ifdef FOSSIL_ENABLE_SSL
291291
TCC += -DFOSSIL_ENABLE_SSL=1
292292
RCC += -DFOSSIL_ENABLE_SSL=1
293
+TCC += -DHAVE_BIO_ADDR_HOSTNAME_STRING=1
294
+RCC += -DHAVE_BIO_ADDR_HOSTNAME_STRING=1
293295
endif
294296
295297
# With relative paths in external diff/gdiff
296298
ifdef FOSSIL_ENABLE_EXEC_REL_PATHS
297299
TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
298300
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -288,10 +288,12 @@
288
289 # With HTTPS support
290 ifdef FOSSIL_ENABLE_SSL
291 TCC += -DFOSSIL_ENABLE_SSL=1
292 RCC += -DFOSSIL_ENABLE_SSL=1
 
 
293 endif
294
295 # With relative paths in external diff/gdiff
296 ifdef FOSSIL_ENABLE_EXEC_REL_PATHS
297 TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
298
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -288,10 +288,12 @@
288
289 # With HTTPS support
290 ifdef FOSSIL_ENABLE_SSL
291 TCC += -DFOSSIL_ENABLE_SSL=1
292 RCC += -DFOSSIL_ENABLE_SSL=1
293 TCC += -DHAVE_BIO_ADDR_HOSTNAME_STRING=1
294 RCC += -DHAVE_BIO_ADDR_HOSTNAME_STRING=1
295 endif
296
297 # With relative paths in external diff/gdiff
298 ifdef FOSSIL_ENABLE_EXEC_REL_PATHS
299 TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
300
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -235,10 +235,12 @@
235235
!endif
236236
237237
!if $(FOSSIL_ENABLE_SSL)!=0
238238
TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
239239
RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
240
+TCC = $(TCC) /DHAVE_BIO_ADDR_HOSTNAME_STRING=1
241
+RCC = $(RCC) /DHAVE_BIO_ADDR_HOSTNAME_STRING=1
240242
LIBS = $(LIBS) $(SSLLIB)
241243
LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
242244
!endif
243245
244246
!if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0
245247
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -235,10 +235,12 @@
235 !endif
236
237 !if $(FOSSIL_ENABLE_SSL)!=0
238 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
239 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
 
 
240 LIBS = $(LIBS) $(SSLLIB)
241 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
242 !endif
243
244 !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0
245
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -235,10 +235,12 @@
235 !endif
236
237 !if $(FOSSIL_ENABLE_SSL)!=0
238 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
239 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
240 TCC = $(TCC) /DHAVE_BIO_ADDR_HOSTNAME_STRING=1
241 RCC = $(RCC) /DHAVE_BIO_ADDR_HOSTNAME_STRING=1
242 LIBS = $(LIBS) $(SSLLIB)
243 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
244 !endif
245
246 !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0
247
--- www/changes.wiki
+++ www/changes.wiki
@@ -8,10 +8,12 @@
88
* Improved handling of relative hyperlinks on the
99
[/help?cmd=/artifact|/artifact] pages for wiki. For example,
1010
hyperlinks and the lizard &lt;img&gt; now work correctly
1111
for both [/artifact/2ff24ab0887cf522] and
1212
[/doc/0d7ac90d575004c2415/www/index.wiki].
13
+ * Enhancements to the timeline graph layout, to show more information
14
+ with less clutter.
1315
* Many documentation enhancements.
1416
* For the "[/help?cmd=update|fossil update]" and
1517
"[/help?cmd=checkout|fossil checkout]" commands, if a
1618
managed file is removed because it is no longer part of the target
1719
check-in and the directory containing the file is empty after the
@@ -27,26 +29,29 @@
2729
* Added the [/help?cmd=/secureraw|/secureraw] page that requires the
2830
complete SHA1 or SHA3 hash, not just a prefix, before it will deliver
2931
content.
3032
* Accept purely numeric ISO8601 date/time strings as long as they
3133
do not conflict with a hash. Example: "20190510134217" instead of
32
- "2019-05-10 13:42:17". This is very useful for query parameters.
34
+ "2019-05-10 13:42:17". This helps keep URLs shorter and less
35
+ complicated
3336
* Support both "1)" and "1." for numbered lists in markdown, as
3437
commonmark does.
3538
* The sync and clone HTTP requests omit the extra /xfer path element
3639
from the end of the request URI. All servers since 2010 know that
3740
the HTTP request is for a sync or clone from the mimetype so the
3841
extra path element is not needed.
39
- * If an automatic sync gets a 301 or 302 redirect request, then update
42
+ * If an automatic sync gets a permanent redirect request, then update
4043
the saved remote URL to the new address.
4144
* Temporary filenames (for example used for external "diff" commands)
4245
try to preserve the suffix of the original file.
4346
* Added the [/help?cmd=/thisdayinhistory|/thisdayinhistory] web page.
4447
* Enhanced parsing of [/help?cmd=/timeline|/timeline] query parameters
4548
"ymd=", "ym=", and "yw=". All arguments are option (in which case they
4649
default to the current time) and all accept ISO8601 date/times without
4750
punctuation.
51
+ * Automatically disapprove pending moderation requests for a user when
52
+ that user is deleted. This helps in dealing with spam-bots.
4853
* Improvements to the "Capability Summary" section in the
4954
[/help?cmd=/secaudit0|Security Audit] web-page.
5055
5156
<a name='v2_8'></a>
5257
<h2>Changes for Version 2.8 (2019-02-20)</h2>
5358
--- www/changes.wiki
+++ www/changes.wiki
@@ -8,10 +8,12 @@
8 * Improved handling of relative hyperlinks on the
9 [/help?cmd=/artifact|/artifact] pages for wiki. For example,
10 hyperlinks and the lizard &lt;img&gt; now work correctly
11 for both [/artifact/2ff24ab0887cf522] and
12 [/doc/0d7ac90d575004c2415/www/index.wiki].
 
 
13 * Many documentation enhancements.
14 * For the "[/help?cmd=update|fossil update]" and
15 "[/help?cmd=checkout|fossil checkout]" commands, if a
16 managed file is removed because it is no longer part of the target
17 check-in and the directory containing the file is empty after the
@@ -27,26 +29,29 @@
27 * Added the [/help?cmd=/secureraw|/secureraw] page that requires the
28 complete SHA1 or SHA3 hash, not just a prefix, before it will deliver
29 content.
30 * Accept purely numeric ISO8601 date/time strings as long as they
31 do not conflict with a hash. Example: "20190510134217" instead of
32 "2019-05-10 13:42:17". This is very useful for query parameters.
 
33 * Support both "1)" and "1." for numbered lists in markdown, as
34 commonmark does.
35 * The sync and clone HTTP requests omit the extra /xfer path element
36 from the end of the request URI. All servers since 2010 know that
37 the HTTP request is for a sync or clone from the mimetype so the
38 extra path element is not needed.
39 * If an automatic sync gets a 301 or 302 redirect request, then update
40 the saved remote URL to the new address.
41 * Temporary filenames (for example used for external "diff" commands)
42 try to preserve the suffix of the original file.
43 * Added the [/help?cmd=/thisdayinhistory|/thisdayinhistory] web page.
44 * Enhanced parsing of [/help?cmd=/timeline|/timeline] query parameters
45 "ymd=", "ym=", and "yw=". All arguments are option (in which case they
46 default to the current time) and all accept ISO8601 date/times without
47 punctuation.
 
 
48 * Improvements to the "Capability Summary" section in the
49 [/help?cmd=/secaudit0|Security Audit] web-page.
50
51 <a name='v2_8'></a>
52 <h2>Changes for Version 2.8 (2019-02-20)</h2>
53
--- www/changes.wiki
+++ www/changes.wiki
@@ -8,10 +8,12 @@
8 * Improved handling of relative hyperlinks on the
9 [/help?cmd=/artifact|/artifact] pages for wiki. For example,
10 hyperlinks and the lizard &lt;img&gt; now work correctly
11 for both [/artifact/2ff24ab0887cf522] and
12 [/doc/0d7ac90d575004c2415/www/index.wiki].
13 * Enhancements to the timeline graph layout, to show more information
14 with less clutter.
15 * Many documentation enhancements.
16 * For the "[/help?cmd=update|fossil update]" and
17 "[/help?cmd=checkout|fossil checkout]" commands, if a
18 managed file is removed because it is no longer part of the target
19 check-in and the directory containing the file is empty after the
@@ -27,26 +29,29 @@
29 * Added the [/help?cmd=/secureraw|/secureraw] page that requires the
30 complete SHA1 or SHA3 hash, not just a prefix, before it will deliver
31 content.
32 * Accept purely numeric ISO8601 date/time strings as long as they
33 do not conflict with a hash. Example: "20190510134217" instead of
34 "2019-05-10 13:42:17". This helps keep URLs shorter and less
35 complicated
36 * Support both "1)" and "1." for numbered lists in markdown, as
37 commonmark does.
38 * The sync and clone HTTP requests omit the extra /xfer path element
39 from the end of the request URI. All servers since 2010 know that
40 the HTTP request is for a sync or clone from the mimetype so the
41 extra path element is not needed.
42 * If an automatic sync gets a permanent redirect request, then update
43 the saved remote URL to the new address.
44 * Temporary filenames (for example used for external "diff" commands)
45 try to preserve the suffix of the original file.
46 * Added the [/help?cmd=/thisdayinhistory|/thisdayinhistory] web page.
47 * Enhanced parsing of [/help?cmd=/timeline|/timeline] query parameters
48 "ymd=", "ym=", and "yw=". All arguments are option (in which case they
49 default to the current time) and all accept ISO8601 date/times without
50 punctuation.
51 * Automatically disapprove pending moderation requests for a user when
52 that user is deleted. This helps in dealing with spam-bots.
53 * Improvements to the "Capability Summary" section in the
54 [/help?cmd=/secaudit0|Security Audit] web-page.
55
56 <a name='v2_8'></a>
57 <h2>Changes for Version 2.8 (2019-02-20)</h2>
58

Keyboard Shortcuts

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