# # # patch "cmd_netsync.cc" # from [67f068f98bc16eccf2f86993ba1cbc71275d2b43] # to [bf1c5ae3d0a899d7d85818a6f54c68f937f23ae7] # # patch "database.cc" # from [85d1281f3f3279df835bcff0d71e6a1d3c9b295b] # to [bfdca9782fd3065ea71c1d998cb863f6435efd13] # # patch "options_list.hh" # from [4417d1429705ce5a0fdc574cce72872f180d3351] # to [c881b19c0e40dc2bb8da861f92ca004f20553567] # # patch "vocab.hh" # from [8d49fa12d7b4a5ed0426fd9fa8c71aa82cb1dfb9] # to [925574290dd68029e94147dd05eb9e60ff247b79] # # patch "work.cc" # from [cb9eb731403670c5158f7ce9c94de5de611dc5f7] # to [75fec4fd6692c35eeefeae5b96738b7ad767bfd0] # ============================================================ --- cmd_netsync.cc 67f068f98bc16eccf2f86993ba1cbc71275d2b43 +++ cmd_netsync.cc bf1c5ae3d0a899d7d85818a6f54c68f937f23ae7 @@ -288,8 +288,9 @@ CMD_AUTOMATE_NO_STDIO(remote_stdio, if (app.opts.dbname.empty()) { - W(F("No database given; assuming ':memory:' database. This means that we can't\n" - "verify the server key, because we have no record of what it should be.")); + W(F("No database given; assuming '%s' database. This means that we can't\n" + "verify the server key, because we have no record of what it should be.") + % memory_db_identifier); app.opts.dbname_type = memory_db; } @@ -420,7 +421,8 @@ CMD_AUTOMATE_NO_STDIO(remote, if (app.opts.dbname.empty()) { W(F("No database given; assuming ':memory:' database. This means that we can't\n" - "verify the server key, because we have no record of what it should be.")); + "verify the server key, because we have no record of what it should be.") + % memory_db_identifier); app.opts.dbname_type = memory_db; } ============================================================ --- database.cc 85d1281f3f3279df835bcff0d71e6a1d3c9b295b +++ database.cc bfdca9782fd3065ea71c1d998cb863f6435efd13 @@ -4595,7 +4595,7 @@ database_impl::open() string to_open; if (type == memory_db) - to_open = ":memory:"; + to_open = memory_db_identifier; else { system_path base_dir = filename.dirname(); ============================================================ --- options_list.hh 4417d1429705ce5a0fdc574cce72872f180d3351 +++ options_list.hh c881b19c0e40dc2bb8da861f92ca004f20553567 @@ -251,7 +251,7 @@ GOPT(dbname, "db,d", system_path, , gett GOPT(dbname, "db,d", system_path, , gettext_noop("set name of database")) #ifdef option_bodies { - if (arg == ":memory:") + if (arg == memory_db_identifier) { dbname_type = memory_db; } ============================================================ --- vocab.hh 8d49fa12d7b4a5ed0426fd9fa8c71aa82cb1dfb9 +++ vocab.hh 925574290dd68029e94147dd05eb9e60ff247b79 @@ -119,6 +119,8 @@ enum db_type unmanaged_db }; +static const std::string memory_db_identifier = ":memory:"; + // do these belong here? inline bool null_id(id const & i) ============================================================ --- work.cc cb9eb731403670c5158f7ce9c94de5de611dc5f7 +++ work.cc 75fec4fd6692c35eeefeae5b96738b7ad767bfd0 @@ -486,14 +486,14 @@ read_options_file(any_path const & optsp if (opt == "database") { - if (val.find(':') == 0 && val != ":memory:") + if (val.find(':') == 0 && val != memory_db_identifier) { opts.dbname_alias = val; opts.dbname_given = true; opts.dbname_type = managed_db; } else - if (val != ":memory:") + if (val != memory_db_identifier) { opts.dbname = system_path(val, origin::workspace); opts.dbname_given = true;