Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Implicitly set "fossil open --nosync" when the autosync setting is off, either globally or on the just-opened repo. This is on a branch because I don't know whether the dance involving global versus repo settings is overly complicated or *just complicated enough*. The current formulation seems both necessary and sufficient in my local testing here, but I'm hoping there's a shorter formulation that does the same thing. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | fossil-open-noautosync |
| Files: | files | file ages | folders |
| SHA3-256: |
9f42fc44c6719f099d8f422a384e99ff |
| User & Date: | wyoung 2022-04-15 11:34:27.296 |
Context
|
2022-04-15
| ||
| 11:34 | Implicitly set "fossil open --nosync" when the autosync setting is off, either globally or on the just-opened repo. This is on a branch because I don't know whether the dance involving global versus repo settings is overly complicated or *just complicated enough*. The current formulation seems both necessary and sufficient in my local testing here, but I'm hoping there's a shorter formulation that does the same thing. Closed-Leaf check-in: 9f42fc44c6 user: wyoung tags: fossil-open-noautosync | |
|
2022-04-13
| ||
| 16:27 | On the /info view for a checkin which has a branch/branch-name wiki page, correct the Edit Wiki link to use /wikiedit instead of /wiki if permissions allow, otherwise the /wiki page's automatic redirection of branch/branch-name wiki pages to the timeline makes it impossible to get to the editor for a branch-specific wiki page. check-in: 82510672b8 user: stephan tags: trunk | |
Changes
Changes to src/db.c.
| ︙ | ︙ | |||
3622 3623 3624 3625 3626 3627 3628 | ** with the local repository. If you commit this checkout, ** it will become a new "initial" commit in the repository. ** -f|--force Continue with the open even if the working directory is ** not empty. ** --force-missing Force opening a repository with missing content ** -k|--keep Only modify the manifest and manifest.uuid files ** --nested Allow opening a repository inside an opened checkout | | > | 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 | ** with the local repository. If you commit this checkout, ** it will become a new "initial" commit in the repository. ** -f|--force Continue with the open even if the working directory is ** not empty. ** --force-missing Force opening a repository with missing content ** -k|--keep Only modify the manifest and manifest.uuid files ** --nested Allow opening a repository inside an opened checkout ** --nosync If autosync is on or set to pullonly, skip that step ** prior to opening the repository ** --repodir DIR If REPOSITORY is a URI that will be cloned, store ** the clone in DIR rather than in "." ** --setmtime Set timestamps of all files to match their SCM-side ** times (the timestamp of the last checkin which modified ** them). ** --verbose If passed a URI then this flag is passed on to the clone ** operation, otherwise it has no effect. |
| ︙ | ︙ | |||
3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 |
const char *zRepo = 0; /* Name of the repository file */
const char *zRepoDir = 0; /* --repodir value */
char *zPwd; /* Initial working directory */
int isUri = 0; /* True if REPOSITORY is a URI */
int nLocal; /* Number of preexisting files in cwd */
int bNosync = 0; /* --nosync. Omit auto-sync */
int bVerbose = 0; /* --verbose option for clone */
url_proxy_options();
emptyFlag = find_option("empty",0,0)!=0;
keepFlag = find_option("keep","k",0)!=0;
forceMissingFlag = find_option("force-missing",0,0)!=0;
allowNested = find_option("nested",0,0)!=0;
setmtimeFlag = find_option("setmtime",0,0)!=0;
| > | 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 |
const char *zRepo = 0; /* Name of the repository file */
const char *zRepoDir = 0; /* --repodir value */
char *zPwd; /* Initial working directory */
int isUri = 0; /* True if REPOSITORY is a URI */
int nLocal; /* Number of preexisting files in cwd */
int bNosync = 0; /* --nosync. Omit auto-sync */
int bVerbose = 0; /* --verbose option for clone */
const char *zGAutosync; /* global (pre-open) autosync setting */
url_proxy_options();
emptyFlag = find_option("empty",0,0)!=0;
keepFlag = find_option("keep","k",0)!=0;
forceMissingFlag = find_option("force-missing",0,0)!=0;
allowNested = find_option("nested",0,0)!=0;
setmtimeFlag = find_option("setmtime",0,0)!=0;
|
| ︙ | ︙ | |||
3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 |
if( zWorkDir ) file_chdir(zWorkDir, 0);
}else if( zRepoDir ){
fossil_fatal("the --repodir option only makes sense if the REPOSITORY "
"argument is a URI that begins with http:, https:, ssh:, "
"or file:");
}
db_open_repository(zRepo);
/* Figure out which revision to open. */
if( !emptyFlag ){
if( g.argc==4 ){
g.zOpenRevision = g.argv[3];
}else if( db_exists("SELECT 1 FROM event WHERE type='ci'") ){
g.zOpenRevision = db_get("main-branch", 0);
}
if( !bNosync
&& autosync_loop(SYNC_PULL, db_get_int("autosync-tries", 1), 1)
&& !bForce
){
fossil_fatal("unable to auto-sync the repository");
}
}
| > > > > | 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 |
if( zWorkDir ) file_chdir(zWorkDir, 0);
}else if( zRepoDir ){
fossil_fatal("the --repodir option only makes sense if the REPOSITORY "
"argument is a URI that begins with http:, https:, ssh:, "
"or file:");
}
db_open_config(0, 0);
zGAutosync = db_get("autosync", 0);
db_open_repository(zRepo);
/* Figure out which revision to open. */
if( !emptyFlag ){
const char *zAutosync = db_get("autosync", zGAutosync);
if( g.argc==4 ){
g.zOpenRevision = g.argv[3];
}else if( db_exists("SELECT 1 FROM event WHERE type='ci'") ){
g.zOpenRevision = db_get("main-branch", 0);
}
if( !bNosync
&& (!zAutosync || !is_false(zAutosync))
&& autosync_loop(SYNC_PULL, db_get_int("autosync-tries", 1), 1)
&& !bForce
){
fossil_fatal("unable to auto-sync the repository");
}
}
|
| ︙ | ︙ |