# # # patch "cmd_othervcs.cc" # from [58775733621ce47e2f49eece4b1b8b4a563b97ef] # to [eda20d6b45a1cd6fa0acd38ea5c05d5a9112e94d] # # patch "options_list.hh" # from [12b49a36cfb1c6d22f42590ae49cf25fdc8af1a8] # to [e83989b460fc74398450f346483409069bb86a71] # # patch "origin_type.hh" # from [0e329b2b10d081f52a8346044a6522a9fdc68552] # to [ee2334f11e368f41370377f683f7d5c0e7e53bcf] # # patch "rcs_import.cc" # from [989be36a8fbac2311c6e214d46e584e7680c8cc2] # to [ca287622dcc8d568469a6d51eeef726c306f5418] # # patch "sanity.cc" # from [f0d0da231ca0aceba1db9792b6621fe88a2ef9ee] # to [f7e9a567f668e95c093bdb425d226301f8b891ff] # ============================================================ --- cmd_othervcs.cc 58775733621ce47e2f49eece4b1b8b4a563b97ef +++ cmd_othervcs.cc eda20d6b45a1cd6fa0acd38ea5c05d5a9112e94d @@ -39,7 +39,7 @@ CMD(rcs_import, "rcs_import", "", CMD_RE for (args_vector::const_iterator i = args.begin(); i != args.end(); ++i) - test_parse_rcs_file(project, system_path((*i)()), origin::user); + test_parse_rcs_file(project, system_path((*i)(), origin::user)); } ============================================================ --- options_list.hh 12b49a36cfb1c6d22f42590ae49cf25fdc8af1a8 +++ options_list.hh e83989b460fc74398450f346483409069bb86a71 @@ -202,7 +202,7 @@ OPT(date, "date", date_t, , { try { - date = date_t::from_string(arg); + date = date_t(arg); } catch (std::exception &e) { ============================================================ --- origin_type.hh 0e329b2b10d081f52a8346044a6522a9fdc68552 +++ origin_type.hh ee2334f11e368f41370377f683f7d5c0e7e53bcf @@ -19,6 +19,7 @@ namespace origin { workspace, system, user, + external_repo, no_fault }; } ============================================================ --- rcs_import.cc 989be36a8fbac2311c6e214d46e584e7680c8cc2 +++ rcs_import.cc ca287622dcc8d568469a6d51eeef726c306f5418 @@ -35,14 +35,12 @@ #include "file_io.hh" #include "interner.hh" #include "lua_hooks.hh" -#include "merge.hh" #include "options.hh" #include "paths.hh" #include "platform-wrapped.hh" #include "project.hh" #include "rcs_file.hh" #include "revision.hh" -#include "roster_merge.hh" #include "safe_map.hh" #include "sanity.hh" #include "transforms.hh" @@ -1117,6 +1115,7 @@ construct_version(vector< piece > const shared_ptr delta = r.deltas.find(dest_version)->second; E(r.deltatexts.find(dest_version) != r.deltatexts.end(), + origin::external_repo, F("delta for revision %s is missing") % dest_version); shared_ptr deltatext = @@ -1622,11 +1621,12 @@ process_rcs_branch(lua_hooks & lua, data // We ignore suspend certs, because otherwise we could possibly fail // to insert the same revision again. - cvs.project.get_branch_heads(branch_name(branchname), heads, true); + cvs.project.get_branch_heads(branch_name(branchname, origin::user), + heads, true); if (!heads.empty()) { - if (heads.size() > 1) - E(false, F("branch %s has multiple heads") % branchname); + E(heads.size() <= 1, origin::user, + F("branch %s has multiple heads") % branchname); head_rev = *(heads.begin()); cvs.branch_head_rev.insert(make_pair(current_branchname, head_rev)); } @@ -2169,7 +2169,7 @@ void cvs_history::index_branchpoint_symb r.deltas.find(branchpoint_version); // the delta must exist - E(di != r.deltas.end(), + E(di != r.deltas.end(), origin::user, F("delta for a branchpoint is missing (%s)") % branchpoint_version); @@ -4686,13 +4686,14 @@ import_cvs_repo(options & opts, % cvsroot % cvsroot); cvs_history cvs(project); - N(opts.branchname() != "", F("need base --branch argument for importing")); + E(opts.branch() != "", origin::user, + F("need base --branch argument for importing")); if (opts.until_given) cvs.upper_time_limit = opts.until; // add the trunk branch name - string bn = opts.branchname(); + string bn = opts.branch(); cvs.base_branch = cvs.symbol_interner.intern(bn); @@ -4893,7 +4894,8 @@ cvs_blob::build_cset(cvs_history & cvs, cvs_commit *ce = (cvs_commit*) *i; file_path pth = file_path_internal(cvs.path_interner.lookup(ce->path)); - file_id new_file_id(cvs.mtn_version_interner.lookup(ce->mtn_version)); + file_id new_file_id(cvs.mtn_version_interner.lookup(ce->mtn_version), + origin::external_repo); if (ce->alive) { @@ -4945,7 +4947,7 @@ cvs_blob::build_cset(cvs_history & cvs, } attr_key k("mtn:origin_info"); - attr_value v(fval); + attr_value v(fval, origin::external_repo); safe_insert(cs.attrs_set, make_pair(make_pair(file_path(), k), v)); @@ -5390,8 +5392,8 @@ blob_consumer::create_artificial_revisio I(!bn.empty()); project.put_standard_certs(keys, new_rid, - branch_name(bn), - utf8(changelog), + branch_name(bn, origin::external_repo), + utf8(changelog, origin::external_repo), date_t(commit_time), author); @@ -5457,7 +5459,7 @@ blob_consumer::operator()(cvs_blob_index ++n_blobs; ++n_revisions; blob.assigned_rid = revision_id( - string(constants::idlen_bytes, '\x33')); + string(constants::idlen_bytes, '\x33'), origin::internal); return; } @@ -5509,13 +5511,13 @@ blob_consumer::operator()(cvs_blob_index I(!bn.empty()); project.put_standard_certs(keys, new_rid, - branch_name(bn), - utf8(changelog), + branch_name(bn, origin::external_repo), + utf8(changelog, origin::external_repo), date_t(commit_time), author); // add the RCS information - put_simple_revision_cert(project.db, keys, new_rid, + project.put_cert(keys, new_rid, cert_name("origin"), cert_value("cvs_import")); ++n_revisions; ============================================================ --- sanity.cc f0d0da231ca0aceba1db9792b6621fe88a2ef9ee +++ sanity.cc f7e9a567f668e95c093bdb425d226301f8b891ff @@ -56,6 +56,8 @@ origin::type_to_string(origin::type t) return string("user"); case workspace: return string("workspace"); + case external_repo: + return string("external repository"); case no_fault: return string("general"); default: