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.
Commit
f9a200f01b39854c6bc0790e4cda89583351a16c
Parent
e255caa2c71a3b3…
4 files changed
+8
+6
-3
+12
-1
+3
-3
+8
| --- src/add.c | ||
| +++ src/add.c | ||
| @@ -44,10 +44,18 @@ | ||
| 44 | 44 | static const char *azName[] = { |
| 45 | 45 | "_FOSSIL_", |
| 46 | 46 | "_FOSSIL_-journal", |
| 47 | 47 | "_FOSSIL_-wal", |
| 48 | 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 */ | |
| 49 | 57 | ".fos", |
| 50 | 58 | ".fos-journal", |
| 51 | 59 | ".fos-wal", |
| 52 | 60 | ".fos-shm", |
| 53 | 61 | }; |
| 54 | 62 |
| --- 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 |
M
src/db.c
+6
-3
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -821,12 +821,15 @@ | ||
| 821 | 821 | return 1; |
| 822 | 822 | } |
| 823 | 823 | |
| 824 | 824 | /* |
| 825 | 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" | |
| 826 | +** directory is found by searching for a file named "_FOSSIL_" or ".fslckout" | |
| 827 | 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. | |
| 828 | 831 | ** |
| 829 | 832 | ** If no valid _FOSSIL_ or .fos file is found, we move up one level and |
| 830 | 833 | ** try again. Once the file is found, the g.zLocalRoot variable is set |
| 831 | 834 | ** to the root of the repository tree and this routine returns 1. If |
| 832 | 835 | ** no database is found, then this routine return 0. |
| @@ -836,11 +839,11 @@ | ||
| 836 | 839 | ** is found, it is attached to the open database connection too. |
| 837 | 840 | */ |
| 838 | 841 | int db_open_local(void){ |
| 839 | 842 | int i, n; |
| 840 | 843 | char zPwd[2000]; |
| 841 | - static const char *aDbName[] = { "/_FOSSIL_", "/.fos" }; | |
| 844 | + static const char *aDbName[] = { "/_FOSSIL_", "/.fslckout", "/.fos" }; | |
| 842 | 845 | |
| 843 | 846 | if( g.localOpen) return 1; |
| 844 | 847 | file_getcwd(zPwd, sizeof(zPwd)-20); |
| 845 | 848 | n = strlen(zPwd); |
| 846 | 849 | if( n==1 && zPwd[0]=='/' ) zPwd[0] = '.'; |
| @@ -872,11 +875,11 @@ | ||
| 872 | 875 | return 0; |
| 873 | 876 | } |
| 874 | 877 | |
| 875 | 878 | /* |
| 876 | 879 | ** 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 | |
| 878 | 881 | ** been opened before this routine is called. |
| 879 | 882 | */ |
| 880 | 883 | const char *db_repository_filename(void){ |
| 881 | 884 | static char *zRepo = 0; |
| 882 | 885 | assert( g.localOpen ); |
| 883 | 886 |
| --- 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 @@ | ||
| 335 | 335 | } |
| 336 | 336 | |
| 337 | 337 | /* |
| 338 | 338 | ** Check to see if the directory named in zPath is the top of a checkout. |
| 339 | 339 | ** 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. | |
| 341 | 341 | */ |
| 342 | 342 | int vfile_top_of_checkout(const char *zPath){ |
| 343 | 343 | char *zFile; |
| 344 | 344 | int fileFound = 0; |
| 345 | 345 | |
| 346 | 346 | zFile = mprintf("%s/_FOSSIL_", zPath); |
| 347 | 347 | fileFound = file_size(zFile)>=1024; |
| 348 | 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 | + */ | |
| 349 | 360 | if( !fileFound ){ |
| 350 | 361 | zFile = mprintf("%s/.fos", zPath); |
| 351 | 362 | fileFound = file_size(zFile)>=1024; |
| 352 | 363 | fossil_free(zFile); |
| 353 | 364 | } |
| 354 | 365 |
| --- 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 |
+3
-3
| --- www/tech_overview.wiki | ||
| +++ www/tech_overview.wiki | ||
| @@ -287,13 +287,13 @@ | ||
| 287 | 287 | |
| 288 | 288 | Unlike several other popular DVCSes, Fossil allows a single repository |
| 289 | 289 | to have multiple working checkouts. Each working checkout has a single |
| 290 | 290 | database in its root directory that records the state of that checkout. |
| 291 | 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: | |
| 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 | 295 | |
| 296 | 296 | * The full pathname of the repository database file. |
| 297 | 297 | * The version that is currently checked out. |
| 298 | 298 | * Files that have been [/help/add | added], |
| 299 | 299 | [/help/rm | removed], or [/help/mv | renamed] but not |
| 300 | 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 ".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 |