Fossil SCM

Change the alternative name of the _FOSSIL_ checkout database to ".fslckout" since the prior alternative name is offensive in some locales. The prior name is still supported for backwards compatibility, but is now deprecated and undocumented and will eventually disappear completely.

drh 2012-02-04 14:44 trunk
Commit f9a200f01b39854c6bc0790e4cda89583351a16c
+8
--- src/add.c
+++ src/add.c
@@ -44,10 +44,18 @@
4444
static const char *azName[] = {
4545
"_FOSSIL_",
4646
"_FOSSIL_-journal",
4747
"_FOSSIL_-wal",
4848
"_FOSSIL_-shm",
49
+ ".fslckout",
50
+ ".fslckout-journal",
51
+ ".fslckout-wal",
52
+ ".fslckout-shm",
53
+
54
+ /* The use of ".fos" as the name of the checkout database is
55
+ ** deprecated. Use ".fslckout" instead. At some point, the following
56
+ ** entries should be removed. 2012-02-04 */
4957
".fos",
5058
".fos-journal",
5159
".fos-wal",
5260
".fos-shm",
5361
};
5462
--- src/add.c
+++ src/add.c
@@ -44,10 +44,18 @@
44 static const char *azName[] = {
45 "_FOSSIL_",
46 "_FOSSIL_-journal",
47 "_FOSSIL_-wal",
48 "_FOSSIL_-shm",
 
 
 
 
 
 
 
 
49 ".fos",
50 ".fos-journal",
51 ".fos-wal",
52 ".fos-shm",
53 };
54
--- src/add.c
+++ src/add.c
@@ -44,10 +44,18 @@
44 static const char *azName[] = {
45 "_FOSSIL_",
46 "_FOSSIL_-journal",
47 "_FOSSIL_-wal",
48 "_FOSSIL_-shm",
49 ".fslckout",
50 ".fslckout-journal",
51 ".fslckout-wal",
52 ".fslckout-shm",
53
54 /* The use of ".fos" as the name of the checkout database is
55 ** deprecated. Use ".fslckout" instead. At some point, the following
56 ** entries should be removed. 2012-02-04 */
57 ".fos",
58 ".fos-journal",
59 ".fos-wal",
60 ".fos-shm",
61 };
62
+6 -3
--- src/db.c
+++ src/db.c
@@ -821,12 +821,15 @@
821821
return 1;
822822
}
823823
824824
/*
825825
** Locate the root directory of the local repository tree. The root
826
-** directory is found by searching for a file named "_FOSSIL_" or ".fos"
826
+** directory is found by searching for a file named "_FOSSIL_" or ".fslckout"
827827
** that contains a valid repository database.
828
+**
829
+** For legacy, also look for ".fos". The use of ".fos" is deprecated
830
+** since "fos" has negative connotations in Hungarian, we are told.
828831
**
829832
** If no valid _FOSSIL_ or .fos file is found, we move up one level and
830833
** try again. Once the file is found, the g.zLocalRoot variable is set
831834
** to the root of the repository tree and this routine returns 1. If
832835
** no database is found, then this routine return 0.
@@ -836,11 +839,11 @@
836839
** is found, it is attached to the open database connection too.
837840
*/
838841
int db_open_local(void){
839842
int i, n;
840843
char zPwd[2000];
841
- static const char *aDbName[] = { "/_FOSSIL_", "/.fos" };
844
+ static const char *aDbName[] = { "/_FOSSIL_", "/.fslckout", "/.fos" };
842845
843846
if( g.localOpen) return 1;
844847
file_getcwd(zPwd, sizeof(zPwd)-20);
845848
n = strlen(zPwd);
846849
if( n==1 && zPwd[0]=='/' ) zPwd[0] = '.';
@@ -872,11 +875,11 @@
872875
return 0;
873876
}
874877
875878
/*
876879
** Get the full pathname to the repository database file. The
877
-** local database (the _FOSSIL_ or .fos database) must have already
880
+** local database (the _FOSSIL_ or .fslckout database) must have already
878881
** been opened before this routine is called.
879882
*/
880883
const char *db_repository_filename(void){
881884
static char *zRepo = 0;
882885
assert( g.localOpen );
883886
--- src/db.c
+++ src/db.c
@@ -821,12 +821,15 @@
821 return 1;
822 }
823
824 /*
825 ** Locate the root directory of the local repository tree. The root
826 ** directory is found by searching for a file named "_FOSSIL_" or ".fos"
827 ** that contains a valid repository database.
 
 
 
828 **
829 ** If no valid _FOSSIL_ or .fos file is found, we move up one level and
830 ** try again. Once the file is found, the g.zLocalRoot variable is set
831 ** to the root of the repository tree and this routine returns 1. If
832 ** no database is found, then this routine return 0.
@@ -836,11 +839,11 @@
836 ** is found, it is attached to the open database connection too.
837 */
838 int db_open_local(void){
839 int i, n;
840 char zPwd[2000];
841 static const char *aDbName[] = { "/_FOSSIL_", "/.fos" };
842
843 if( g.localOpen) return 1;
844 file_getcwd(zPwd, sizeof(zPwd)-20);
845 n = strlen(zPwd);
846 if( n==1 && zPwd[0]=='/' ) zPwd[0] = '.';
@@ -872,11 +875,11 @@
872 return 0;
873 }
874
875 /*
876 ** Get the full pathname to the repository database file. The
877 ** local database (the _FOSSIL_ or .fos database) must have already
878 ** been opened before this routine is called.
879 */
880 const char *db_repository_filename(void){
881 static char *zRepo = 0;
882 assert( g.localOpen );
883
--- src/db.c
+++ src/db.c
@@ -821,12 +821,15 @@
821 return 1;
822 }
823
824 /*
825 ** Locate the root directory of the local repository tree. The root
826 ** directory is found by searching for a file named "_FOSSIL_" or ".fslckout"
827 ** that contains a valid repository database.
828 **
829 ** For legacy, also look for ".fos". The use of ".fos" is deprecated
830 ** since "fos" has negative connotations in Hungarian, we are told.
831 **
832 ** If no valid _FOSSIL_ or .fos file is found, we move up one level and
833 ** try again. Once the file is found, the g.zLocalRoot variable is set
834 ** to the root of the repository tree and this routine returns 1. If
835 ** no database is found, then this routine return 0.
@@ -836,11 +839,11 @@
839 ** is found, it is attached to the open database connection too.
840 */
841 int db_open_local(void){
842 int i, n;
843 char zPwd[2000];
844 static const char *aDbName[] = { "/_FOSSIL_", "/.fslckout", "/.fos" };
845
846 if( g.localOpen) return 1;
847 file_getcwd(zPwd, sizeof(zPwd)-20);
848 n = strlen(zPwd);
849 if( n==1 && zPwd[0]=='/' ) zPwd[0] = '.';
@@ -872,11 +875,11 @@
875 return 0;
876 }
877
878 /*
879 ** Get the full pathname to the repository database file. The
880 ** local database (the _FOSSIL_ or .fslckout database) must have already
881 ** been opened before this routine is called.
882 */
883 const char *db_repository_filename(void){
884 static char *zRepo = 0;
885 assert( g.localOpen );
886
+12 -1
--- src/vfile.c
+++ src/vfile.c
@@ -335,19 +335,30 @@
335335
}
336336
337337
/*
338338
** Check to see if the directory named in zPath is the top of a checkout.
339339
** In other words, check to see if directory pPath contains a file named
340
-** "_FOSSIL_" or ".fos". Return true or false.
340
+** "_FOSSIL_" or ".fslckout". Return true or false.
341341
*/
342342
int vfile_top_of_checkout(const char *zPath){
343343
char *zFile;
344344
int fileFound = 0;
345345
346346
zFile = mprintf("%s/_FOSSIL_", zPath);
347347
fileFound = file_size(zFile)>=1024;
348348
fossil_free(zFile);
349
+ if( !fileFound ){
350
+ zFile = mprintf("%s/.fslckout", zPath);
351
+ fileFound = file_size(zFile)>=1024;
352
+ fossil_free(zFile);
353
+ }
354
+
355
+ /* Check for ".fos" for legacy support. But the use of ".fos" as the
356
+ ** per-checkout database name is deprecated. At some point, all support
357
+ ** for ".fos" will end and this code should be removed. This comment
358
+ ** added on 2012-02-04.
359
+ */
349360
if( !fileFound ){
350361
zFile = mprintf("%s/.fos", zPath);
351362
fileFound = file_size(zFile)>=1024;
352363
fossil_free(zFile);
353364
}
354365
--- src/vfile.c
+++ src/vfile.c
@@ -335,19 +335,30 @@
335 }
336
337 /*
338 ** Check to see if the directory named in zPath is the top of a checkout.
339 ** In other words, check to see if directory pPath contains a file named
340 ** "_FOSSIL_" or ".fos". Return true or false.
341 */
342 int vfile_top_of_checkout(const char *zPath){
343 char *zFile;
344 int fileFound = 0;
345
346 zFile = mprintf("%s/_FOSSIL_", zPath);
347 fileFound = file_size(zFile)>=1024;
348 fossil_free(zFile);
 
 
 
 
 
 
 
 
 
 
 
349 if( !fileFound ){
350 zFile = mprintf("%s/.fos", zPath);
351 fileFound = file_size(zFile)>=1024;
352 fossil_free(zFile);
353 }
354
--- src/vfile.c
+++ src/vfile.c
@@ -335,19 +335,30 @@
335 }
336
337 /*
338 ** Check to see if the directory named in zPath is the top of a checkout.
339 ** In other words, check to see if directory pPath contains a file named
340 ** "_FOSSIL_" or ".fslckout". Return true or false.
341 */
342 int vfile_top_of_checkout(const char *zPath){
343 char *zFile;
344 int fileFound = 0;
345
346 zFile = mprintf("%s/_FOSSIL_", zPath);
347 fileFound = file_size(zFile)>=1024;
348 fossil_free(zFile);
349 if( !fileFound ){
350 zFile = mprintf("%s/.fslckout", zPath);
351 fileFound = file_size(zFile)>=1024;
352 fossil_free(zFile);
353 }
354
355 /* Check for ".fos" for legacy support. But the use of ".fos" as the
356 ** per-checkout database name is deprecated. At some point, all support
357 ** for ".fos" will end and this code should be removed. This comment
358 ** added on 2012-02-04.
359 */
360 if( !fileFound ){
361 zFile = mprintf("%s/.fos", zPath);
362 fileFound = file_size(zFile)>=1024;
363 fossil_free(zFile);
364 }
365
--- www/tech_overview.wiki
+++ www/tech_overview.wiki
@@ -287,13 +287,13 @@
287287
288288
Unlike several other popular DVCSes, Fossil allows a single repository
289289
to have multiple working checkouts. Each working checkout has a single
290290
database in its root directory that records the state of that checkout.
291291
The checkout database is named "_FOSSIL_" by default, but can be renamed
292
-to ".fos" if desired. (Future versions of Fossil might make ".fos" the
293
-default name.) The checkout database records information such as the
294
-following:
292
+to ".fslckout" if desired. (Future versions of Fossil might make
293
+".fslckout" the default name.) The checkout database records information
294
+such as the following:
295295
296296
* The full pathname of the repository database file.
297297
* The version that is currently checked out.
298298
* Files that have been [/help/add | added],
299299
[/help/rm | removed], or [/help/mv | renamed] but not
300300
--- www/tech_overview.wiki
+++ www/tech_overview.wiki
@@ -287,13 +287,13 @@
287
288 Unlike several other popular DVCSes, Fossil allows a single repository
289 to have multiple working checkouts. Each working checkout has a single
290 database in its root directory that records the state of that checkout.
291 The checkout database is named "_FOSSIL_" by default, but can be renamed
292 to ".fos" if desired. (Future versions of Fossil might make ".fos" the
293 default name.) The checkout database records information such as the
294 following:
295
296 * The full pathname of the repository database file.
297 * The version that is currently checked out.
298 * Files that have been [/help/add | added],
299 [/help/rm | removed], or [/help/mv | renamed] but not
300
--- www/tech_overview.wiki
+++ www/tech_overview.wiki
@@ -287,13 +287,13 @@
287
288 Unlike several other popular DVCSes, Fossil allows a single repository
289 to have multiple working checkouts. Each working checkout has a single
290 database in its root directory that records the state of that checkout.
291 The checkout database is named "_FOSSIL_" by default, but can be renamed
292 to ".fslckout" if desired. (Future versions of Fossil might make
293 ".fslckout" the default name.) The checkout database records information
294 such as the following:
295
296 * The full pathname of the repository database file.
297 * The version that is currently checked out.
298 * Files that have been [/help/add | added],
299 [/help/rm | removed], or [/help/mv | renamed] but not
300

Keyboard Shortcuts

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