Fossil SCM

Apply the same fix as [f56a138ee179e152] in /urllist.

stephan 2026-11-22 13:48 UTC trunk
Commit 3c20bf3c70daf513076ece8113f5b0b1647a281405191d29bb6b9399d9c02a56
1 file changed +12 -4
+12 -4
--- src/stat.c
+++ src/stat.c
@@ -621,16 +621,24 @@
621621
UrlData x;
622622
if( cnt==0 ){
623623
@ <div class="section">Recently synced with these URLs</div>
624624
@ <table border='0' width='100%%'>
625625
}
626
- memset(&x, 0, sizeof(x));
627
- url_parse_local(zURL, URL_OMIT_USER, &x);
628
- @ <tr><td width='100%%'><a href='%h(x.canonical)'>%h(x.canonical)</a>
626
+ if( fossil_strnicmp(zURL, "http://", 7)==0
627
+ || fossil_strnicmp(zURL, "https://", 8)==0
628
+ ){
629
+ memset(&x, 0, sizeof(x));
630
+ url_parse_local(zURL, URL_OMIT_USER, &x);
631
+ @ <tr><td width='100%%'><a href='%h(x.canonical)'>%h(x.canonical)</a>
632
+ url_unparse(&x);
633
+ }else{
634
+ /* A gitpush address such as git@host:path is not a URL that
635
+ ** url_parse_local() understands. Show it as it is. */
636
+ @ <tr><td width='100%%'>%h(zURL)
637
+ }
629638
@ <td><nobr>%h(db_column_text(&q,1))</nobr></td></tr>
630639
cnt++;
631
- url_unparse(&x);
632640
}
633641
db_finalize(&q);
634642
if( cnt ){
635643
@ </table>
636644
total += cnt;
637645
--- src/stat.c
+++ src/stat.c
@@ -621,16 +621,24 @@
621 UrlData x;
622 if( cnt==0 ){
623 @ <div class="section">Recently synced with these URLs</div>
624 @ <table border='0' width='100%%'>
625 }
626 memset(&x, 0, sizeof(x));
627 url_parse_local(zURL, URL_OMIT_USER, &x);
628 @ <tr><td width='100%%'><a href='%h(x.canonical)'>%h(x.canonical)</a>
 
 
 
 
 
 
 
 
 
629 @ <td><nobr>%h(db_column_text(&q,1))</nobr></td></tr>
630 cnt++;
631 url_unparse(&x);
632 }
633 db_finalize(&q);
634 if( cnt ){
635 @ </table>
636 total += cnt;
637
--- src/stat.c
+++ src/stat.c
@@ -621,16 +621,24 @@
621 UrlData x;
622 if( cnt==0 ){
623 @ <div class="section">Recently synced with these URLs</div>
624 @ <table border='0' width='100%%'>
625 }
626 if( fossil_strnicmp(zURL, "http://", 7)==0
627 || fossil_strnicmp(zURL, "https://", 8)==0
628 ){
629 memset(&x, 0, sizeof(x));
630 url_parse_local(zURL, URL_OMIT_USER, &x);
631 @ <tr><td width='100%%'><a href='%h(x.canonical)'>%h(x.canonical)</a>
632 url_unparse(&x);
633 }else{
634 /* A gitpush address such as git@host:path is not a URL that
635 ** url_parse_local() understands. Show it as it is. */
636 @ <tr><td width='100%%'>%h(zURL)
637 }
638 @ <td><nobr>%h(db_column_text(&q,1))</nobr></td></tr>
639 cnt++;
 
640 }
641 db_finalize(&q);
642 if( cnt ){
643 @ </table>
644 total += cnt;
645

Keyboard Shortcuts

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