Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Disable the check of the "server-code" on a sync. This means that two repositories with the same "server-code" can sync with each other, which allows a repository to be copied using an ordinary file copy, and without having to run clone. |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
469efd6a7ce8ba441b7c7a558f15e3f7 |
| User & Date: | drh 2009-10-01 14:47:54.000 |
References
|
2015-03-30
| ||
| 09:24 | Remove another check for "server loop", apart from [469efd6a7ce8ba44]: If the server-code is going to be removed ever in the future, this useless check will stand in the way. Then [14b8475598268f3a] could re-appear, but now with "server-code" in stead of with "project-code". check-in: a0cd8d35ee user: jan.nijtmans tags: trunk | |
Context
|
2009-10-01
| ||
| 14:54 | Add a missing $baseurl to the default header. check-in: 631c52bc96 user: drh tags: trunk | |
| 14:47 | Disable the check of the "server-code" on a sync. This means that two repositories with the same "server-code" can sync with each other, which allows a repository to be copied using an ordinary file copy, and without having to run clone. check-in: 469efd6a7c user: drh tags: trunk | |
|
2009-09-30
| ||
| 23:24 | Promote the "sha1sum" command to a first-class fully documented command. check-in: c83c1110f6 user: drh tags: trunk | |
Changes
Changes to src/xfer.c.
| ︙ | ︙ | |||
656 657 658 659 660 661 662 |
** does not match.
*/
if( xfer.nToken==3
&& (blob_eq(&xfer.aToken[0], "pull") || blob_eq(&xfer.aToken[0], "push"))
&& blob_is_uuid(&xfer.aToken[1])
&& blob_is_uuid(&xfer.aToken[2])
){
| < > > > > > > > > > > > | 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 |
** does not match.
*/
if( xfer.nToken==3
&& (blob_eq(&xfer.aToken[0], "pull") || blob_eq(&xfer.aToken[0], "push"))
&& blob_is_uuid(&xfer.aToken[1])
&& blob_is_uuid(&xfer.aToken[2])
){
const char *zPCode;
#if 0
/* This block checks to see if a server is trying to sync with itself.
** This used to be disallowed, but I cannot think of any significant
** harm, so I have disabled the check.
**
** With this check disabled, it is sufficient to copy the repository
** database. No need to run clone.
*/
const char *zSCode;
zSCode = db_get("server-code", 0);
if( zSCode==0 ){
fossil_panic("missing server code");
}
if( blob_eq_str(&xfer.aToken[1], zSCode, -1) ){
cgi_reset_content();
@ error server\sloop
nErr++;
break;
}
#endif
zPCode = db_get("project-code", 0);
if( zPCode==0 ){
fossil_panic("missing project code");
}
if( !blob_eq_str(&xfer.aToken[2], zPCode, -1) ){
cgi_reset_content();
@ error wrong\sproject
|
| ︙ | ︙ |