Fossil SCM

Merge updates from trunk.

mistachkin 2020-06-12 23:12 jsonTestsPass merge
Commit 7b165677723ccfccfff6b9041347413162ea3238a3bcd0da5ee0744ae4d1a3f8
--- src/default_css.txt
+++ src/default_css.txt
@@ -876,10 +876,14 @@
876876
opacity: 0;
877877
pointer-events: none;
878878
display: none;
879879
}
880880
input {
881
- max-width: 95%;
881
+ max-width: 95%;
882882
}
883883
textarea {
884
- max-width: 95%;
884
+ max-width: 95%;
885
+}
886
+img {
887
+ max-width: 100%;
888
+ height: auto;
885889
}
886890
--- src/default_css.txt
+++ src/default_css.txt
@@ -876,10 +876,14 @@
876 opacity: 0;
877 pointer-events: none;
878 display: none;
879 }
880 input {
881 max-width: 95%;
882 }
883 textarea {
884 max-width: 95%;
 
 
 
 
885 }
886
--- src/default_css.txt
+++ src/default_css.txt
@@ -876,10 +876,14 @@
876 opacity: 0;
877 pointer-events: none;
878 display: none;
879 }
880 input {
881 max-width: 95%;
882 }
883 textarea {
884 max-width: 95%;
885 }
886 img {
887 max-width: 100%;
888 height: auto;
889 }
890
+6 -3
--- src/name.c
+++ src/name.c
@@ -599,22 +599,25 @@
599599
** WEBPAGE: ambiguous
600600
** URL: /ambiguous?name=NAME&src=WEBPAGE
601601
**
602602
** The NAME given by the name parameter is ambiguous. Display a page
603603
** that shows all possible choices and let the user select between them.
604
+**
605
+** The src= query parameter is optional. If omitted it defaults
606
+** to "info".
604607
*/
605608
void ambiguous_page(void){
606609
Stmt q;
607610
const char *zName = P("name");
608
- const char *zSrc = P("src");
611
+ const char *zSrc = PD("src","info");
609612
char *z;
610613
611614
if( zName==0 || zName[0]==0 || zSrc==0 || zSrc[0]==0 ){
612615
fossil_redirect_home();
613616
}
614617
style_header("Ambiguous Artifact ID");
615
- @ <p>The artifact id <b>%h(zName)</b> is ambiguous and might
618
+ @ <p>The artifact hash prefix <b>%h(zName)</b> is ambiguous and might
616619
@ mean any of the following:
617620
@ <ol>
618621
z = mprintf("%s", zName);
619622
canonical16(z, strlen(z));
620623
db_prepare(&q, "SELECT uuid, rid FROM blob WHERE uuid GLOB '%q*'", z);
@@ -1613,11 +1616,11 @@
16131616
@ <p>First 25 collisions of length %d(i):
16141617
}
16151618
for(j=0; j<aCollide[i].cnt && j<MAX_COLLIDE; j++){
16161619
char *zId = aCollide[i].azHit[j];
16171620
if( zId==0 ) continue;
1618
- @ %z(href("%R/whatis/%s",zId))%h(zId)</a>
1621
+ @ %z(href("%R/ambiguous/%s",zId))%h(zId)</a>
16191622
}
16201623
}
16211624
for(i=4; i<count(aCollide); i++){
16221625
for(j=0; j<aCollide[i].cnt && j<MAX_COLLIDE; j++){
16231626
fossil_free(aCollide[i].azHit[j]);
16241627
--- src/name.c
+++ src/name.c
@@ -599,22 +599,25 @@
599 ** WEBPAGE: ambiguous
600 ** URL: /ambiguous?name=NAME&src=WEBPAGE
601 **
602 ** The NAME given by the name parameter is ambiguous. Display a page
603 ** that shows all possible choices and let the user select between them.
 
 
 
604 */
605 void ambiguous_page(void){
606 Stmt q;
607 const char *zName = P("name");
608 const char *zSrc = P("src");
609 char *z;
610
611 if( zName==0 || zName[0]==0 || zSrc==0 || zSrc[0]==0 ){
612 fossil_redirect_home();
613 }
614 style_header("Ambiguous Artifact ID");
615 @ <p>The artifact id <b>%h(zName)</b> is ambiguous and might
616 @ mean any of the following:
617 @ <ol>
618 z = mprintf("%s", zName);
619 canonical16(z, strlen(z));
620 db_prepare(&q, "SELECT uuid, rid FROM blob WHERE uuid GLOB '%q*'", z);
@@ -1613,11 +1616,11 @@
1613 @ <p>First 25 collisions of length %d(i):
1614 }
1615 for(j=0; j<aCollide[i].cnt && j<MAX_COLLIDE; j++){
1616 char *zId = aCollide[i].azHit[j];
1617 if( zId==0 ) continue;
1618 @ %z(href("%R/whatis/%s",zId))%h(zId)</a>
1619 }
1620 }
1621 for(i=4; i<count(aCollide); i++){
1622 for(j=0; j<aCollide[i].cnt && j<MAX_COLLIDE; j++){
1623 fossil_free(aCollide[i].azHit[j]);
1624
--- src/name.c
+++ src/name.c
@@ -599,22 +599,25 @@
599 ** WEBPAGE: ambiguous
600 ** URL: /ambiguous?name=NAME&src=WEBPAGE
601 **
602 ** The NAME given by the name parameter is ambiguous. Display a page
603 ** that shows all possible choices and let the user select between them.
604 **
605 ** The src= query parameter is optional. If omitted it defaults
606 ** to "info".
607 */
608 void ambiguous_page(void){
609 Stmt q;
610 const char *zName = P("name");
611 const char *zSrc = PD("src","info");
612 char *z;
613
614 if( zName==0 || zName[0]==0 || zSrc==0 || zSrc[0]==0 ){
615 fossil_redirect_home();
616 }
617 style_header("Ambiguous Artifact ID");
618 @ <p>The artifact hash prefix <b>%h(zName)</b> is ambiguous and might
619 @ mean any of the following:
620 @ <ol>
621 z = mprintf("%s", zName);
622 canonical16(z, strlen(z));
623 db_prepare(&q, "SELECT uuid, rid FROM blob WHERE uuid GLOB '%q*'", z);
@@ -1613,11 +1616,11 @@
1616 @ <p>First 25 collisions of length %d(i):
1617 }
1618 for(j=0; j<aCollide[i].cnt && j<MAX_COLLIDE; j++){
1619 char *zId = aCollide[i].azHit[j];
1620 if( zId==0 ) continue;
1621 @ %z(href("%R/ambiguous/%s",zId))%h(zId)</a>
1622 }
1623 }
1624 for(i=4; i<count(aCollide); i++){
1625 for(j=0; j<aCollide[i].cnt && j<MAX_COLLIDE; j++){
1626 fossil_free(aCollide[i].azHit[j]);
1627
--- test/cmdline.test
+++ test/cmdline.test
@@ -18,19 +18,37 @@
1818
# Test command line parsing
1919
#
2020
2121
test_setup ""
2222
23
-proc cmd-line {testname args} {
23
+proc cmd-line {usefile testname args} {
2424
set i 1
2525
foreach {cmdline result} $args {
26
- fossil test-echo $cmdline
27
- test cmd-line-$testname.$i {[lrange [split $::RESULT \n] 3 end]=="\{argv\[2\] = \[$result\]\}"}
26
+ if {$usefile} {
27
+ set cmdlinefile [file join \
28
+ [getTemporaryPath] fossil-cmd-line-$testname.txt]
29
+
30
+ write_file $cmdlinefile $cmdline
31
+ fossil test-echo --args $cmdlinefile
32
+ file delete $cmdlinefile
33
+ } else {
34
+ fossil test-echo $cmdline
35
+ }
36
+
37
+ test cmd-line-$testname.$i \
38
+ {[lrange [split $::RESULT \n] 3 end]=="\{argv\[2\] = \[$result\]\}"}
39
+
2840
incr i
2941
}
3042
}
31
-cmd-line 100 abc abc a\"bc a\"bc \"abc\" \"abc\"
32
-cmd-line 101 * * *.* *.*
43
+
44
+cmd-line false 100 abc abc a\"bc a\"bc \"abc\" \"abc\"
45
+
46
+#
47
+# NOTE: Use an --args file on Windows to avoid unwanted glob expansion
48
+# from MinGW and/or the MSVCRT.
49
+#
50
+cmd-line $is_windows 101 * * *.* *.*
3351
3452
###############################################################################
3553
3654
test_cleanup
3755
--- test/cmdline.test
+++ test/cmdline.test
@@ -18,19 +18,37 @@
18 # Test command line parsing
19 #
20
21 test_setup ""
22
23 proc cmd-line {testname args} {
24 set i 1
25 foreach {cmdline result} $args {
26 fossil test-echo $cmdline
27 test cmd-line-$testname.$i {[lrange [split $::RESULT \n] 3 end]=="\{argv\[2\] = \[$result\]\}"}
 
 
 
 
 
 
 
 
 
 
 
 
28 incr i
29 }
30 }
31 cmd-line 100 abc abc a\"bc a\"bc \"abc\" \"abc\"
32 cmd-line 101 * * *.* *.*
 
 
 
 
 
 
33
34 ###############################################################################
35
36 test_cleanup
37
--- test/cmdline.test
+++ test/cmdline.test
@@ -18,19 +18,37 @@
18 # Test command line parsing
19 #
20
21 test_setup ""
22
23 proc cmd-line {usefile testname args} {
24 set i 1
25 foreach {cmdline result} $args {
26 if {$usefile} {
27 set cmdlinefile [file join \
28 [getTemporaryPath] fossil-cmd-line-$testname.txt]
29
30 write_file $cmdlinefile $cmdline
31 fossil test-echo --args $cmdlinefile
32 file delete $cmdlinefile
33 } else {
34 fossil test-echo $cmdline
35 }
36
37 test cmd-line-$testname.$i \
38 {[lrange [split $::RESULT \n] 3 end]=="\{argv\[2\] = \[$result\]\}"}
39
40 incr i
41 }
42 }
43
44 cmd-line false 100 abc abc a\"bc a\"bc \"abc\" \"abc\"
45
46 #
47 # NOTE: Use an --args file on Windows to avoid unwanted glob expansion
48 # from MinGW and/or the MSVCRT.
49 #
50 cmd-line $is_windows 101 * * *.* *.*
51
52 ###############################################################################
53
54 test_cleanup
55
--- test/set-manifest.test
+++ test/set-manifest.test
@@ -16,16 +16,10 @@
1616
############################################################################
1717
#
1818
# Test manifest setting
1919
#
2020
21
-# We need SHA1 to effectively test the manifest files produced by
22
-# fossil. It looks like the one from tcllib is exactly what we need.
23
-# On ActiveTcl, add it with teacup. On other platforms, YMMV.
24
-# teacup install sha1
25
-package require sha1
26
-
2721
proc file_contains {fname match} {
2822
set fp [open $fname r]
2923
set contents [read $fp]
3024
close $fp
3125
set lines [split $contents "\n"]
@@ -34,10 +28,19 @@
3428
return 1
3529
}
3630
}
3731
return 0
3832
}
33
+
34
+# We need SHA1 to effectively test the manifest files produced by
35
+# fossil. It looks like the one from tcllib is exactly what we need.
36
+# On ActiveTcl, add it with teacup. On other platforms, YMMV.
37
+# teacup install sha1
38
+if {[catch {package require sha1}] != 0} then {
39
+ puts "The \"sha1\" package is not available."
40
+ test_cleanup_then_return
41
+}
3942
4043
# We need a respository, so let it have one.
4144
test_setup
4245
4346
#### Verify classic behavior of the manifest setting
4447
--- test/set-manifest.test
+++ test/set-manifest.test
@@ -16,16 +16,10 @@
16 ############################################################################
17 #
18 # Test manifest setting
19 #
20
21 # We need SHA1 to effectively test the manifest files produced by
22 # fossil. It looks like the one from tcllib is exactly what we need.
23 # On ActiveTcl, add it with teacup. On other platforms, YMMV.
24 # teacup install sha1
25 package require sha1
26
27 proc file_contains {fname match} {
28 set fp [open $fname r]
29 set contents [read $fp]
30 close $fp
31 set lines [split $contents "\n"]
@@ -34,10 +28,19 @@
34 return 1
35 }
36 }
37 return 0
38 }
 
 
 
 
 
 
 
 
 
39
40 # We need a respository, so let it have one.
41 test_setup
42
43 #### Verify classic behavior of the manifest setting
44
--- test/set-manifest.test
+++ test/set-manifest.test
@@ -16,16 +16,10 @@
16 ############################################################################
17 #
18 # Test manifest setting
19 #
20
 
 
 
 
 
 
21 proc file_contains {fname match} {
22 set fp [open $fname r]
23 set contents [read $fp]
24 close $fp
25 set lines [split $contents "\n"]
@@ -34,10 +28,19 @@
28 return 1
29 }
30 }
31 return 0
32 }
33
34 # We need SHA1 to effectively test the manifest files produced by
35 # fossil. It looks like the one from tcllib is exactly what we need.
36 # On ActiveTcl, add it with teacup. On other platforms, YMMV.
37 # teacup install sha1
38 if {[catch {package require sha1}] != 0} then {
39 puts "The \"sha1\" package is not available."
40 test_cleanup_then_return
41 }
42
43 # We need a respository, so let it have one.
44 test_setup
45
46 #### Verify classic behavior of the manifest setting
47
--- test/unversioned.test
+++ test/unversioned.test
@@ -119,11 +119,11 @@
119119
120120
###############################################################################
121121
122122
fossil unversioned add "unversioned space.txt" -expectError
123123
test unversioned-14 {[normalize_result] eq \
124
-{names of unversioned files may not contain whitespace}}
124
+{unversioned filenames may not contain whitespace: 'unversioned space.txt'}}
125125
126126
###############################################################################
127127
128128
fossil unversioned add "unversioned space.txt" --as unversioned3.txt
129129
test unversioned-15 {[normalize_result] eq {}}
@@ -343,11 +343,12 @@
343343
test unversioned-46 {[regexp \
344344
{Round-trips: 1 Artifacts sent: 0 received: 0
345345
Round-trips: 1 Artifacts sent: 0 received: 0
346346
Round-trips: 2 Artifacts sent: 0 received: 0
347347
Round-trips: 2 Artifacts sent: 0 received: 2
348
-\n? done, sent: \d+ received: \d+ ip: 127.0.0.1} [normalize_result]]}
348
+\n? done, sent: \d+ received: \d+ ip: (?:127\.0\.0\.1|::1)} \
349
+[normalize_result]]}
349350
350351
###############################################################################
351352
352353
fossil unversioned ls
353354
test unversioned-47 {[normalize_result] eq {unversioned2.txt
@@ -388,11 +389,12 @@
388389
test unversioned-52 {[regexp \
389390
{Round-trips: 1 Artifacts sent: 0 received: 0
390391
Round-trips: 1 Artifacts sent: 0 received: 0
391392
Round-trips: 2 Artifacts sent: 0 received: 0
392393
Round-trips: 2 Artifacts sent: 0 received: 2
393
-\n? done, sent: \d+ received: \d+ ip: 127.0.0.1} [normalize_result]]}
394
+\n? done, sent: \d+ received: \d+ ip: (?:127\.0\.0\.1|::1)} \
395
+[normalize_result]]}
394396
395397
###############################################################################
396398
397399
fossil unversioned list
398400
test unversioned-53 {[regexp \
@@ -412,11 +414,12 @@
412414
test unversioned-55 {[regexp \
413415
{Round-trips: 1 Artifacts sent: 0 received: 0
414416
Round-trips: 1 Artifacts sent: 0 received: 0
415417
Round-trips: 2 Artifacts sent: 1 received: 0
416418
Round-trips: 2 Artifacts sent: 1 received: 0
417
-\n? done, sent: \d+ received: \d+ ip: 127.0.0.1} [normalize_result]]}
419
+\n? done, sent: \d+ received: \d+ ip: (?:127\.0\.0\.1|::1)} \
420
+[normalize_result]]}
418421
419422
###############################################################################
420423
421424
fossil close
422425
test unversioned-56 {[normalize_result] eq {}}
423426
--- test/unversioned.test
+++ test/unversioned.test
@@ -119,11 +119,11 @@
119
120 ###############################################################################
121
122 fossil unversioned add "unversioned space.txt" -expectError
123 test unversioned-14 {[normalize_result] eq \
124 {names of unversioned files may not contain whitespace}}
125
126 ###############################################################################
127
128 fossil unversioned add "unversioned space.txt" --as unversioned3.txt
129 test unversioned-15 {[normalize_result] eq {}}
@@ -343,11 +343,12 @@
343 test unversioned-46 {[regexp \
344 {Round-trips: 1 Artifacts sent: 0 received: 0
345 Round-trips: 1 Artifacts sent: 0 received: 0
346 Round-trips: 2 Artifacts sent: 0 received: 0
347 Round-trips: 2 Artifacts sent: 0 received: 2
348 \n? done, sent: \d+ received: \d+ ip: 127.0.0.1} [normalize_result]]}
 
349
350 ###############################################################################
351
352 fossil unversioned ls
353 test unversioned-47 {[normalize_result] eq {unversioned2.txt
@@ -388,11 +389,12 @@
388 test unversioned-52 {[regexp \
389 {Round-trips: 1 Artifacts sent: 0 received: 0
390 Round-trips: 1 Artifacts sent: 0 received: 0
391 Round-trips: 2 Artifacts sent: 0 received: 0
392 Round-trips: 2 Artifacts sent: 0 received: 2
393 \n? done, sent: \d+ received: \d+ ip: 127.0.0.1} [normalize_result]]}
 
394
395 ###############################################################################
396
397 fossil unversioned list
398 test unversioned-53 {[regexp \
@@ -412,11 +414,12 @@
412 test unversioned-55 {[regexp \
413 {Round-trips: 1 Artifacts sent: 0 received: 0
414 Round-trips: 1 Artifacts sent: 0 received: 0
415 Round-trips: 2 Artifacts sent: 1 received: 0
416 Round-trips: 2 Artifacts sent: 1 received: 0
417 \n? done, sent: \d+ received: \d+ ip: 127.0.0.1} [normalize_result]]}
 
418
419 ###############################################################################
420
421 fossil close
422 test unversioned-56 {[normalize_result] eq {}}
423
--- test/unversioned.test
+++ test/unversioned.test
@@ -119,11 +119,11 @@
119
120 ###############################################################################
121
122 fossil unversioned add "unversioned space.txt" -expectError
123 test unversioned-14 {[normalize_result] eq \
124 {unversioned filenames may not contain whitespace: 'unversioned space.txt'}}
125
126 ###############################################################################
127
128 fossil unversioned add "unversioned space.txt" --as unversioned3.txt
129 test unversioned-15 {[normalize_result] eq {}}
@@ -343,11 +343,12 @@
343 test unversioned-46 {[regexp \
344 {Round-trips: 1 Artifacts sent: 0 received: 0
345 Round-trips: 1 Artifacts sent: 0 received: 0
346 Round-trips: 2 Artifacts sent: 0 received: 0
347 Round-trips: 2 Artifacts sent: 0 received: 2
348 \n? done, sent: \d+ received: \d+ ip: (?:127\.0\.0\.1|::1)} \
349 [normalize_result]]}
350
351 ###############################################################################
352
353 fossil unversioned ls
354 test unversioned-47 {[normalize_result] eq {unversioned2.txt
@@ -388,11 +389,12 @@
389 test unversioned-52 {[regexp \
390 {Round-trips: 1 Artifacts sent: 0 received: 0
391 Round-trips: 1 Artifacts sent: 0 received: 0
392 Round-trips: 2 Artifacts sent: 0 received: 0
393 Round-trips: 2 Artifacts sent: 0 received: 2
394 \n? done, sent: \d+ received: \d+ ip: (?:127\.0\.0\.1|::1)} \
395 [normalize_result]]}
396
397 ###############################################################################
398
399 fossil unversioned list
400 test unversioned-53 {[regexp \
@@ -412,11 +414,12 @@
414 test unversioned-55 {[regexp \
415 {Round-trips: 1 Artifacts sent: 0 received: 0
416 Round-trips: 1 Artifacts sent: 0 received: 0
417 Round-trips: 2 Artifacts sent: 1 received: 0
418 Round-trips: 2 Artifacts sent: 1 received: 0
419 \n? done, sent: \d+ received: \d+ ip: (?:127\.0\.0\.1|::1)} \
420 [normalize_result]]}
421
422 ###############################################################################
423
424 fossil close
425 test unversioned-56 {[normalize_result] eq {}}
426
--- www/concepts.wiki
+++ www/concepts.wiki
@@ -234,11 +234,11 @@
234234
token after the name of the Fossil executable, as shown above.
235235
236236
<a name="workflow"></a>
237237
<h2>4.0 Workflow</h2>
238238
239
-<img src="concept2.gif" align="right" hspace="10">
239
+<img src="concept2.gif" align="right" hspace="10" style="max-width:50%;">
240240
241241
Fossil has two modes of operation: <i>"autosync"</i> and
242242
<i>"manual-merge"</i>
243243
Autosync mode is reminiscent of CVS or SVN in that it automatically
244244
keeps your changes in synchronization with your co-workers through
245245
--- www/concepts.wiki
+++ www/concepts.wiki
@@ -234,11 +234,11 @@
234 token after the name of the Fossil executable, as shown above.
235
236 <a name="workflow"></a>
237 <h2>4.0 Workflow</h2>
238
239 <img src="concept2.gif" align="right" hspace="10">
240
241 Fossil has two modes of operation: <i>"autosync"</i> and
242 <i>"manual-merge"</i>
243 Autosync mode is reminiscent of CVS or SVN in that it automatically
244 keeps your changes in synchronization with your co-workers through
245
--- www/concepts.wiki
+++ www/concepts.wiki
@@ -234,11 +234,11 @@
234 token after the name of the Fossil executable, as shown above.
235
236 <a name="workflow"></a>
237 <h2>4.0 Workflow</h2>
238
239 <img src="concept2.gif" align="right" hspace="10" style="max-width:50%;">
240
241 Fossil has two modes of operation: <i>"autosync"</i> and
242 <i>"manual-merge"</i>
243 Autosync mode is reminiscent of CVS or SVN in that it automatically
244 keeps your changes in synchronization with your co-workers through
245
--- www/webpage-ex.md
+++ www/webpage-ex.md
@@ -100,11 +100,11 @@
100100
Number of check-ins for each source file.
101101
(Click on column headers to sort.)
102102
103103
* <a target='_blank' class='exbtn'
104104
href='$ROOT/blame?checkin=5260fbf63287&filename=src/rss.c&limit=-1'>
105
- Example</a>
105
+ (Example)</a> &rarr;
106106
Most recent change to each line of a particular source file in a
107107
particular check-in.
108108
109109
* <a target='_blank' class='exbtn'
110110
href='$ROOT/taglist'>(Example)</a> &rarr;
111111
--- www/webpage-ex.md
+++ www/webpage-ex.md
@@ -100,11 +100,11 @@
100 Number of check-ins for each source file.
101 (Click on column headers to sort.)
102
103 * <a target='_blank' class='exbtn'
104 href='$ROOT/blame?checkin=5260fbf63287&filename=src/rss.c&limit=-1'>
105 Example</a>
106 Most recent change to each line of a particular source file in a
107 particular check-in.
108
109 * <a target='_blank' class='exbtn'
110 href='$ROOT/taglist'>(Example)</a> &rarr;
111
--- www/webpage-ex.md
+++ www/webpage-ex.md
@@ -100,11 +100,11 @@
100 Number of check-ins for each source file.
101 (Click on column headers to sort.)
102
103 * <a target='_blank' class='exbtn'
104 href='$ROOT/blame?checkin=5260fbf63287&filename=src/rss.c&limit=-1'>
105 (Example)</a> &rarr;
106 Most recent change to each line of a particular source file in a
107 particular check-in.
108
109 * <a target='_blank' class='exbtn'
110 href='$ROOT/taglist'>(Example)</a> &rarr;
111

Keyboard Shortcuts

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