Fossil SCM

Remove traces. Waiting approval to merge on trunk..

mgagnon 2014-01-08 04:59 UTC checkout_on_root_fix
Commit 84abd455338f32e7bf68f72f3d5298465247da80
1 file changed -10
-10
--- src/db.c
+++ src/db.c
@@ -934,22 +934,18 @@
934934
**
935935
** This routine always opens the user database regardless of whether or
936936
** not the repository database is found. If the _FOSSIL_ or .fslckout file
937937
** is found, it is attached to the open database connection too.
938938
*/
939
-/* #define DBG_CHECKOUT_ON_ROOT_FIX 1 */
940939
int db_open_local(const char *zDbName){
941940
int i, n;
942941
char zPwd[2000];
943942
static const char aDbName[][10] = { "_FOSSIL_", ".fslckout", ".fos" };
944943
945944
if( g.localOpen) return 1;
946945
file_getcwd(zPwd, sizeof(zPwd)-20);
947946
n = strlen(zPwd);
948
-#ifdef DBG_CHECKOUT_ON_ROOT_FIX
949
- fossil_trace("---> DEBUG: zPwd: %s, n: %d\n", zPwd, n);
950
-#endif
951947
while( n>0 ){
952948
for(i=0; i<count(aDbName); i++){
953949
sqlite3_snprintf(sizeof(zPwd)-n, &zPwd[n], "/%s", aDbName[i]);
954950
if( isValidLocalDb(zPwd) ){
955951
/* Found a valid checkout database file */
@@ -957,13 +953,10 @@
957953
while( n>0 && zPwd[n-1]=='/' ){
958954
n--;
959955
zPwd[n] = 0;
960956
}
961957
g.zLocalRoot = mprintf("%s/", zPwd);
962
-#ifdef DBG_CHECKOUT_ON_ROOT_FIX
963
- fossil_trace("---> DEBUG: g.zLocalRoot: %s\n", g.zLocalRoot);
964
-#endif
965958
g.localOpen = 1;
966959
db_open_config(0);
967960
db_open_repository(zDbName);
968961
return 1;
969962
}
@@ -970,13 +963,10 @@
970963
}
971964
n--;
972965
while( n>1 && zPwd[n]!='/' ){ n--; }
973966
while( n>1 && zPwd[n-1]=='/' ){ n--; }
974967
zPwd[n] = 0;
975
-#ifdef DBG_CHECKOUT_ON_ROOT_FIX
976
- fossil_trace("---> DEBUG: next zPwd: %s, n: %d\n", zPwd, n);
977
-#endif
978968
}
979969
980970
/* A checkout database file could not be found */
981971
return 0;
982972
}
983973
--- src/db.c
+++ src/db.c
@@ -934,22 +934,18 @@
934 **
935 ** This routine always opens the user database regardless of whether or
936 ** not the repository database is found. If the _FOSSIL_ or .fslckout file
937 ** is found, it is attached to the open database connection too.
938 */
939 /* #define DBG_CHECKOUT_ON_ROOT_FIX 1 */
940 int db_open_local(const char *zDbName){
941 int i, n;
942 char zPwd[2000];
943 static const char aDbName[][10] = { "_FOSSIL_", ".fslckout", ".fos" };
944
945 if( g.localOpen) return 1;
946 file_getcwd(zPwd, sizeof(zPwd)-20);
947 n = strlen(zPwd);
948 #ifdef DBG_CHECKOUT_ON_ROOT_FIX
949 fossil_trace("---> DEBUG: zPwd: %s, n: %d\n", zPwd, n);
950 #endif
951 while( n>0 ){
952 for(i=0; i<count(aDbName); i++){
953 sqlite3_snprintf(sizeof(zPwd)-n, &zPwd[n], "/%s", aDbName[i]);
954 if( isValidLocalDb(zPwd) ){
955 /* Found a valid checkout database file */
@@ -957,13 +953,10 @@
957 while( n>0 && zPwd[n-1]=='/' ){
958 n--;
959 zPwd[n] = 0;
960 }
961 g.zLocalRoot = mprintf("%s/", zPwd);
962 #ifdef DBG_CHECKOUT_ON_ROOT_FIX
963 fossil_trace("---> DEBUG: g.zLocalRoot: %s\n", g.zLocalRoot);
964 #endif
965 g.localOpen = 1;
966 db_open_config(0);
967 db_open_repository(zDbName);
968 return 1;
969 }
@@ -970,13 +963,10 @@
970 }
971 n--;
972 while( n>1 && zPwd[n]!='/' ){ n--; }
973 while( n>1 && zPwd[n-1]=='/' ){ n--; }
974 zPwd[n] = 0;
975 #ifdef DBG_CHECKOUT_ON_ROOT_FIX
976 fossil_trace("---> DEBUG: next zPwd: %s, n: %d\n", zPwd, n);
977 #endif
978 }
979
980 /* A checkout database file could not be found */
981 return 0;
982 }
983
--- src/db.c
+++ src/db.c
@@ -934,22 +934,18 @@
934 **
935 ** This routine always opens the user database regardless of whether or
936 ** not the repository database is found. If the _FOSSIL_ or .fslckout file
937 ** is found, it is attached to the open database connection too.
938 */
 
939 int db_open_local(const char *zDbName){
940 int i, n;
941 char zPwd[2000];
942 static const char aDbName[][10] = { "_FOSSIL_", ".fslckout", ".fos" };
943
944 if( g.localOpen) return 1;
945 file_getcwd(zPwd, sizeof(zPwd)-20);
946 n = strlen(zPwd);
 
 
 
947 while( n>0 ){
948 for(i=0; i<count(aDbName); i++){
949 sqlite3_snprintf(sizeof(zPwd)-n, &zPwd[n], "/%s", aDbName[i]);
950 if( isValidLocalDb(zPwd) ){
951 /* Found a valid checkout database file */
@@ -957,13 +953,10 @@
953 while( n>0 && zPwd[n-1]=='/' ){
954 n--;
955 zPwd[n] = 0;
956 }
957 g.zLocalRoot = mprintf("%s/", zPwd);
 
 
 
958 g.localOpen = 1;
959 db_open_config(0);
960 db_open_repository(zDbName);
961 return 1;
962 }
@@ -970,13 +963,10 @@
963 }
964 n--;
965 while( n>1 && zPwd[n]!='/' ){ n--; }
966 while( n>1 && zPwd[n-1]=='/' ){ n--; }
967 zPwd[n] = 0;
 
 
 
968 }
969
970 /* A checkout database file could not be found */
971 return 0;
972 }
973

Keyboard Shortcuts

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