Fossil SCM
Use "auto" hash-policy for new Docker repositories
Commit
3c9dc14831ec9544770f29a6e3b9f61ed69fd2cc
Parent
9a6256cf0850e9c…
1 file changed
+4
-2
+4
-2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -140,11 +140,11 @@ | ||
| 140 | 140 | char *zLocalDbName; /* Name of the local database file */ |
| 141 | 141 | char *zOpenRevision; /* Check-in version to use during database open */ |
| 142 | 142 | int localOpen; /* True if the local database is open */ |
| 143 | 143 | char *zLocalRoot; /* The directory holding the local database */ |
| 144 | 144 | int minPrefix; /* Number of digits needed for a distinct UUID */ |
| 145 | - int eHashPolicy; /* Current hash policy. On of HPOLICY_* */ | |
| 145 | + int eHashPolicy; /* Current hash policy. One of HPOLICY_* */ | |
| 146 | 146 | int fNoDirSymlinks; /* True if --no-dir-symlinks flag is present */ |
| 147 | 147 | int fSqlTrace; /* True if --sqltrace flag is present */ |
| 148 | 148 | int fSqlStats; /* True if --sqltrace or --sqlstats are present */ |
| 149 | 149 | int fSqlPrint; /* True if -sqlprint flag is present */ |
| 150 | 150 | int fQuiet; /* True if -quiet flag is present */ |
| @@ -2006,11 +2006,11 @@ | ||
| 2006 | 2006 | ** the name of that directory and the specific repository will be |
| 2007 | 2007 | ** opened later by process_one_web_page() based on the content of |
| 2008 | 2008 | ** the PATH_INFO variable. |
| 2009 | 2009 | ** |
| 2010 | 2010 | ** If the fCreate flag is set, then create the repository if it |
| 2011 | -** does not already exist. | |
| 2011 | +** does not already exist. Always use "auto" hash-policy in this case. | |
| 2012 | 2012 | */ |
| 2013 | 2013 | static void find_server_repository(int arg, int fCreate){ |
| 2014 | 2014 | if( g.argc<=arg ){ |
| 2015 | 2015 | db_must_be_within_tree(); |
| 2016 | 2016 | }else{ |
| @@ -2023,10 +2023,12 @@ | ||
| 2023 | 2023 | if( isDir==0 && fCreate ){ |
| 2024 | 2024 | const char *zPassword; |
| 2025 | 2025 | db_create_repository(zRepo); |
| 2026 | 2026 | db_open_repository(zRepo); |
| 2027 | 2027 | db_begin_transaction(); |
| 2028 | + g.eHashPolicy = HPOLICY_AUTO; | |
| 2029 | + db_set_int("hash-policy", HPOLICY_AUTO, 0); | |
| 2028 | 2030 | db_initial_setup(0, "now", g.zLogin); |
| 2029 | 2031 | db_end_transaction(0); |
| 2030 | 2032 | fossil_print("project-id: %s\n", db_get("project-code", 0)); |
| 2031 | 2033 | fossil_print("server-id: %s\n", db_get("server-code", 0)); |
| 2032 | 2034 | zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin); |
| 2033 | 2035 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -140,11 +140,11 @@ | |
| 140 | char *zLocalDbName; /* Name of the local database file */ |
| 141 | char *zOpenRevision; /* Check-in version to use during database open */ |
| 142 | int localOpen; /* True if the local database is open */ |
| 143 | char *zLocalRoot; /* The directory holding the local database */ |
| 144 | int minPrefix; /* Number of digits needed for a distinct UUID */ |
| 145 | int eHashPolicy; /* Current hash policy. On of HPOLICY_* */ |
| 146 | int fNoDirSymlinks; /* True if --no-dir-symlinks flag is present */ |
| 147 | int fSqlTrace; /* True if --sqltrace flag is present */ |
| 148 | int fSqlStats; /* True if --sqltrace or --sqlstats are present */ |
| 149 | int fSqlPrint; /* True if -sqlprint flag is present */ |
| 150 | int fQuiet; /* True if -quiet flag is present */ |
| @@ -2006,11 +2006,11 @@ | |
| 2006 | ** the name of that directory and the specific repository will be |
| 2007 | ** opened later by process_one_web_page() based on the content of |
| 2008 | ** the PATH_INFO variable. |
| 2009 | ** |
| 2010 | ** If the fCreate flag is set, then create the repository if it |
| 2011 | ** does not already exist. |
| 2012 | */ |
| 2013 | static void find_server_repository(int arg, int fCreate){ |
| 2014 | if( g.argc<=arg ){ |
| 2015 | db_must_be_within_tree(); |
| 2016 | }else{ |
| @@ -2023,10 +2023,12 @@ | |
| 2023 | if( isDir==0 && fCreate ){ |
| 2024 | const char *zPassword; |
| 2025 | db_create_repository(zRepo); |
| 2026 | db_open_repository(zRepo); |
| 2027 | db_begin_transaction(); |
| 2028 | db_initial_setup(0, "now", g.zLogin); |
| 2029 | db_end_transaction(0); |
| 2030 | fossil_print("project-id: %s\n", db_get("project-code", 0)); |
| 2031 | fossil_print("server-id: %s\n", db_get("server-code", 0)); |
| 2032 | zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin); |
| 2033 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -140,11 +140,11 @@ | |
| 140 | char *zLocalDbName; /* Name of the local database file */ |
| 141 | char *zOpenRevision; /* Check-in version to use during database open */ |
| 142 | int localOpen; /* True if the local database is open */ |
| 143 | char *zLocalRoot; /* The directory holding the local database */ |
| 144 | int minPrefix; /* Number of digits needed for a distinct UUID */ |
| 145 | int eHashPolicy; /* Current hash policy. One of HPOLICY_* */ |
| 146 | int fNoDirSymlinks; /* True if --no-dir-symlinks flag is present */ |
| 147 | int fSqlTrace; /* True if --sqltrace flag is present */ |
| 148 | int fSqlStats; /* True if --sqltrace or --sqlstats are present */ |
| 149 | int fSqlPrint; /* True if -sqlprint flag is present */ |
| 150 | int fQuiet; /* True if -quiet flag is present */ |
| @@ -2006,11 +2006,11 @@ | |
| 2006 | ** the name of that directory and the specific repository will be |
| 2007 | ** opened later by process_one_web_page() based on the content of |
| 2008 | ** the PATH_INFO variable. |
| 2009 | ** |
| 2010 | ** If the fCreate flag is set, then create the repository if it |
| 2011 | ** does not already exist. Always use "auto" hash-policy in this case. |
| 2012 | */ |
| 2013 | static void find_server_repository(int arg, int fCreate){ |
| 2014 | if( g.argc<=arg ){ |
| 2015 | db_must_be_within_tree(); |
| 2016 | }else{ |
| @@ -2023,10 +2023,12 @@ | |
| 2023 | if( isDir==0 && fCreate ){ |
| 2024 | const char *zPassword; |
| 2025 | db_create_repository(zRepo); |
| 2026 | db_open_repository(zRepo); |
| 2027 | db_begin_transaction(); |
| 2028 | g.eHashPolicy = HPOLICY_AUTO; |
| 2029 | db_set_int("hash-policy", HPOLICY_AUTO, 0); |
| 2030 | db_initial_setup(0, "now", g.zLogin); |
| 2031 | db_end_transaction(0); |
| 2032 | fossil_print("project-id: %s\n", db_get("project-code", 0)); |
| 2033 | fossil_print("server-id: %s\n", db_get("server-code", 0)); |
| 2034 | zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin); |
| 2035 |