Fossil SCM
Only show the "pull only - not authorized to push" message once when syncing with a repo for which there is read-only permission.
Commit
6cc262207d0d8a10b2bb078d2f8b918c4e927898
Parent
141b990722ea81e…
1 file changed
+5
-1
+5
-1
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -1655,11 +1655,15 @@ | ||
| 1655 | 1655 | ** to the next cycle. |
| 1656 | 1656 | */ |
| 1657 | 1657 | if( blob_eq(&xfer.aToken[0],"message") && xfer.nToken==2 ){ |
| 1658 | 1658 | char *zMsg = blob_terminate(&xfer.aToken[1]); |
| 1659 | 1659 | defossilize(zMsg); |
| 1660 | - if( zMsg ) fossil_print("\rServer says: %s\n", zMsg); | |
| 1660 | + if( pushFlag && zMsg && strglob("pull only *", zMsg) ){ | |
| 1661 | + pushFlag = 0; | |
| 1662 | + zMsg = 0; | |
| 1663 | + } | |
| 1664 | + fossil_print("\rServer says: %s\n", zMsg); | |
| 1661 | 1665 | }else |
| 1662 | 1666 | |
| 1663 | 1667 | /* pragma NAME VALUE... |
| 1664 | 1668 | ** |
| 1665 | 1669 | ** The server can send pragmas to try to convey meta-information to |
| 1666 | 1670 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1655,11 +1655,15 @@ | |
| 1655 | ** to the next cycle. |
| 1656 | */ |
| 1657 | if( blob_eq(&xfer.aToken[0],"message") && xfer.nToken==2 ){ |
| 1658 | char *zMsg = blob_terminate(&xfer.aToken[1]); |
| 1659 | defossilize(zMsg); |
| 1660 | if( zMsg ) fossil_print("\rServer says: %s\n", zMsg); |
| 1661 | }else |
| 1662 | |
| 1663 | /* pragma NAME VALUE... |
| 1664 | ** |
| 1665 | ** The server can send pragmas to try to convey meta-information to |
| 1666 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1655,11 +1655,15 @@ | |
| 1655 | ** to the next cycle. |
| 1656 | */ |
| 1657 | if( blob_eq(&xfer.aToken[0],"message") && xfer.nToken==2 ){ |
| 1658 | char *zMsg = blob_terminate(&xfer.aToken[1]); |
| 1659 | defossilize(zMsg); |
| 1660 | if( pushFlag && zMsg && strglob("pull only *", zMsg) ){ |
| 1661 | pushFlag = 0; |
| 1662 | zMsg = 0; |
| 1663 | } |
| 1664 | fossil_print("\rServer says: %s\n", zMsg); |
| 1665 | }else |
| 1666 | |
| 1667 | /* pragma NAME VALUE... |
| 1668 | ** |
| 1669 | ** The server can send pragmas to try to convey meta-information to |
| 1670 |