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].
Commit
6e04d9cbd4ae24db2f263db6956904deceaafb2a2c1230b124d271177479c173
Parent
1b71969475373d0…
1 file changed
+5
-2
M
src/db.c
+5
-2
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -4209,12 +4209,15 @@ | ||
| 4209 | 4209 | zNewBase = url_to_repo_basename(zUri); |
| 4210 | 4210 | if( zNewBase==0 ){ |
| 4211 | 4211 | fossil_fatal("unable to deduce a repository name from the url \"%s\"", |
| 4212 | 4212 | zUri); |
| 4213 | 4213 | } |
| 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 | + } | |
| 4216 | 4219 | fossil_free(zNewBase); |
| 4217 | 4220 | blob_init(&cmd, 0, 0); |
| 4218 | 4221 | blob_append_escaped_arg(&cmd, g.nameOfExe, 1); |
| 4219 | 4222 | blob_append(&cmd, " clone", -1); |
| 4220 | 4223 | if(0!=bVerbose){ |
| 4221 | 4224 |
| --- 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 |