Diff
Not logged in

Differences From Artifact [54e12237fc]:

To Artifact [486edea59b]:


2044
2045
2046
2047
2048
2049
2050

2051
2052
2053
2054

2055
2056





2057
2058
2059
2060
2061
2062
2063
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054

2055

2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068







+



-
+
-

+
+
+
+
+







    const char *zRepo = g.argv[arg];
    int isDir = file_isdir(zRepo);
    if( isDir==1 ){
      g.zRepositoryName = mprintf("%s", zRepo);
      file_simplify_name(g.zRepositoryName, -1, 0);
    }else{
      if( isDir==0 && fCreate ){
        const char *zPassword;
        db_create_repository(zRepo);
        db_open_repository(zRepo);
        db_begin_transaction();
        db_initial_setup(0,"now","admin");
        db_initial_setup(0,"now",0);
        db_multi_exec("UPDATE user SET pw='admin' WHERE login='admin'");
        db_end_transaction(0);
        fossil_print("project-id: %s\n", db_get("project-code", 0));
        fossil_print("server-id:  %s\n", db_get("server-code", 0));
        zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin);
        fossil_print("admin-user: %s (initial password is \"%s\")\n",
                     g.zLogin, zPassword);
        cache_initialize();
        g.zLogin = 0;
        g.userUid = 0;
      }else{
        db_open_repository(zRepo);
      }
    }