Fossil SCM
Back out the main-url patch. On second thought, this does not add a lot of value but does introduce complication. Maybe it will get added back in later.
Commit
5bb4f12a8fedd4f47cba5f54bab00bd88e64650b31c0a1b82df4848c973a1e48
Parent
cfb5be418969286…
2 files changed
-10
+7
-39
-10
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -1054,20 +1054,10 @@ | ||
| 1054 | 1054 | @ the latest trunk check-in is downloaded. Change this tag to something |
| 1055 | 1055 | @ else (ex: release) to alter the behavior of the /download page. |
| 1056 | 1056 | @ (Property: "download-tag") |
| 1057 | 1057 | @ </p> |
| 1058 | 1058 | @ <hr /> |
| 1059 | - entry_attribute("Main URL", 60, "main-url", "exturl", "", 0); | |
| 1060 | - @ <p>Enter the canonical URL used to access this repository from the | |
| 1061 | - @ internet. If this repository is not set up as a server, leave this | |
| 1062 | - @ entry blank. | |
| 1063 | - @ | |
| 1064 | - @ <p>This entry is not required. It is informational only. Inaccurate | |
| 1065 | - @ entries here will cause goofy URLs to appear under the /urllist page | |
| 1066 | - @ of sync partners, but are otherwise harmless. | |
| 1067 | - @ (Property: "main-url") | |
| 1068 | - @ <hr /> | |
| 1069 | 1059 | entry_attribute("Index Page", 60, "index-page", "idxpg", "/home", 0); |
| 1070 | 1060 | @ <p>Enter the pathname of the page to display when the "Home" menu |
| 1071 | 1061 | @ option is selected and when no pathname is |
| 1072 | 1062 | @ specified in the URL. For example, if you visit the url:</p> |
| 1073 | 1063 | @ |
| 1074 | 1064 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1054,20 +1054,10 @@ | |
| 1054 | @ the latest trunk check-in is downloaded. Change this tag to something |
| 1055 | @ else (ex: release) to alter the behavior of the /download page. |
| 1056 | @ (Property: "download-tag") |
| 1057 | @ </p> |
| 1058 | @ <hr /> |
| 1059 | entry_attribute("Main URL", 60, "main-url", "exturl", "", 0); |
| 1060 | @ <p>Enter the canonical URL used to access this repository from the |
| 1061 | @ internet. If this repository is not set up as a server, leave this |
| 1062 | @ entry blank. |
| 1063 | @ |
| 1064 | @ <p>This entry is not required. It is informational only. Inaccurate |
| 1065 | @ entries here will cause goofy URLs to appear under the /urllist page |
| 1066 | @ of sync partners, but are otherwise harmless. |
| 1067 | @ (Property: "main-url") |
| 1068 | @ <hr /> |
| 1069 | entry_attribute("Index Page", 60, "index-page", "idxpg", "/home", 0); |
| 1070 | @ <p>Enter the pathname of the page to display when the "Home" menu |
| 1071 | @ option is selected and when no pathname is |
| 1072 | @ specified in the URL. For example, if you visit the url:</p> |
| 1073 | @ |
| 1074 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1054,20 +1054,10 @@ | |
| 1054 | @ the latest trunk check-in is downloaded. Change this tag to something |
| 1055 | @ else (ex: release) to alter the behavior of the /download page. |
| 1056 | @ (Property: "download-tag") |
| 1057 | @ </p> |
| 1058 | @ <hr /> |
| 1059 | entry_attribute("Index Page", 60, "index-page", "idxpg", "/home", 0); |
| 1060 | @ <p>Enter the pathname of the page to display when the "Home" menu |
| 1061 | @ option is selected and when no pathname is |
| 1062 | @ specified in the URL. For example, if you visit the url:</p> |
| 1063 | @ |
| 1064 |
+7
-39
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -1577,21 +1577,21 @@ | ||
| 1577 | 1577 | if( !g.perm.Private ){ |
| 1578 | 1578 | server_private_xfer_not_authorized(); |
| 1579 | 1579 | }else{ |
| 1580 | 1580 | xfer.syncPrivate = 1; |
| 1581 | 1581 | } |
| 1582 | - }else | |
| 1582 | + } | |
| 1583 | 1583 | |
| 1584 | 1584 | /* pragma send-catalog |
| 1585 | 1585 | ** |
| 1586 | 1586 | ** The client wants to see igot cards for all known artifacts. |
| 1587 | 1587 | ** This is used as part of "sync --verily" to help ensure that |
| 1588 | 1588 | ** no artifacts have been missed on prior syncs. |
| 1589 | 1589 | */ |
| 1590 | 1590 | if( blob_eq(&xfer.aToken[1], "send-catalog") ){ |
| 1591 | 1591 | xfer.resync = 0x7fffffff; |
| 1592 | - }else | |
| 1592 | + } | |
| 1593 | 1593 | |
| 1594 | 1594 | /* pragma client-version VERSION ?DATE? ?TIME? |
| 1595 | 1595 | ** |
| 1596 | 1596 | ** The client announces to the server what version of Fossil it |
| 1597 | 1597 | ** is running. The DATE and TIME are a pure numeric ISO8601 time |
| @@ -1603,11 +1603,11 @@ | ||
| 1603 | 1603 | xfer.remoteDate = atoi(blob_str(&xfer.aToken[3])); |
| 1604 | 1604 | xfer.remoteTime = atoi(blob_str(&xfer.aToken[4])); |
| 1605 | 1605 | @ pragma server-version %d(RELEASE_VERSION_NUMBER) \ |
| 1606 | 1606 | @ %d(MANIFEST_NUMERIC_DATE) %d(MANIFEST_NUMERIC_TIME) |
| 1607 | 1607 | } |
| 1608 | - }else | |
| 1608 | + } | |
| 1609 | 1609 | |
| 1610 | 1610 | /* pragma uv-hash HASH |
| 1611 | 1611 | ** |
| 1612 | 1612 | ** The client wants to make sure that unversioned files are all synced. |
| 1613 | 1613 | ** If the HASH does not match, send a complete catalog of |
| @@ -1626,11 +1626,11 @@ | ||
| 1626 | 1626 | @ pragma uv-pull-only |
| 1627 | 1627 | } |
| 1628 | 1628 | send_unversioned_catalog(&xfer); |
| 1629 | 1629 | } |
| 1630 | 1630 | uvCatalogSent = 1; |
| 1631 | - }else | |
| 1631 | + } | |
| 1632 | 1632 | |
| 1633 | 1633 | /* pragma ci-lock CHECKIN-HASH CLIENT-ID |
| 1634 | 1634 | ** |
| 1635 | 1635 | ** The client wants to make non-branch commit against the check-in |
| 1636 | 1636 | ** identified by CHECKIN-HASH. The server will remember this and |
| @@ -1686,11 +1686,11 @@ | ||
| 1686 | 1686 | db_protect_pop(); |
| 1687 | 1687 | } |
| 1688 | 1688 | if( db_get_boolean("forbid-delta-manifests",0) ){ |
| 1689 | 1689 | @ pragma avoid-delta-manifests |
| 1690 | 1690 | } |
| 1691 | - }else | |
| 1691 | + } | |
| 1692 | 1692 | |
| 1693 | 1693 | /* pragma ci-unlock CLIENT-ID |
| 1694 | 1694 | ** |
| 1695 | 1695 | ** Remove any locks previously held by CLIENT-ID. Clients send this |
| 1696 | 1696 | ** pragma with their own ID whenever they know that they no longer |
| @@ -1706,34 +1706,12 @@ | ||
| 1706 | 1706 | " WHERE name GLOB 'ci-lock-*'" |
| 1707 | 1707 | " AND json_extract(value,'$.clientid')=%Q", |
| 1708 | 1708 | blob_str(&xfer.aToken[2]) |
| 1709 | 1709 | ); |
| 1710 | 1710 | db_protect_pop(); |
| 1711 | - }else | |
| 1712 | - | |
| 1713 | - /* pragma from-url URL | |
| 1714 | - ** | |
| 1715 | - ** By this pragma, the client proclaims that it can be reached | |
| 1716 | - ** as a server located at URL. | |
| 1717 | - ** | |
| 1718 | - ** If the user has write permission, then record the URL as a sync | |
| 1719 | - ** partner so that it shows up in /urllist pages. | |
| 1720 | - */ | |
| 1721 | - if( blob_eq(&xfer.aToken[1], "from-url") ){ | |
| 1722 | - if( xfer.nToken==3 | |
| 1723 | - && blob_size(&xfer.aToken[2])>4 | |
| 1724 | - && g.perm.Write | |
| 1725 | - ){ | |
| 1726 | - db_unprotect(PROTECT_CONFIG); | |
| 1727 | - db_multi_exec( | |
| 1728 | - "REPLACE INTO config(name,value,mtime)" | |
| 1729 | - "VALUES('syncwith:%q',1,now())", | |
| 1730 | - blob_str(&xfer.aToken[2]) | |
| 1731 | - ); | |
| 1732 | - db_protect_pop(); | |
| 1733 | - } | |
| 1734 | - } | |
| 1711 | + } | |
| 1712 | + | |
| 1735 | 1713 | }else |
| 1736 | 1714 | |
| 1737 | 1715 | /* Unknown message |
| 1738 | 1716 | */ |
| 1739 | 1717 | { |
| @@ -2132,20 +2110,10 @@ | ||
| 2132 | 2110 | zCkinLock = 0; |
| 2133 | 2111 | }else if( zClientId ){ |
| 2134 | 2112 | blob_appendf(&send, "pragma ci-unlock %s\n", zClientId); |
| 2135 | 2113 | } |
| 2136 | 2114 | |
| 2137 | - /* If this repository has a main-url, let the other side know about | |
| 2138 | - ** it. | |
| 2139 | - */ | |
| 2140 | - if( (syncFlags && SYNC_PUSH)!=0 && nCycle==0 ){ | |
| 2141 | - const char *zSelfUrl = db_get("main-url",0); | |
| 2142 | - if( zSelfUrl && zSelfUrl[0]!=0 ){ | |
| 2143 | - blob_appendf(&send, "pragma from-url %s\n", zSelfUrl); | |
| 2144 | - } | |
| 2145 | - } | |
| 2146 | - | |
| 2147 | 2115 | /* Append randomness to the end of the uplink message. This makes all |
| 2148 | 2116 | ** messages unique so that that the login-card nonce will always |
| 2149 | 2117 | ** be unique. |
| 2150 | 2118 | */ |
| 2151 | 2119 | zRandomness = db_text(0, "SELECT hex(randomblob(20))"); |
| 2152 | 2120 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1577,21 +1577,21 @@ | |
| 1577 | if( !g.perm.Private ){ |
| 1578 | server_private_xfer_not_authorized(); |
| 1579 | }else{ |
| 1580 | xfer.syncPrivate = 1; |
| 1581 | } |
| 1582 | }else |
| 1583 | |
| 1584 | /* pragma send-catalog |
| 1585 | ** |
| 1586 | ** The client wants to see igot cards for all known artifacts. |
| 1587 | ** This is used as part of "sync --verily" to help ensure that |
| 1588 | ** no artifacts have been missed on prior syncs. |
| 1589 | */ |
| 1590 | if( blob_eq(&xfer.aToken[1], "send-catalog") ){ |
| 1591 | xfer.resync = 0x7fffffff; |
| 1592 | }else |
| 1593 | |
| 1594 | /* pragma client-version VERSION ?DATE? ?TIME? |
| 1595 | ** |
| 1596 | ** The client announces to the server what version of Fossil it |
| 1597 | ** is running. The DATE and TIME are a pure numeric ISO8601 time |
| @@ -1603,11 +1603,11 @@ | |
| 1603 | xfer.remoteDate = atoi(blob_str(&xfer.aToken[3])); |
| 1604 | xfer.remoteTime = atoi(blob_str(&xfer.aToken[4])); |
| 1605 | @ pragma server-version %d(RELEASE_VERSION_NUMBER) \ |
| 1606 | @ %d(MANIFEST_NUMERIC_DATE) %d(MANIFEST_NUMERIC_TIME) |
| 1607 | } |
| 1608 | }else |
| 1609 | |
| 1610 | /* pragma uv-hash HASH |
| 1611 | ** |
| 1612 | ** The client wants to make sure that unversioned files are all synced. |
| 1613 | ** If the HASH does not match, send a complete catalog of |
| @@ -1626,11 +1626,11 @@ | |
| 1626 | @ pragma uv-pull-only |
| 1627 | } |
| 1628 | send_unversioned_catalog(&xfer); |
| 1629 | } |
| 1630 | uvCatalogSent = 1; |
| 1631 | }else |
| 1632 | |
| 1633 | /* pragma ci-lock CHECKIN-HASH CLIENT-ID |
| 1634 | ** |
| 1635 | ** The client wants to make non-branch commit against the check-in |
| 1636 | ** identified by CHECKIN-HASH. The server will remember this and |
| @@ -1686,11 +1686,11 @@ | |
| 1686 | db_protect_pop(); |
| 1687 | } |
| 1688 | if( db_get_boolean("forbid-delta-manifests",0) ){ |
| 1689 | @ pragma avoid-delta-manifests |
| 1690 | } |
| 1691 | }else |
| 1692 | |
| 1693 | /* pragma ci-unlock CLIENT-ID |
| 1694 | ** |
| 1695 | ** Remove any locks previously held by CLIENT-ID. Clients send this |
| 1696 | ** pragma with their own ID whenever they know that they no longer |
| @@ -1706,34 +1706,12 @@ | |
| 1706 | " WHERE name GLOB 'ci-lock-*'" |
| 1707 | " AND json_extract(value,'$.clientid')=%Q", |
| 1708 | blob_str(&xfer.aToken[2]) |
| 1709 | ); |
| 1710 | db_protect_pop(); |
| 1711 | }else |
| 1712 | |
| 1713 | /* pragma from-url URL |
| 1714 | ** |
| 1715 | ** By this pragma, the client proclaims that it can be reached |
| 1716 | ** as a server located at URL. |
| 1717 | ** |
| 1718 | ** If the user has write permission, then record the URL as a sync |
| 1719 | ** partner so that it shows up in /urllist pages. |
| 1720 | */ |
| 1721 | if( blob_eq(&xfer.aToken[1], "from-url") ){ |
| 1722 | if( xfer.nToken==3 |
| 1723 | && blob_size(&xfer.aToken[2])>4 |
| 1724 | && g.perm.Write |
| 1725 | ){ |
| 1726 | db_unprotect(PROTECT_CONFIG); |
| 1727 | db_multi_exec( |
| 1728 | "REPLACE INTO config(name,value,mtime)" |
| 1729 | "VALUES('syncwith:%q',1,now())", |
| 1730 | blob_str(&xfer.aToken[2]) |
| 1731 | ); |
| 1732 | db_protect_pop(); |
| 1733 | } |
| 1734 | } |
| 1735 | }else |
| 1736 | |
| 1737 | /* Unknown message |
| 1738 | */ |
| 1739 | { |
| @@ -2132,20 +2110,10 @@ | |
| 2132 | zCkinLock = 0; |
| 2133 | }else if( zClientId ){ |
| 2134 | blob_appendf(&send, "pragma ci-unlock %s\n", zClientId); |
| 2135 | } |
| 2136 | |
| 2137 | /* If this repository has a main-url, let the other side know about |
| 2138 | ** it. |
| 2139 | */ |
| 2140 | if( (syncFlags && SYNC_PUSH)!=0 && nCycle==0 ){ |
| 2141 | const char *zSelfUrl = db_get("main-url",0); |
| 2142 | if( zSelfUrl && zSelfUrl[0]!=0 ){ |
| 2143 | blob_appendf(&send, "pragma from-url %s\n", zSelfUrl); |
| 2144 | } |
| 2145 | } |
| 2146 | |
| 2147 | /* Append randomness to the end of the uplink message. This makes all |
| 2148 | ** messages unique so that that the login-card nonce will always |
| 2149 | ** be unique. |
| 2150 | */ |
| 2151 | zRandomness = db_text(0, "SELECT hex(randomblob(20))"); |
| 2152 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1577,21 +1577,21 @@ | |
| 1577 | if( !g.perm.Private ){ |
| 1578 | server_private_xfer_not_authorized(); |
| 1579 | }else{ |
| 1580 | xfer.syncPrivate = 1; |
| 1581 | } |
| 1582 | } |
| 1583 | |
| 1584 | /* pragma send-catalog |
| 1585 | ** |
| 1586 | ** The client wants to see igot cards for all known artifacts. |
| 1587 | ** This is used as part of "sync --verily" to help ensure that |
| 1588 | ** no artifacts have been missed on prior syncs. |
| 1589 | */ |
| 1590 | if( blob_eq(&xfer.aToken[1], "send-catalog") ){ |
| 1591 | xfer.resync = 0x7fffffff; |
| 1592 | } |
| 1593 | |
| 1594 | /* pragma client-version VERSION ?DATE? ?TIME? |
| 1595 | ** |
| 1596 | ** The client announces to the server what version of Fossil it |
| 1597 | ** is running. The DATE and TIME are a pure numeric ISO8601 time |
| @@ -1603,11 +1603,11 @@ | |
| 1603 | xfer.remoteDate = atoi(blob_str(&xfer.aToken[3])); |
| 1604 | xfer.remoteTime = atoi(blob_str(&xfer.aToken[4])); |
| 1605 | @ pragma server-version %d(RELEASE_VERSION_NUMBER) \ |
| 1606 | @ %d(MANIFEST_NUMERIC_DATE) %d(MANIFEST_NUMERIC_TIME) |
| 1607 | } |
| 1608 | } |
| 1609 | |
| 1610 | /* pragma uv-hash HASH |
| 1611 | ** |
| 1612 | ** The client wants to make sure that unversioned files are all synced. |
| 1613 | ** If the HASH does not match, send a complete catalog of |
| @@ -1626,11 +1626,11 @@ | |
| 1626 | @ pragma uv-pull-only |
| 1627 | } |
| 1628 | send_unversioned_catalog(&xfer); |
| 1629 | } |
| 1630 | uvCatalogSent = 1; |
| 1631 | } |
| 1632 | |
| 1633 | /* pragma ci-lock CHECKIN-HASH CLIENT-ID |
| 1634 | ** |
| 1635 | ** The client wants to make non-branch commit against the check-in |
| 1636 | ** identified by CHECKIN-HASH. The server will remember this and |
| @@ -1686,11 +1686,11 @@ | |
| 1686 | db_protect_pop(); |
| 1687 | } |
| 1688 | if( db_get_boolean("forbid-delta-manifests",0) ){ |
| 1689 | @ pragma avoid-delta-manifests |
| 1690 | } |
| 1691 | } |
| 1692 | |
| 1693 | /* pragma ci-unlock CLIENT-ID |
| 1694 | ** |
| 1695 | ** Remove any locks previously held by CLIENT-ID. Clients send this |
| 1696 | ** pragma with their own ID whenever they know that they no longer |
| @@ -1706,34 +1706,12 @@ | |
| 1706 | " WHERE name GLOB 'ci-lock-*'" |
| 1707 | " AND json_extract(value,'$.clientid')=%Q", |
| 1708 | blob_str(&xfer.aToken[2]) |
| 1709 | ); |
| 1710 | db_protect_pop(); |
| 1711 | } |
| 1712 | |
| 1713 | }else |
| 1714 | |
| 1715 | /* Unknown message |
| 1716 | */ |
| 1717 | { |
| @@ -2132,20 +2110,10 @@ | |
| 2110 | zCkinLock = 0; |
| 2111 | }else if( zClientId ){ |
| 2112 | blob_appendf(&send, "pragma ci-unlock %s\n", zClientId); |
| 2113 | } |
| 2114 | |
| 2115 | /* Append randomness to the end of the uplink message. This makes all |
| 2116 | ** messages unique so that that the login-card nonce will always |
| 2117 | ** be unique. |
| 2118 | */ |
| 2119 | zRandomness = db_text(0, "SELECT hex(randomblob(20))"); |
| 2120 |