| | @@ -1658,27 +1658,22 @@ |
| 1658 | 1658 | ** |
| 1659 | 1659 | ** Options: |
| 1660 | 1660 | ** --template FILE copy settings from repository file |
| 1661 | 1661 | ** --admin-user|-A USERNAME select given USERNAME as admin user |
| 1662 | 1662 | ** --date-override DATETIME use DATETIME as time of the initial check-in |
| 1663 | | -** (default: do not create an initial check-in) |
| 1664 | 1663 | ** |
| 1665 | 1664 | ** See also: clone |
| 1666 | 1665 | */ |
| 1667 | 1666 | void create_repository_cmd(void){ |
| 1668 | 1667 | char *zPassword; |
| 1669 | 1668 | const char *zTemplate; /* Repository from which to copy settings */ |
| 1670 | 1669 | const char *zDate; /* Date of the initial check-in */ |
| 1671 | 1670 | const char *zDefaultUser; /* Optional name of the default user */ |
| 1672 | | - int makeServerCodes; |
| 1673 | 1671 | |
| 1674 | 1672 | zTemplate = find_option("template",0,1); |
| 1675 | 1673 | zDate = find_option("date-override",0,1); |
| 1676 | 1674 | zDefaultUser = find_option("admin-user","A",1); |
| 1677 | | - makeServerCodes = find_option("docker", 0, 0)==0; |
| 1678 | | - |
| 1679 | | - find_option("empty", 0, 0); /* deprecated */ |
| 1680 | 1675 | /* We should be done with options.. */ |
| 1681 | 1676 | verify_all_options(); |
| 1682 | 1677 | |
| 1683 | 1678 | if( g.argc!=3 ){ |
| 1684 | 1679 | usage("REPOSITORY-NAME"); |
| | @@ -1691,17 +1686,16 @@ |
| 1691 | 1686 | db_create_repository(g.argv[2]); |
| 1692 | 1687 | db_open_repository(g.argv[2]); |
| 1693 | 1688 | db_open_config(0); |
| 1694 | 1689 | if( zTemplate ) db_attach(zTemplate, "settingSrc"); |
| 1695 | 1690 | db_begin_transaction(); |
| 1696 | | - db_initial_setup(zTemplate, zDate, zDefaultUser, makeServerCodes); |
| 1691 | + if( zDate==0 ) zDate = "now"; |
| 1692 | + db_initial_setup(zTemplate, zDate, zDefaultUser, 1); |
| 1697 | 1693 | db_end_transaction(0); |
| 1698 | 1694 | if( zTemplate ) db_detach("settingSrc"); |
| 1699 | | - if( makeServerCodes ){ |
| 1700 | | - fossil_print("project-id: %s\n", db_get("project-code", 0)); |
| 1701 | | - fossil_print("server-id: %s\n", db_get("server-code", 0)); |
| 1702 | | - } |
| 1695 | + fossil_print("project-id: %s\n", db_get("project-code", 0)); |
| 1696 | + fossil_print("server-id: %s\n", db_get("server-code", 0)); |
| 1703 | 1697 | zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin); |
| 1704 | 1698 | fossil_print("admin-user: %s (initial password is \"%s\")\n", |
| 1705 | 1699 | g.zLogin, zPassword); |
| 1706 | 1700 | } |
| 1707 | 1701 | |
| 1708 | 1702 | |