Fossil SCM

Use "auto" hash-policy for new Docker repositories

jan.nijtmans 2017-03-06 12:52 trunk
Commit 3c9dc14831ec9544770f29a6e3b9f61ed69fd2cc
1 file changed +4 -2
+4 -2
--- src/main.c
+++ src/main.c
@@ -140,11 +140,11 @@
140140
char *zLocalDbName; /* Name of the local database file */
141141
char *zOpenRevision; /* Check-in version to use during database open */
142142
int localOpen; /* True if the local database is open */
143143
char *zLocalRoot; /* The directory holding the local database */
144144
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_* */
146146
int fNoDirSymlinks; /* True if --no-dir-symlinks flag is present */
147147
int fSqlTrace; /* True if --sqltrace flag is present */
148148
int fSqlStats; /* True if --sqltrace or --sqlstats are present */
149149
int fSqlPrint; /* True if -sqlprint flag is present */
150150
int fQuiet; /* True if -quiet flag is present */
@@ -2006,11 +2006,11 @@
20062006
** the name of that directory and the specific repository will be
20072007
** opened later by process_one_web_page() based on the content of
20082008
** the PATH_INFO variable.
20092009
**
20102010
** 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.
20122012
*/
20132013
static void find_server_repository(int arg, int fCreate){
20142014
if( g.argc<=arg ){
20152015
db_must_be_within_tree();
20162016
}else{
@@ -2023,10 +2023,12 @@
20232023
if( isDir==0 && fCreate ){
20242024
const char *zPassword;
20252025
db_create_repository(zRepo);
20262026
db_open_repository(zRepo);
20272027
db_begin_transaction();
2028
+ g.eHashPolicy = HPOLICY_AUTO;
2029
+ db_set_int("hash-policy", HPOLICY_AUTO, 0);
20282030
db_initial_setup(0, "now", g.zLogin);
20292031
db_end_transaction(0);
20302032
fossil_print("project-id: %s\n", db_get("project-code", 0));
20312033
fossil_print("server-id: %s\n", db_get("server-code", 0));
20322034
zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin);
20332035
--- 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

Keyboard Shortcuts

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