Fossil SCM

When doing a "fossil open URL" such that the repository is first cloned and then opened, leaving the repository as a file in the check-out, make sure the repository pathname in VVAR is relative, so that the entire check-out can be moved without breaking the link to the repository. See [forum:/forumpost/f2f5ff2e35031612|forum thread f2f5ff2e35031612].

drh 2024-07-26 10:49 trunk
Commit 6e04d9cbd4ae24db2f263db6956904deceaafb2a2c1230b124d271177479c173
1 file changed +5 -2
+5 -2
--- src/db.c
+++ src/db.c
@@ -4209,12 +4209,15 @@
42094209
zNewBase = url_to_repo_basename(zUri);
42104210
if( zNewBase==0 ){
42114211
fossil_fatal("unable to deduce a repository name from the url \"%s\"",
42124212
zUri);
42134213
}
4214
- if( zRepoDir==0 ) zRepoDir = zPwd;
4215
- zRepo = mprintf("%s/%s.fossil", zRepoDir, zNewBase);
4214
+ if( zRepoDir==0 ){
4215
+ zRepo = mprintf("%s.fossil", zNewBase);
4216
+ }else{
4217
+ zRepo = mprintf("%s/%s.fossil", zRepoDir, zNewBase);
4218
+ }
42164219
fossil_free(zNewBase);
42174220
blob_init(&cmd, 0, 0);
42184221
blob_append_escaped_arg(&cmd, g.nameOfExe, 1);
42194222
blob_append(&cmd, " clone", -1);
42204223
if(0!=bVerbose){
42214224
--- src/db.c
+++ src/db.c
@@ -4209,12 +4209,15 @@
4209 zNewBase = url_to_repo_basename(zUri);
4210 if( zNewBase==0 ){
4211 fossil_fatal("unable to deduce a repository name from the url \"%s\"",
4212 zUri);
4213 }
4214 if( zRepoDir==0 ) zRepoDir = zPwd;
4215 zRepo = mprintf("%s/%s.fossil", zRepoDir, zNewBase);
 
 
 
4216 fossil_free(zNewBase);
4217 blob_init(&cmd, 0, 0);
4218 blob_append_escaped_arg(&cmd, g.nameOfExe, 1);
4219 blob_append(&cmd, " clone", -1);
4220 if(0!=bVerbose){
4221
--- src/db.c
+++ src/db.c
@@ -4209,12 +4209,15 @@
4209 zNewBase = url_to_repo_basename(zUri);
4210 if( zNewBase==0 ){
4211 fossil_fatal("unable to deduce a repository name from the url \"%s\"",
4212 zUri);
4213 }
4214 if( zRepoDir==0 ){
4215 zRepo = mprintf("%s.fossil", zNewBase);
4216 }else{
4217 zRepo = mprintf("%s/%s.fossil", zRepoDir, zNewBase);
4218 }
4219 fossil_free(zNewBase);
4220 blob_init(&cmd, 0, 0);
4221 blob_append_escaped_arg(&cmd, g.nameOfExe, 1);
4222 blob_append(&cmd, " clone", -1);
4223 if(0!=bVerbose){
4224

Keyboard Shortcuts

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