# # # patch "annotate.cc" # from [ccae92035e27a840d3c4275a2121b44bce023458] # to [2a87cf72208691bc4f163f5e7ddf54c3371f9745] # # patch "automate.cc" # from [74da2033df4c79e12405c1606d64d451b009090b] # to [c6e067dec1263e430f22e39fc63e30932d1c02d1] # # patch "cert.cc" # from [334b2ee981603c806aeaea84650224a44b8fa4da] # to [ea80fd9e75d015c5b99450a997c461cc36c708ae] # # patch "cmd_db.cc" # from [abc0b7cf0d2d9aa7b46991acbe007a4f3bd388e4] # to [ec4c4962621e612101d3afb8148478ffb137d0ee] # # patch "cmd_diff_log.cc" # from [05b1aa9ddb1d60f9f672f0be4c6da9a4acc571b2] # to [fd455eacd212d63aa201035e9417b9cf726f498b] # # patch "cmd_files.cc" # from [2395edc608207e4c96ff2ebc7c02ca2fc318577b] # to [3b7d2bf25e05b220868e16b7c7a05dd4a3d8d204] # # patch "cmd_key_cert.cc" # from [d8d29f1896222884a0c2f839356067d77d3669b8] # to [bc79d0edf706e78a386555f6cc45c033424356fb] # # patch "cmd_list.cc" # from [29ad489edc4c8d9292d012c4c9380b1d147d7c2d] # to [3ea2cf51e26455ca77ee870728ccb58f8ec42782] # # patch "cmd_merging.cc" # from [93d91c1d4bb32544d0f3bd24d1423b51116a54a3] # to [387dcaa87e0c05f96894845520ed4ee46e227880] # # patch "cmd_netsync.cc" # from [ab1c05737ca8256dad75609a3a9ecb5b05af6f2c] # to [80a15df28e998168fdbcbc7a0b4fd26b86453df3] # # patch "cmd_ws_commit.cc" # from [0c50b024f936be945248c44d63c9ff0c7bed6581] # to [77b18e38145f345b0eb65b73cc05619464a8fc59] # # patch "crypto_tests.cc" # from [ce74687f7d5c51fae17f2351b66648af05b88c42] # to [7d953b7df7484eb2048c6f8ced8ff06541cfdd66] # # patch "database.cc" # from [ad4bcf46d4171450aca5c7767bb8732b23e3c72d] # to [d5fad8bbc2b431e5b27c15d70822f4543860b0d4] # # patch "database_check.cc" # from [3f76fca0830a924db4ff1d07ee116996f16275d9] # to [2efed1029f06762db5ac5d30e304bd21e4351e0b] # # patch "diff_patch.cc" # from [e4040c90b8bbc6afa8f10f3ecdabbcf516421311] # to [06f64d5def0166740f243dedf7fd6776662a0978] # # patch "enumerator.cc" # from [80e8e824b9b6200feef9477123b6d36cef406f51] # to [e3eff2b537853694535346e0d47489832eefccf7] # # patch "graph.cc" # from [bd14b28a928776ba57ba209b1143041177bbe4ed] # to [cc8e1d1fb26fbb9d80096ed8d7a5f023a7b7f039] # # patch "packet.cc" # from [e47a1ae23cd119b89b14915ce894bb05766fc78b] # to [2d7793fd8c7172a6cc085b2c6bfe16159fe7e96d] # # patch "project.cc" # from [e01f12f25458ab142b3473d1691393a5cbe767a7] # to [9c881d67edc2e64055101bcf65a38ba01a590ebc] # # patch "rcs_import.cc" # from [033333f985ba18bcb53942540d5b02605f04d812] # to [a7f8196795b4e5a45d74be47cf4df22e995f4659] # # patch "refiner.cc" # from [edac9ab124500705179f7aa38dd8e632364b88cc] # to [506dd6937b1908a81bcefe63cad77293c6a9c62f] # # patch "revision.cc" # from [7ade162706f7d85f1b66e51f034b6ad06e2883fb] # to [eb4d735c9967f026d1242ca4d38b2de2a483d06e] # # patch "roster.cc" # from [883eb12d62c7fbe359cf2ade5d1cc2f759087e23] # to [932a1eaa645faae04e0523ac971c997bcdeacb4f] # # patch "roster_merge.cc" # from [dc56815127bb89fb848939549894ff07d7ef8e70] # to [b2fca269f9de878a4c50a48f2f437cc385db52a7] # # patch "selectors.cc" # from [be56260790906086ba840e05b8590c9c0fe27202] # to [0ad775938f68b07b748a6a5b671dbbd464d23c38] # # patch "update.cc" # from [f9576513a45e2fcf500d93149ba1f035ef8eb16f] # to [04ca1a313bbd21e3fb4654074b36a791246052af] # # patch "vocab.cc" # from [deef30de4cfcde66bf6638aaf650c58d93748302] # to [4e9da8044b886191dc47b4844c1e80c053efa0ae] # # patch "vocab_terms.hh" # from [cb250f9c6fc6803bf36f8e8d94a3c5978116a9ce] # to [8b4bb85bf082eb78e3c2b22ce78081c70f06eeed] # # patch "work.cc" # from [720e8bb75f78537a2907edf91467fb4f22b8a05e] # to [02fb2acdcae6902c334a4228807c141898af2d21] # ============================================================ --- annotate.cc ccae92035e27a840d3c4275a2121b44bce023458 +++ annotate.cc 2a87cf72208691bc4f163f5e7ddf54c3371f9745 @@ -455,7 +455,7 @@ annotate_context::dump(bool just_revs) c lastid = annotations[i]; } else - cout << encode_hexenc(annotations[i].inner()()) << ": " + cout << annotations[i] << ": " << file_lines[i] << '\n'; } } @@ -564,8 +564,7 @@ annotate_lineage_mapping::build_parent_l //if (verbose) if (file_interned[i] == 14) L(FL("%s file_interned[%d]: %ld\tlcs[%d]: %ld\tmapping[%d]: %ld") - % encode_hexenc(parent_rev.inner()()) - % i % file_interned[i] % j % lcs[j] % i % mapping[i]); + % parent_rev % i % file_interned[i] % j % lcs[j] % i % mapping[i]); if (file_interned[i] == lcs[j]) { @@ -595,8 +594,7 @@ annotate_lineage_mapping::build_parent_l // determine the mapping for parent lineage if (verbose) L(FL("build_parent_lineage: building mapping now " - "for parent_rev %s\n") - % encode_hexenc(parent_rev.inner()())); + "for parent_rev %s\n") % parent_rev); i = j = 0; @@ -702,8 +700,7 @@ do_annotate_node(database & db, annotate_node_work const & work_unit, work_units & work_units) { - L(FL("do_annotate_node for node %s") - % encode_hexenc(work_unit.revision.inner()())); + L(FL("do_annotate_node for node %s") % work_unit.revision); size_t added_in_parent_count = 0; @@ -715,8 +712,7 @@ do_annotate_node(database & db, revision_id parent_revision = *i; L(FL("do_annotate_node processing edge from parent %s to child %s") - % encode_hexenc(parent_revision.inner()()) - % encode_hexenc(work_unit.revision.inner()())); + % parent_revision % work_unit.revision); I(!(work_unit.revision == parent_revision)); @@ -741,8 +737,7 @@ do_annotate_node(database & db, // stop if file is not present in the parent. if (null_id(file_in_parent)) { - L(FL("file added in %s, continuing") - % encode_hexenc(work_unit.revision.inner()())); + L(FL("file added in %s, continuing") % work_unit.revision); added_in_parent_count++; continue; } @@ -762,7 +757,7 @@ do_annotate_node(database & db, file_data data; db.get_file_version(file_in_parent, data); L(FL("building parent lineage for parent file %s") - % encode_hexenc(file_in_parent.inner()())); + % file_in_parent); parent_lineage = work_unit.lineage->build_parent_lineage(work_unit.annotations, parent_revision, @@ -807,8 +802,7 @@ do_annotate_node(database & db, { // already a pending node, so we just have to merge the lineage. L(FL("merging lineage from node %s to parent %s") - % encode_hexenc(work_unit.revision.inner()()) - % encode_hexenc(parent_revision.inner()())); + % work_unit.revision % parent_revision); lmn->lineage->merge(*parent_lineage, work_unit.annotations); } @@ -827,9 +821,7 @@ do_annotate (project_t & project, file_t revision_id rid, bool just_revs) { L(FL("annotating file %s with content %s in revision %s") - % file_node->self - % encode_hexenc(file_node->content.inner()()) - % encode_hexenc(rid.inner()())); + % file_node->self % file_node->content % rid); shared_ptr acp(new annotate_context(project, file_node->content)); ============================================================ --- automate.cc 74da2033df4c79e12405c1606d64d451b009090b +++ automate.cc c6e067dec1263e430f22e39fc63e30932d1c02d1 @@ -97,7 +97,7 @@ CMD_AUTOMATE(heads, N_("[BRANCH]"), project.get_branch_heads(branch, heads, app.opts.ignore_suspend_certs); for (set::const_iterator i = heads.begin(); i != heads.end(); ++i) - output << encode_hexenc(i->inner()()) << '\n'; + output << *i << '\n'; } // Name: ancestors @@ -124,8 +124,7 @@ CMD_AUTOMATE(ancestors, N_("REV1 [REV2 [ for (args_vector::const_iterator i = args.begin(); i != args.end(); ++i) { revision_id rid(decode_hexenc((*i)())); - N(db.revision_exists(rid), F("no such revision '%s'") - % encode_hexenc(rid.inner()())); + N(db.revision_exists(rid), F("no such revision '%s'") % rid); frontier.push_back(rid); } while (!frontier.empty()) @@ -149,7 +148,7 @@ CMD_AUTOMATE(ancestors, N_("REV1 [REV2 [ for (set::const_iterator i = ancestors.begin(); i != ancestors.end(); ++i) if (!null_id(*i)) - output << encode_hexenc(i->inner()()) << '\n'; + output << *i << '\n'; } @@ -177,8 +176,7 @@ CMD_AUTOMATE(descendents, N_("REV1 [REV2 for (args_vector::const_iterator i = args.begin(); i != args.end(); ++i) { revision_id rid(decode_hexenc((*i)())); - N(db.revision_exists(rid), F("no such revision '%s'") - % encode_hexenc(rid.inner()())); + N(db.revision_exists(rid), F("no such revision '%s'") % rid); frontier.push_back(rid); } while (!frontier.empty()) @@ -199,7 +197,7 @@ CMD_AUTOMATE(descendents, N_("REV1 [REV2 } for (set::const_iterator i = descendents.begin(); i != descendents.end(); ++i) - output << encode_hexenc(i->inner()()) << '\n'; + output << *i << '\n'; } @@ -227,13 +225,12 @@ CMD_AUTOMATE(erase_ancestors, N_("[REV1 for (args_vector::const_iterator i = args.begin(); i != args.end(); ++i) { revision_id rid(decode_hexenc((*i)())); - N(db.revision_exists(rid), F("no such revision '%s'") - % encode_hexenc(rid.inner()())); + N(db.revision_exists(rid), F("no such revision '%s'") % rid); revs.insert(rid); } erase_ancestors(db, revs); for (set::const_iterator i = revs.begin(); i != revs.end(); ++i) - output << encode_hexenc(i->inner()()) << '\n'; + output << *i << '\n'; } // Name: toposort @@ -257,15 +254,14 @@ CMD_AUTOMATE(toposort, N_("[REV1 [REV2 [ for (args_vector::const_iterator i = args.begin(); i != args.end(); ++i) { revision_id rid(decode_hexenc((*i)())); - N(db.revision_exists(rid), F("no such revision '%s'") - % encode_hexenc(rid.inner()())); + N(db.revision_exists(rid), F("no such revision '%s'") % rid); revs.insert(rid); } vector sorted; toposort(db, revs, sorted); for (vector::const_iterator i = sorted.begin(); i != sorted.end(); ++i) - output << encode_hexenc(i->inner()()) << '\n'; + output << *i << '\n'; } // Name: ancestry_difference @@ -299,13 +295,11 @@ CMD_AUTOMATE(ancestry_difference, N_("NE set bs; args_vector::const_iterator i = args.begin(); a = revision_id(decode_hexenc((*i)())); - N(db.revision_exists(a), F("no such revision '%s'") - % encode_hexenc(a.inner()())); + N(db.revision_exists(a), F("no such revision '%s'") % a); for (++i; i != args.end(); ++i) { revision_id b(decode_hexenc((*i)())); - N(db.revision_exists(b), F("no such revision '%s'") - % encode_hexenc(b.inner()())); + N(db.revision_exists(b), F("no such revision '%s'") % b); bs.insert(b); } set ancestors; @@ -315,7 +309,7 @@ CMD_AUTOMATE(ancestry_difference, N_("NE toposort(db, ancestors, sorted); for (vector::const_iterator i = sorted.begin(); i != sorted.end(); ++i) - output << encode_hexenc(i->inner()()) << '\n'; + output << *i << '\n'; } // Name: leaves @@ -345,7 +339,7 @@ CMD_AUTOMATE(leaves, "", db.get_leaves(leaves); for (set::const_iterator i = leaves.begin(); i != leaves.end(); ++i) - output << encode_hexenc(i->inner()()) << '\n'; + output << *i << '\n'; } // Name: roots @@ -374,7 +368,7 @@ CMD_AUTOMATE(roots, "", db.get_revision_children(nullid, roots); for (set::const_iterator i = roots.begin(); i != roots.end(); ++i) - output << encode_hexenc(i->inner()()) << '\n'; + output << *i << '\n'; } // Name: parents @@ -398,14 +392,13 @@ CMD_AUTOMATE(parents, N_("REV"), database db(app); revision_id rid(decode_hexenc(idx(args, 0)())); - N(db.revision_exists(rid), F("no such revision '%s'") - % encode_hexenc(rid.inner()())); + N(db.revision_exists(rid), F("no such revision '%s'") % rid); set parents; db.get_revision_parents(rid, parents); for (set::const_iterator i = parents.begin(); i != parents.end(); ++i) if (!null_id(*i)) - output << encode_hexenc(i->inner()()) << '\n'; + output << *i << '\n'; } // Name: children @@ -429,14 +422,13 @@ CMD_AUTOMATE(children, N_("REV"), database db(app); revision_id rid(decode_hexenc(idx(args, 0)())); - N(db.revision_exists(rid), F("no such revision '%s'") - % encode_hexenc(rid.inner()())); + N(db.revision_exists(rid), F("no such revision '%s'") % rid); set children; db.get_revision_children(rid, children); for (set::const_iterator i = children.begin(); i != children.end(); ++i) if (!null_id(*i)) - output << encode_hexenc(i->inner()()) << '\n'; + output << *i << '\n'; } // Name: graph @@ -491,10 +483,10 @@ CMD_AUTOMATE(graph, "", i = child_to_parents.begin(); i != child_to_parents.end(); ++i) { - output << encode_hexenc((i->first).inner()()); + output << i->first; for (set::const_iterator j = i->second.begin(); j != i->second.end(); ++j) - output << ' ' << encode_hexenc(j->inner()()); + output << ' ' << *j; output << '\n'; } } @@ -522,7 +514,7 @@ CMD_AUTOMATE(select, N_("SELECTOR"), for (set::const_iterator i = completions.begin(); i != completions.end(); ++i) - output << encode_hexenc(i->inner()()) << '\n'; + output << *i << '\n'; } struct node_info @@ -1213,7 +1205,7 @@ CMD_AUTOMATE(get_revision, N_("REVID"), db.get_revision(rid, dat); L(FL("dumping revision %s") % rid); - output.write(dat.inner()().data(), dat.inner()().size()); + output << dat; } // Name: get_current_revision @@ -1260,9 +1252,8 @@ CMD_AUTOMATE(get_current_revision, N_("[ calculate_ident(rev, ident); write_revision(rev, dat); - L(FL("dumping revision %s") - % encode_hexenc(ident.inner()())); - output.write(dat.inner()().data(), dat.inner()().size()); + L(FL("dumping revision %s") % ident); + output << dat; } @@ -1289,7 +1280,7 @@ CMD_AUTOMATE(get_base_revision_id, "", N(parents.size() == 1, F("this command can only be used in a single-parent workspace")); - output << encode_hexenc(parent_id(parents.begin()).inner()()) << '\n'; + output << parent_id(parents.begin()) << '\n'; } // Name: get_current_revision_id @@ -1326,7 +1317,7 @@ CMD_AUTOMATE(get_current_revision_id, "" calculate_ident(rev, new_revision_id); - output << encode_hexenc(new_revision_id.inner()()) << '\n'; + output << new_revision_id << '\n'; } // Name: get_manifest_of @@ -1403,9 +1394,8 @@ CMD_AUTOMATE(get_manifest_of, N_("[REVID calculate_ident(new_roster, mid); write_manifest_of_roster(new_roster, dat); - L(FL("dumping manifest %s") - % encode_hexenc(mid.inner()())); - output.write(dat.inner()().data(), dat.inner()().size()); + L(FL("dumping manifest %s") % mid); + output << dat; } @@ -1435,11 +1425,9 @@ CMD_AUTOMATE(packet_for_rdata, N_("REVID revision_id r_id(decode_hexenc(idx(args, 0)())); revision_data r_data; - N(db.revision_exists(r_id), - F("no such revision '%s'") - % encode_hexenc(r_id.inner()())); + N(db.revision_exists(r_id), F("no such revision '%s'") % r_id); db.get_revision(r_id, r_data); - pw.consume_revision_data(r_id,r_data); + pw.consume_revision_data(r_id, r_data); } // Name: packets_for_certs @@ -1468,12 +1456,12 @@ CMD_AUTOMATE(packets_for_certs, N_("REVI revision_id r_id(decode_hexenc(idx(args, 0)())); vector< revision > certs; - N(db.revision_exists(r_id), - F("no such revision '%s'") - % encode_hexenc(r_id.inner()())); + N(db.revision_exists(r_id), F("no such revision '%s'") % r_id); project.get_revision_certs(r_id, certs); - for (size_t i = 0; i < certs.size(); ++i) - pw.consume_revision_cert(idx(certs,i)); + + for (vector< revision >::const_iterator i = certs.begin(); + i != certs.end(); i++) + pw.consume_revision_cert(*i); } // Name: packet_for_fdata @@ -1501,11 +1489,9 @@ CMD_AUTOMATE(packet_for_fdata, N_("FILEI file_id f_id(decode_hexenc(idx(args, 0)())); file_data f_data; - N(db.file_version_exists(f_id), - F("no such file '%s'") - % encode_hexenc(f_id.inner()())); + N(db.file_version_exists(f_id), F("no such file '%s'") % f_id); db.get_file_version(f_id, f_data); - pw.consume_file_data(f_id,f_data); + pw.consume_file_data(f_id, f_data); } // Name: packet_for_fdelta @@ -1536,11 +1522,9 @@ CMD_AUTOMATE(packet_for_fdelta, N_("OLD_ file_data f_old_data, f_new_data; N(db.file_version_exists(f_old_id), - F("no such revision '%s'") - % encode_hexenc(f_old_id.inner()())); + F("no such revision '%s'") % f_old_id); N(db.file_version_exists(f_new_id), - F("no such revision '%s'") - % encode_hexenc(f_new_id.inner()())); + F("no such revision '%s'") % f_new_id); db.get_file_version(f_old_id, f_old_data); db.get_file_version(f_new_id, f_new_data); delta del; @@ -1576,8 +1560,7 @@ CMD_AUTOMATE(common_ancestors, N_("REV1 for (args_vector::const_iterator i = args.begin(); i != args.end(); ++i) { revision_id rid(decode_hexenc((*i)())); - N(db.revision_exists(rid), F("no such revision '%s'") - % encode_hexenc(rid.inner()())); + N(db.revision_exists(rid), F("no such revision '%s'") % rid); ancestors.clear(); ancestors.insert(rid); frontier.push_back(rid); @@ -1615,7 +1598,7 @@ CMD_AUTOMATE(common_ancestors, N_("REV1 for (set::const_iterator i = common_ancestors.begin(); i != common_ancestors.end(); ++i) if (!null_id(*i)) - output << encode_hexenc((*i).inner()()) << '\n'; + output << *i << '\n'; } // Name: branches @@ -1953,9 +1936,7 @@ CMD_AUTOMATE(get_corresponding_path, N_( file_path path = file_path_external(idx(args,1)); N(new_roster.has_node(path), - F("file %s is unknown for revision %s") - % path - % encode_hexenc(ident.inner()())); + F("file %s is unknown for revision %s") % path % ident); node_t node = new_roster.get_node(path); basic_io::printer prt; @@ -2007,8 +1988,7 @@ CMD_AUTOMATE(put_file, N_("[FILEID] CONT calculate_ident(dat, sha1sum); file_id base_id(decode_hexenc(idx(args, 0)())); N(db.file_version_exists(base_id), - F("no file version %s found in database") - % encode_hexenc(base_id.inner()())); + F("no file version %s found in database") % base_id); // put_file_version won't do anything if the target ID already exists, // but we can save the delta calculation by checking here too @@ -2025,7 +2005,7 @@ CMD_AUTOMATE(put_file, N_("[FILEID] CONT else I(false); tr.commit(); - output << encode_hexenc(sha1sum.inner()()) << '\n'; + output << sha1sum << '\n'; } // Name: put_revision @@ -2080,10 +2060,9 @@ CMD_AUTOMATE(put_revision, N_("REVISION- // If the database refuses the revision, make sure this is because it's // already there. E(db.put_revision(id, rev) || db.revision_exists(id), - F("missing prerequisite for revision %s") - % encode_hexenc(id.inner()())); + F("missing prerequisite for revision %s") % id); - output << encode_hexenc(id.inner()()) << '\n'; + output << id << '\n'; } // Name: cert ============================================================ --- cert.cc 334b2ee981603c806aeaea84650224a44b8fa4da +++ cert.cc ea80fd9e75d015c5b99450a997c461cc36c708ae @@ -145,12 +145,10 @@ erase_bogus_certs(database & db, get<2>(i->first))) { if (global_sanity.debug_p()) - { L(FL("trust function liked %d signers of %s cert on manifest %s") % i->second.first->size() % get<1>(i->first) - % encode_hexenc(get<0>(i->first).inner()())); - } + % get<0>(i->first)); tmp_certs.push_back(*(i->second.second)); } else @@ -158,7 +156,7 @@ erase_bogus_certs(database & db, W(F("trust function disliked %d signers of %s cert on manifest %s") % i->second.first->size() % get<1>(i->first) - % encode_hexenc(get<0>(i->first).inner()())); + % get<0>(i->first)); } } certs = tmp_certs; @@ -209,7 +207,7 @@ erase_bogus_certs(database & db, L(FL("trust function liked %d signers of %s cert on revision %s") % i->second.first->size() % get<1>(i->first) - % encode_hexenc(get<0>(i->first).inner()())); + % get<0>(i->first)); tmp_certs.push_back(*(i->second.second)); } else @@ -217,7 +215,7 @@ erase_bogus_certs(database & db, W(F("trust function disliked %d signers of %s cert on revision %s") % i->second.first->size() % get<1>(i->first) - % encode_hexenc(get<0>(i->first).inner()())); + % get<0>(i->first)); } } certs = tmp_certs; @@ -298,13 +296,8 @@ read_cert(string const & in, cert & t) id check; cert_hash_code(tmp, check); if (!(check == hash)) - { - hexenc hcheck, hhash; - encode_hexenc(check, hcheck); - encode_hexenc(hash, hhash); - throw bad_decode(F("calculated cert hash '%s' does not match '%s'") - % hcheck % hhash); - } + throw bad_decode(F("calculated cert hash '%s' does not match '%s'") + % check % hash); t = tmp; } @@ -418,13 +411,11 @@ guess_branch(options & opts, project_t & N(branches.size() != 0, F("no branch certs found for revision %s, " - "please provide a branch name") - % encode_hexenc(ident.inner()())); + "please provide a branch name") % ident); N(branches.size() == 1, F("multiple branch certs found for revision %s, " - "please provide a branch name") - % encode_hexenc(ident.inner()())); + "please provide a branch name") % ident); set::iterator i = branches.begin(); I(i != branches.end()); ============================================================ --- cmd_db.cc abc0b7cf0d2d9aa7b46991acbe007a4f3bd388e4 +++ cmd_db.cc ec4c4962621e612101d3afb8148478ffb137d0ee @@ -146,7 +146,7 @@ CMD(db_kill_rev_locally, "kill_rev_local db.get_revision_children(revid, children); N(!children.size(), F("revision %s already has children. We cannot kill it.") - % encode_hexenc(revid.inner()())); + % revid); // If we're executing this in a workspace, check if the workspace parent // revision is the one to kill. If so, write out the changes made in this @@ -179,10 +179,10 @@ CMD(db_kill_rev_locally, "kill_rev_local "the workspace contains uncommitted changes.\n" "Consider updating your workspace to another revision first,\n" "before you try to kill this revision again.") - % encode_hexenc(revid.inner()())); + % revid); P(F("applying changes from %s on the current workspace") - % encode_hexenc(revid.inner()())); + % revid); revision_t new_work_rev; db.get_revision(revid, new_work_rev); @@ -383,7 +383,7 @@ CMD(complete, "complete", "", CMD_REF(in for (set::const_iterator i = completions.begin(); i != completions.end(); ++i) { - if (!verbose) cout << encode_hexenc(i->inner()()) << '\n'; + if (!verbose) cout << *i << '\n'; else cout << describe_revision(project, *i) << '\n'; } } @@ -393,7 +393,7 @@ CMD(complete, "complete", "", CMD_REF(in db.complete(idx(args, 1)(), completions); for (set::const_iterator i = completions.begin(); i != completions.end(); ++i) - cout << encode_hexenc(i->inner()()) << '\n'; + cout << *i << '\n'; } else if (idx(args, 0)() == "key") { @@ -403,7 +403,7 @@ CMD(complete, "complete", "", CMD_REF(in for (completions_t::const_iterator i = completions.begin(); i != completions.end(); ++i) { - cout << encode_hexenc(i->first.inner()()); + cout << i->first; if (verbose) cout << ' ' << i->second(); cout << '\n'; } ============================================================ --- cmd_diff_log.cc 05b1aa9ddb1d60f9f672f0be4c6da9a4acc571b2 +++ cmd_diff_log.cc fd455eacd212d63aa201035e9417b9cf726f498b @@ -397,7 +397,7 @@ prepare_diff(app_state & app, make_cset(restricted_roster, new_roster, excluded); new_is_archived = false; - header << "# old_revision [" << encode_hexenc(old_rid.inner()()) << "]\n"; + header << "# old_revision [" << old_rid << "]\n"; } else if (app.opts.revision_selectors.size() == 1) { @@ -424,7 +424,7 @@ prepare_diff(app_state & app, make_cset(restricted_roster, new_roster, excluded); new_is_archived = false; - header << "# old_revision [" << encode_hexenc(r_old_id.inner()()) << "]\n"; + header << "# old_revision [" << r_old_id << "]\n"; } else if (app.opts.revision_selectors.size() == 2) { @@ -873,7 +873,7 @@ CMD(log, "log", "", CMD_REF(informative) ostringstream out; if (app.opts.brief) { - out << encode_hexenc(rid.inner()()); + out << rid; log_certs(project, out, rid, author_name); if (app.opts.no_graph) log_certs(project, out, rid, date_name); @@ -889,7 +889,7 @@ CMD(log, "log", "", CMD_REF(informative) else { out << string(65, '-') << '\n'; - out << "Revision: " << encode_hexenc(rid.inner()()) << '\n'; + out << "Revision: " << rid << '\n'; changes_summary csum; @@ -904,8 +904,7 @@ CMD(log, "log", "", CMD_REF(informative) for (set::const_iterator anc = ancestors.begin(); anc != ancestors.end(); ++anc) - out << "Ancestor: " - << encode_hexenc(anc->inner()()) << '\n'; + out << "Ancestor: " << *anc << '\n'; log_certs(project, out, rid, author_name, "Author: ", false); log_certs(project, out, rid, date_name, "Date: ", false); @@ -945,8 +944,8 @@ CMD(log, "log", "", CMD_REF(informative) graph.print(rid, interesting, out_system); } else if (use_markings && !app.opts.no_graph) - graph.print(rid, interesting, ( - F("(Revision: %s)") % encode_hexenc(rid.inner()())).str()); + graph.print(rid, interesting, + (F("(Revision: %s)") % rid).str()); frontier.pop(); // beware: rid is invalid from now on ============================================================ --- cmd_files.cc 2395edc608207e4c96ff2ebc7c02ca2fc318577b +++ cmd_files.cc 3b7d2bf25e05b220868e16b7c7a05dd4a3d8d204 @@ -181,11 +181,11 @@ CMD(annotate, "annotate", "", CMD_REF(in // find the version of the file requested N(roster.has_node(file), F("no such file '%s' in revision '%s'") - % file % encode_hexenc(rid.inner()())); + % file % rid); node_t node = roster.get_node(file); N(is_file_t(node), F("'%s' in revision '%s' is not a file") - % file % encode_hexenc(rid.inner()())); + % file % rid); file_t file_node = downcast_to_file_t(node); L(FL("annotate for file_id %s") % file_node->self); @@ -214,7 +214,7 @@ CMD(identify, "identify", "", CMD_REF(de id ident; calculate_ident(dat, ident); - cout << encode_hexenc(ident()) << '\n'; + cout << ident << '\n'; } // Name: identify @@ -245,28 +245,26 @@ CMD_AUTOMATE(identify, N_("PATH"), id ident; calculate_ident(dat, ident); - cout << encode_hexenc(ident()) << '\n'; + cout << ident << '\n'; } static void dump_file(database & db, std::ostream & output, file_id & ident) { N(db.file_version_exists(ident), - F("no file version %s found in database") - % encode_hexenc(ident.inner()())); + F("no file version %s found in database") % ident); file_data dat; - L(FL("dumping file %s") % encode_hexenc(ident.inner()())); + L(FL("dumping file %s") % ident); db.get_file_version(ident, dat); - output.write(dat.inner()().data(), dat.inner()().size()); + output << dat; } static void dump_file(database & db, std::ostream & output, revision_id rid, utf8 filename) { N(db.revision_exists(rid), - F("no such revision '%s'") - % encode_hexenc(rid.inner()())); + F("no such revision '%s'") % rid); // Paths are interpreted as standard external ones when we're in a // workspace, but as project-rooted external ones otherwise. @@ -276,13 +274,11 @@ dump_file(database & db, std::ostream & marking_map marks; db.get_roster(rid, roster, marks); N(roster.has_node(fp), - F("no file '%s' found in revision '%s'") - % fp % encode_hexenc(rid.inner()())); + F("no file '%s' found in revision '%s'") % fp % rid); node_t node = roster.get_node(fp); N((!null_node(node->self) && is_file_t(node)), - F("no file '%s' found in revision '%s'") - % fp % encode_hexenc(rid.inner()())); + F("no file '%s' found in revision '%s'") % fp % rid); file_t file_node = downcast_to_file_t(node); dump_file(db, output, file_node->content); ============================================================ --- cmd_key_cert.cc d8d29f1896222884a0c2f839356067d77d3669b8 +++ cmd_key_cert.cc bc79d0edf706e78a386555f6cc45c033424356fb @@ -232,7 +232,7 @@ CMD(trusted, "trusted", "", CMD_REF(key_ "and value: %s\n" "was signed by: %s\n" "it would be: %s") - % encode_hexenc(ident.inner()()) + % ident % cname % value % all_signers.str() ============================================================ --- cmd_list.cc 29ad489edc4c8d9292d012c4c9380b1d147d7c2d +++ cmd_list.cc 3ea2cf51e26455ca77ee870728ccb58f8ec42782 @@ -226,9 +226,9 @@ CMD(keys, "keys", "", CMD_REF(list), "[P } key_hash_code(keyid, pub_encoded, hash_code); if (indb) - cout << encode_hexenc(hash_code()) << ' ' << keyid << '\n'; + cout << hash_code << ' ' << keyid << '\n'; else - cout << encode_hexenc(hash_code()) << ' ' << keyid << " (*)\n"; + cout << hash_code << ' ' << keyid << " (*)\n"; } if (!all_in_db) cout << (F("(*) - only in %s/") @@ -246,7 +246,7 @@ CMD(keys, "keys", "", CMD_REF(list), "[P id hash_code; keys.get_key_pair(*i, kp); key_hash_code(*i, kp.priv, hash_code); - cout << encode_hexenc(hash_code()) << ' ' << *i << '\n'; + cout << hash_code << ' ' << *i << '\n'; } cout << '\n'; } @@ -338,7 +338,7 @@ CMD(tags, "tags", "", CMD_REF(list), "", for (set::const_iterator i = tags.begin(); i != tags.end(); ++i) { cout << i->name << ' ' - << encode_hexenc(i->ident.inner()()) << ' ' + << i->ident << ' ' << i->key << '\n'; } } ============================================================ --- cmd_merging.cc 93d91c1d4bb32544d0f3bd24d1423b51116a54a3 +++ cmd_merging.cc 387dcaa87e0c05f96894845520ed4ee46e227880 @@ -77,8 +77,8 @@ three_way_merge(revision_id const & ance safe_insert(left_uncommon_ancestors, left_rid); safe_insert(right_uncommon_ancestors, right_rid); - P(F("[left] %s") % encode_hexenc(left_rid.inner()())); - P(F("[right] %s") % encode_hexenc(right_rid.inner()())); + P(F("[left] %s") % left_rid); + P(F("[right] %s") % right_rid); // And do the merge roster_merge(left_roster, left_markings, left_uncommon_ancestors, @@ -207,16 +207,14 @@ CMD(update, "update", "", CMD_REF(worksp if (old_rid == chosen_rid) { - P(F("already up to date at %s") - % encode_hexenc(old_rid.inner()())); + P(F("already up to date at %s") % old_rid); // do still switch the workspace branch, in case they have used // update to switch branches. work.set_ws_options(app.opts, true); return; } - P(F("selected update target %s") - % encode_hexenc(chosen_rid.inner()())); + P(F("selected update target %s") % chosen_rid); // Fiddle around with branches, in an attempt to guess what the user // wants. @@ -305,8 +303,7 @@ CMD(update, "update", "", CMD_REF(worksp if (switched_branch) P(F("switched branch; next commit will use branch %s") % app.opts.branchname()); - P(F("updated to base revision %s") - % encode_hexenc(chosen_rid.inner()())); + P(F("updated to base revision %s") % chosen_rid); } // Subroutine of CMD(merge) and CMD(explicit_merge). Merge LEFT with RIGHT, @@ -336,12 +333,8 @@ merge_two(options & opts, lua_hooks & lu if (branch != opts.branchname) fieldwidth = max(fieldwidth, strlen("to branch '")); - hexenc left_hid, right_hid; - encode_hexenc(left.inner(), left_hid); - encode_hexenc(right.inner(), right_hid); - - log << setw(fieldwidth - strlen(" of '")) << caller << " of '" << left_hid - << "'\n" << setw(fieldwidth) << "and '" << right_hid + log << setw(fieldwidth - strlen(" of '")) << caller << " of '" << left + << "'\n" << setw(fieldwidth) << "and '" << right << "'\n"; if (branch != opts.branchname) @@ -350,12 +343,12 @@ merge_two(options & opts, lua_hooks & lu // Now it's time for the real work. if (automate) { - output << left_hid() << " " << right_hid() << " "; + output << left << " " << right << " "; } else { - P(F("[left] %s") % left_hid()); - P(F("[right] %s") % right_hid()); + P(F("[left] %s") % left); + P(F("[right] %s") % right); } revision_id merged; @@ -367,9 +360,9 @@ merge_two(options & opts, lua_hooks & lu guard.commit(); if (automate) - output << encode_hexenc(merged.inner()()) << "\n"; + output << merged << "\n"; else - P(F("[merged] %s") % encode_hexenc(merged.inner()())); + P(F("[merged] %s") % merged); } // should merge support --message, --message-file? It seems somewhat weird, @@ -568,14 +561,14 @@ CMD(merge_into_dir, "merge_into_dir", "" cache_user_key(app.opts, app.lua, db, keys); P(F("propagating %s -> %s") % idx(args,0) % idx(args,1)); - P(F("[left] %s") % encode_hexenc(src_i->inner()())); - P(F("[right] %s") % encode_hexenc(dst_i->inner()())); + P(F("[left] %s") % *src_i); + P(F("[right] %s") % *dst_i); // check for special cases if (is_ancestor(db, *dst_i, *src_i)) { P(F("no merge necessary; putting %s in branch '%s'") - % encode_hexenc(src_i->inner()()) % idx(args, 1)()); + % *src_i % idx(args, 1)()); transaction_guard guard(db); project.put_revision_in_branch(keys, *src_i, branch_name(idx(args, 1)())); @@ -656,9 +649,9 @@ CMD(merge_into_dir, "merge_into_dir", "" log_message = utf8((FL("propagate from branch '%s' (head %s)\n" " to branch '%s' (head %s)\n") % idx(args, 0) - % encode_hexenc(src_i->inner()()) + % *src_i % idx(args, 1) - % encode_hexenc(dst_i->inner()())).str()); + % *dst_i).str()); project.put_standard_certs_from_options(app.opts, app.lua, keys, @@ -667,8 +660,7 @@ CMD(merge_into_dir, "merge_into_dir", "" log_message); guard.commit(); - P(F("[merged] %s") - % encode_hexenc(merged.inner()())); + P(F("[merged] %s") % merged); } } @@ -723,11 +715,11 @@ CMD(merge_into_workspace, "merge_into_wo complete(app.opts, app.lua, project, idx(args, 0)(), right_id); db.get_roster(right_id, right); - N(!(left_id == right_id), F("workspace is already at revision %s") - % encode_hexenc(left_id.inner()())); + N(!(left_id == right_id), + F("workspace is already at revision %s") % left_id); - P(F("[left] %s") % encode_hexenc(left_id.inner()())); - P(F("[right] %s") % encode_hexenc(right_id.inner()())); + P(F("[left] %s") % left_id); + P(F("[right] %s") % right_id); set left_uncommon_ancestors, right_uncommon_ancestors; db.get_uncommon_ancestors(left_id, right_id, @@ -779,8 +771,8 @@ CMD(merge_into_workspace, "merge_into_wo P(F("updated to result of merge\n" " [left] %s\n" "[right] %s\n") - % encode_hexenc(left_id.inner()()) - % encode_hexenc(right_id.inner()())); + % left_id + % right_id); } CMD(explicit_merge, "explicit_merge", "", CMD_REF(tree), @@ -805,16 +797,13 @@ CMD(explicit_merge, "explicit_merge", "" N(!(left == right), F("%s and %s are the same revision, aborting") - % encode_hexenc(left.inner()()) - % encode_hexenc(right.inner()())); + % left % right); N(!is_ancestor(db, left, right), F("%s is already an ancestor of %s") - % encode_hexenc(left.inner()()) - % encode_hexenc(right.inner()())); + % left % right); N(!is_ancestor(db, right, left), F("%s is already an ancestor of %s") - % encode_hexenc(right.inner()()) - % encode_hexenc(left.inner()())); + % right % left); // avoid failure after lots of work cache_user_key(app.opts, app.lua, db, keys); @@ -839,12 +828,10 @@ CMD(show_conflicts, "show_conflicts", "" complete(app.opts, app.lua, project, idx(args,1)(), r_id); N(!is_ancestor(db, l_id, r_id), F("%s is an ancestor of %s; no merge is needed.") - % encode_hexenc(l_id.inner()()) - % encode_hexenc(r_id.inner()())); + % l_id % r_id); N(!is_ancestor(db, r_id, l_id), F("%s is an ancestor of %s; no merge is needed.") - % encode_hexenc(r_id.inner()()) - % encode_hexenc(l_id.inner()())); + % r_id % l_id); roster_t l_roster, r_roster; marking_map l_marking, r_marking; db.get_roster(l_id, l_roster, l_marking); @@ -863,8 +850,8 @@ CMD(show_conflicts, "show_conflicts", "" // so they may appear swapped here. perhaps we should sort left and right // before using them? - P(F("[left] %s") % encode_hexenc(l_id.inner()())); - P(F("[right] %s") % encode_hexenc(r_id.inner()())); + P(F("[left] %s") % l_id); + P(F("[right] %s") % r_id); if (result.is_clean()) { @@ -916,9 +903,9 @@ CMD(pluck, "pluck", "", CMD_REF(workspac F("revision %s is a merge\n" "to apply the changes relative to one of its parents, use:\n" " %s pluck -r PARENT -r %s") - % encode_hexenc(to_rid.inner()()) + % to_rid % ui.prog_name - % encode_hexenc(to_rid.inner()())); + % to_rid); from_rid = *parents.begin(); } else if (app.opts.revision_selectors.size() == 2) @@ -1064,13 +1051,13 @@ CMD(pluck, "pluck", "", CMD_REF(workspac if (from_to_to_excluded.empty()) log_str += (FL("applied changes from %s\n" " through %s\n") - % encode_hexenc(from_rid.inner()()) - % encode_hexenc(to_rid.inner()())).str(); + % from_rid + % to_rid).str(); else log_str += (FL("applied partial changes from %s\n" " through %s\n") - % encode_hexenc(from_rid.inner()()) - % encode_hexenc(to_rid.inner()())).str(); + % from_rid + % to_rid).str(); work.write_user_log(utf8(log_str)); } } ============================================================ --- cmd_netsync.cc ab1c05737ca8256dad75609a3a9ecb5b05af6f2c +++ cmd_netsync.cc 80a15df28e998168fdbcbc7a0b4fd26b86453df3 @@ -422,15 +422,13 @@ CMD(clone, "clone", "", CMD_REF(network) N(project.revision_is_in_branch(ident, app.opts.branchname), F("revision %s is not a member of branch %s") - % encode_hexenc(ident.inner()()) - % app.opts.branchname); + % ident % app.opts.branchname); } roster_t empty_roster, current_roster; L(FL("checking out revision %s to directory %s") - % encode_hexenc(ident.inner()()) - % workspace_dir); + % ident % workspace_dir); db.get_roster(ident, current_roster); workspace work(app); ============================================================ --- cmd_ws_commit.cc 0c50b024f936be945248c44d63c9ff0c7bed6581 +++ cmd_ws_commit.cc 77b18e38145f345b0eb65b73cc05619464a8fc59 @@ -54,8 +54,7 @@ revision_summary(revision_t const & rev, revision_id parent = edge_old_revision(*i); // A colon at the end of this string looked nicer, but it made // double-click copying from terminals annoying. - out += (F("Changes against parent %s") - % encode_hexenc(parent.inner()())).str() += '\n'; + out += (F("Changes against parent %s") % parent).str() += '\n'; cset const & cs = edge_changes(*i); @@ -296,16 +295,15 @@ CMD(revert, "revert", "", CMD_REF(worksp P(F("reverting %s") % new_path); L(FL("reverting %s to [%s]") % new_path - % encode_hexenc(f->content.inner()())); + % f->content); N(db.file_version_exists(f->content), F("no file version %s found in database for %s") - % encode_hexenc(f->content.inner()()) - % new_path); + % f->content % new_path); file_data dat; L(FL("writing file %s to %s") - % encode_hexenc(f->content.inner()()) % new_path); + % f->content % new_path); db.get_file_version(f->content, dat); write_data(new_path, dat.inner()); } @@ -362,14 +360,14 @@ CMD(disapprove, "disapprove", "", CMD_RE N(rev.edges.size() == 1, F("revision %s has %d changesets, cannot invert") - % encode_hexenc(r.inner()()) % rev.edges.size()); + % r % rev.edges.size()); guess_branch(app.opts, project, r); N(app.opts.branchname() != "", F("need --branch argument for disapproval")); process_commit_message_args(app.opts, log_message_given, log_message, utf8((FL("disapproval of revision '%s'") - % encode_hexenc(r.inner()())).str())); + % r).str())); cache_user_key(app.opts, app.lua, db, keys); @@ -647,7 +645,7 @@ CMD(checkout, "checkout", "co", CMD_REF( N(project.revision_is_in_branch(revid, app.opts.branchname), F("revision %s is not a member of branch %s") - % encode_hexenc(revid.inner()()) % app.opts.branchname); + % revid % app.opts.branchname); } // we do this part of the checking down here, because it is legitimate to @@ -685,7 +683,7 @@ CMD(checkout, "checkout", "co", CMD_REF( roster_t empty_roster, current_roster; L(FL("checking out revision %s to directory %s") - % encode_hexenc(revid.inner()()) % dir); + % revid % dir); db.get_roster(revid, current_roster); revision_t workrev; @@ -1138,8 +1136,8 @@ CMD(commit, "commit", "ci", CMD_REF(work { L(FL("new manifest '%s'\n" "new revision '%s'\n") - % encode_hexenc(restricted_rev.new_manifest.inner()()) - % encode_hexenc(restricted_rev_id.inner()())); + % restricted_rev.new_manifest + % restricted_rev_id); } process_commit_message_args(app.opts, log_message_given, log_message); @@ -1197,12 +1195,12 @@ CMD(commit, "commit", "ci", CMD_REF(work if (db.revision_exists(restricted_rev_id)) W(F("revision %s already in database") - % encode_hexenc(restricted_rev_id.inner()())); + % restricted_rev_id); else { if (global_sanity.debug_p()) L(FL("inserting new revision %s") - % encode_hexenc(restricted_rev_id.inner()())); + % restricted_rev_id); for (edge_map::const_iterator edge = restricted_rev.edges.begin(); edge != restricted_rev.edges.end(); @@ -1224,14 +1222,13 @@ CMD(commit, "commit", "ci", CMD_REF(work { if (global_sanity.debug_p()) L(FL("skipping file delta %s, already in database") - % encode_hexenc(delta_entry_dst(i).inner()())); + % delta_entry_dst(i)); } else if (db.file_version_exists(old_content)) { if (global_sanity.debug_p()) L(FL("inserting delta %s -> %s") - % encode_hexenc(old_content.inner()()) - % encode_hexenc(new_content.inner()())); + % old_content % new_content); file_data old_data; data new_data; @@ -1253,8 +1250,7 @@ CMD(commit, "commit", "ci", CMD_REF(work // If we don't err out here, the database will later. E(false, F("Your database is missing version %s of file '%s'") - % encode_hexenc(old_content.inner()()) - % path); + % old_content % path); } for (map::const_iterator @@ -1265,8 +1261,7 @@ CMD(commit, "commit", "ci", CMD_REF(work file_id new_content = i->second; if (global_sanity.debug_p()) - L(FL("inserting full version %s") - % encode_hexenc(new_content.inner()())); + L(FL("inserting full version %s") % new_content); data new_data; read_data(path, new_data); // sanity check @@ -1301,8 +1296,7 @@ CMD(commit, "commit", "ci", CMD_REF(work // small race condition here... work.put_work_rev(remaining); - P(F("committed revision %s") - % encode_hexenc(restricted_rev_id.inner()())); + P(F("committed revision %s") % restricted_rev_id); work.blank_user_log(); ============================================================ --- crypto_tests.cc ce74687f7d5c51fae17f2351b66648af05b88c42 +++ crypto_tests.cc 7d953b7df7484eb2048c6f8ced8ff06541cfdd66 @@ -1063,7 +1063,7 @@ UNIT_TEST(crypto, calculate_ident) calculate_ident(input, output); //L(FL(" Input: %s") % input); - //L(FL("Output: %s") % encode_hexenc(output)); + //L(FL("Output: %s") % output); UNIT_TEST_CHECK(output() == decode_hexenc(ident)); L(FL("SHA Short Message Test: Passed\n\n")); ============================================================ --- database.cc ad4bcf46d4171450aca5c7767bb8732b23e3c72d +++ database.cc d5fad8bbc2b431e5b27c15d70822f4543860b0d4 @@ -875,8 +875,8 @@ database::info(ostream & out) else { I(res.size() == 1); - counts.push_back((F("%u") - % (lexical_cast(res[0][0]) - 1)).str()); + u64 n = lexical_cast(res[0][0]) - 1; + counts.push_back((F("%u") % n).str()); } } catch (informative_failure const & e) @@ -1638,9 +1638,7 @@ database_impl::get_version(id const & id } if (global_sanity.debug_p()) - L(FL("following delta %s -> %s") - % encode_hexenc(curr()) - % encode_hexenc(nxt())); + L(FL("following delta %s -> %s") % curr % nxt); delta del; get_file_or_manifest_delta_unchecked(nxt, curr, del, delta_table); apply_delta(appl, del()); @@ -1851,9 +1849,7 @@ database::get_roster_version(revision_id { id const nxt(*i); if (global_sanity.debug_p()) - L(FL("following delta %s -> %s") - % encode_hexenc(curr()) - % encode_hexenc(nxt())); + L(FL("following delta %s -> %s") % curr % nxt); roster_delta del; imp->get_roster_delta(nxt, curr, del); apply_roster_delta(del, *roster, *marking); @@ -1974,8 +1970,7 @@ database::put_file(file_id const & id, file_data const & dat) { if (file_version_exists(id)) - L(FL("file version '%s' already exists in db") - % encode_hexenc(id.inner()())); + L(FL("file version '%s' already exists in db") % id); else imp->schedule_delayed_file(id, dat); } @@ -1991,11 +1986,8 @@ database::put_file_version(file_id const if (!file_version_exists(old_id)) { - W(F("file preimage '%s' missing in db") - % encode_hexenc(old_id.inner()())); - W(F("dropping delta '%s' -> '%s'") - % encode_hexenc(old_id.inner()()) - % encode_hexenc(new_id.inner()())); + W(F("file preimage '%s' missing in db") % old_id); + W(F("dropping delta '%s' -> '%s'") % old_id % new_id); return; } @@ -2305,8 +2297,7 @@ database::put_revision(revision_id const if (revision_exists(new_id)) { if (global_sanity.debug_p()) - L(FL("revision '%s' already exists in db") - % encode_hexenc(new_id.inner()())); + L(FL("revision '%s' already exists in db") % new_id); return false; } @@ -2322,9 +2313,8 @@ database::put_revision(revision_id const && !revision_exists(edge_old_revision(i))) { W(F("missing prerequisite revision '%s'") - % encode_hexenc(edge_old_revision(i).inner()())); - W(F("dropping revision '%s'") - % encode_hexenc(new_id.inner()())); + % edge_old_revision(i)); + W(F("dropping revision '%s'") % new_id); return false; } @@ -2334,10 +2324,8 @@ database::put_revision(revision_id const { if (! file_version_exists(a->second)) { - W(F("missing prerequisite file '%s'") - % encode_hexenc(a->second.inner()())); - W(F("dropping revision '%s'") - % encode_hexenc(new_id.inner()())); + W(F("missing prerequisite file '%s'") % a->second); + W(F("dropping revision '%s'") % new_id); return false; } } @@ -2352,18 +2340,16 @@ database::put_revision(revision_id const if (! file_version_exists(delta_entry_src(d))) { W(F("missing prerequisite file pre-delta '%s'") - % encode_hexenc(delta_entry_src(d).inner()())); - W(F("dropping revision '%s'") - % encode_hexenc(new_id.inner()())); + % delta_entry_src(d)); + W(F("dropping revision '%s'") % new_id); return false; } if (! file_version_exists(delta_entry_dst(d))) { W(F("missing prerequisite file post-delta '%s'") - % encode_hexenc(delta_entry_dst(d).inner()())); - W(F("dropping revision '%s'") - % encode_hexenc(new_id.inner()())); + % delta_entry_dst(d)); + W(F("dropping revision '%s'") % new_id); return false; } } @@ -2404,8 +2390,7 @@ database::put_revision(revision_id const } else { - L(FL("roster for revision '%s' already exists in db") - % encode_hexenc(new_id.inner()())); + L(FL("roster for revision '%s' already exists in db") % new_id); } // Phase 4: rewrite any files that need deltas added @@ -2529,8 +2514,7 @@ database::delete_existing_rev_and_certs( I(children.empty()); - L(FL("Killing revision %s locally") - % encode_hexenc(rid.inner()())); + L(FL("Killing revision %s locally") % rid); // Kill the certs, ancestry, and revision. imp->execute(query("DELETE from revision_certs WHERE id = ?") @@ -2770,8 +2754,7 @@ database::check_signature(rsa_keypair_id } // check the text+sig against the key - L(FL("checking %d-byte signature") % - signature().size()); + L(FL("checking %d-byte signature") % signature().size()); if (verifier->verify_message( reinterpret_cast(alleged_text.data()), @@ -2956,14 +2939,14 @@ database::put_revision_cert(revision::const_iterator i = files.begin(); i != files.end(); ++i) { - L(FL("checking file %s") % encode_hexenc(i->inner()())); + L(FL("checking file %s") % *i); file_data data; db.get_file_version(*i, data); checked_files[*i].found = true; @@ -185,7 +185,7 @@ check_rosters_manifest(database & db, for (set::const_iterator i = rosters.begin(); i != rosters.end(); ++i) { - L(FL("checking roster %s") % encode_hexenc(i->inner()())); + L(FL("checking roster %s") % *i); roster_t ros; marking_map mm; @@ -200,7 +200,7 @@ check_rosters_manifest(database & db, catch (std::exception & e) { L(FL("error loading roster %s: %s") - % encode_hexenc(i->inner()()) % e.what()); + % *i % e.what()); checked_rosters[*i].found = false; continue; } @@ -245,7 +245,7 @@ check_rosters_marking(database & db, = checked_rosters.begin(); i != checked_rosters.end(); i++) { revision_id ros_id = i->first; - L(FL("checking roster %s") % encode_hexenc(i->first.inner()())); + L(FL("checking roster %s") % i->first); if (!i->second.found) continue; @@ -315,7 +315,7 @@ check_revisions(database & db, for (set::const_iterator i = revisions.begin(); i != revisions.end(); ++i) { - L(FL("checking revision %s") % encode_hexenc(i->inner()())); + L(FL("checking revision %s") % *i); revision_data data; db.get_revision(*i, data); checked_revisions[*i].found = true; @@ -328,7 +328,7 @@ check_revisions(database & db, catch (logic_error & e) { L(FL("error parsing revision %s: %s") - % encode_hexenc(i->inner()()) % e.what()); + % *i % e.what()); checked_revisions[*i].parseable = false; continue; } @@ -513,7 +513,7 @@ check_heights(database & db, for (set::const_iterator i = heights.begin(); i != heights.end(); ++i) { - L(FL("checking height for %s") % encode_hexenc(i->inner()())); + L(FL("checking height for %s") % *i); rev_height h; try @@ -564,15 +564,15 @@ check_heights_relation(database & db, { if (global_sanity.debug_p()) L(FL("missing height(s), skipping edge %s -> %s") - % encode_hexenc(p_id.inner()()) - % encode_hexenc(c_id.inner()())); + % p_id + % c_id); continue; } if (global_sanity.debug_p()) L(FL("checking heights for edges %s -> %s") - % encode_hexenc(p_id.inner()()) - % encode_hexenc(c_id.inner()())); + % p_id + % c_id); rev_height parent, child; db.get_rev_height(p_id, parent); @@ -583,9 +583,9 @@ check_heights_relation(database & db, if (global_sanity.debug_p()) L(FL("error: height %s of child %s not greater than height %s of parent %s") % child - % encode_hexenc(c_id.inner()()) + % c_id % parent - % encode_hexenc(p_id.inner()())); + % p_id); checked_heights[c_id].sensible = false; // defaults to true continue; } @@ -608,13 +608,13 @@ report_files(map { missing_files++; P(F("file %s missing (%d manifest references)") - % encode_hexenc(i->first.inner()()) % file.roster_refs); + % i->first % file.roster_refs); } if (file.roster_refs == 0) { unreferenced_files++; - P(F("file %s unreferenced") % encode_hexenc(i->first.inner()())); + P(F("file %s unreferenced") % i->first); } } @@ -634,21 +634,21 @@ report_rosters(mapfirst.inner()())); + % i->first); } if (roster.missing_files > 0) { incomplete_rosters++; P(F("roster %s incomplete (%d missing files)") - % encode_hexenc(i->first.inner()()) % roster.missing_files); + % i->first % roster.missing_files); } if (roster.missing_mark_revs > 0) { incomplete_rosters++; P(F("roster %s incomplete (%d missing revisions)") - % encode_hexenc(i->first.inner()()) % roster.missing_mark_revs); + % i->first % roster.missing_mark_revs); } } } @@ -673,7 +673,7 @@ report_revisions(mapfirst.inner()()) + % i->first % revision.revision_refs % revision.cert_refs % revision.ancestry_parent_refs @@ -685,7 +685,7 @@ report_revisions(mapfirst.inner()()) + % i->first % revision.missing_manifests); } @@ -693,7 +693,7 @@ report_revisions(mapfirst.inner()()) + % i->first % revision.missing_revisions); } @@ -701,28 +701,28 @@ report_revisions(mapfirst.inner()())); + % i->first); } if (revision.manifest_mismatch) { manifest_mismatch++; P(F("revision %s mismatched roster and manifest") - % encode_hexenc(i->first.inner()())); + % i->first); } if (revision.incomplete_roster) { incomplete_revisions++; P(F("revision %s incomplete (incomplete roster)") - % encode_hexenc(i->first.inner()())); + % i->first); } if (revision.ancestry_parent_refs != revision.revision_refs) { mismatched_parents++; P(F("revision %s mismatched parents (%d ancestry parents; %d revision refs)") - % encode_hexenc(i->first.inner()()) + % i->first % revision.ancestry_parent_refs % revision.revision_refs ); } @@ -731,7 +731,7 @@ report_revisions(mapfirst.inner()()) + % i->first % revision.ancestry_child_refs % revision.parents.size() ); } @@ -743,21 +743,21 @@ report_revisions(mapfirst.inner()()) % tmp); + % i->first % tmp); } if (!revision.parseable) { non_parseable_revisions++; P(F("revision %s is not parseable (perhaps with unnormalized paths?)") - % encode_hexenc(i->first.inner()())); + % i->first); } if (revision.parseable && !revision.normalized) { non_normalized_revisions++; P(F("revision %s is not in normalized form") - % encode_hexenc(i->first.inner()())); + % i->first); } } } @@ -814,7 +814,7 @@ report_certs(mapfirst.inner()()) + % i->first % checked->rcert.inner().name % checked->rcert.inner().key); } @@ -822,7 +822,7 @@ report_certs(mapfirst.inner()()) + % i->first % checked->rcert.inner().name % checked->rcert.inner().key); } @@ -837,7 +837,7 @@ report_certs(mapfirst.inner()()) % *n); + % i->first % *n); } } @@ -847,7 +847,7 @@ report_certs(mapfirst.inner()()) + % i->first % cert_counts[cert_name(author_cert_name)] % cert_counts[cert_name(date_cert_name)] % cert_counts[cert_name(changelog_cert_name)]); @@ -871,7 +871,7 @@ report_heights(mapfirst.inner()())); + % i->first); continue; } @@ -879,14 +879,14 @@ report_heights(mapfirst.inner()())); + % i->first); } if (!height.sensible) { incorrect_heights++; P(F("height of revision %s not greater than that of parent") - % encode_hexenc(i->first.inner()())); + % i->first); } } } ============================================================ --- diff_patch.cc e4040c90b8bbc6afa8f10f3ecdabbcf516421311 +++ diff_patch.cc 06f64d5def0166740f243dedf7fd6776662a0978 @@ -512,9 +512,9 @@ content_merge_database_adaptor::record_m file_data const & merged_data) { L(FL("recording successful merge of %s <-> %s into %s") - % encode_hexenc(left_ident.inner()()) - % encode_hexenc(right_ident.inner()()) - % encode_hexenc(merged_ident.inner()())); + % left_ident + % right_ident + % merged_ident); transaction_guard guard(db); @@ -623,9 +623,9 @@ content_merge_workspace_adaptor::record_ file_data const & merged_data) { L(FL("temporarily recording merge of %s <-> %s into %s") - % encode_hexenc(left_id.inner()()) - % encode_hexenc(right_id.inner()()) - % encode_hexenc(merged_id.inner()())); + % left_id + % right_id + % merged_id); // this is an insert instead of a safe_insert because it is perfectly // legal (though rare) to have multiple merges resolve to the same file // contents. @@ -696,8 +696,8 @@ content_merge_workspace_adaptor::get_ver E(fid == ident, F("file %s in workspace has id %s, wanted %s") % i->second - % encode_hexenc(fid.inner()()) - % encode_hexenc(ident.inner()())); + % fid + % ident); dat = file_data(tmp); } } @@ -777,9 +777,9 @@ content_merger::try_auto_merge(file_path L(FL("trying auto merge '%s' %s <-> %s (ancestor: %s)") % merged_path - % encode_hexenc(left_id.inner()()) - % encode_hexenc(right_id.inner()()) - % encode_hexenc(ancestor_id.inner()())); + % left_id + % right_id + % ancestor_id); if (left_id == right_id) { @@ -855,9 +855,9 @@ content_merger::try_user_merge(file_path L(FL("trying user merge '%s' %s <-> %s (ancestor: %s)") % merged_path - % encode_hexenc(left_id.inner()()) - % encode_hexenc(right_id.inner()()) - % encode_hexenc(ancestor_id.inner()())); + % left_id + % right_id + % ancestor_id); if (left_id == right_id) { @@ -1443,9 +1443,9 @@ make_diff(string const & filename1, case unified_diff: { ost << "--- " << filename1 << '\t' - << encode_hexenc(id1.inner()()) << '\n'; + << id1 << '\n'; ost << "+++ " << filename2 << '\t' - << encode_hexenc(id2.inner()()) << '\n'; + << id2 << '\n'; unidiff_hunk_writer hunks(lines1, lines2, 3, ost, pattern); walk_hunk_consumer(lcs, left_interned, right_interned, hunks); @@ -1454,9 +1454,9 @@ make_diff(string const & filename1, case context_diff: { ost << "*** " << filename1 << '\t' - << encode_hexenc(id1.inner()()) << '\n'; + << id1 << '\n'; ost << "--- " << filename2 << '\t' - << encode_hexenc(id2.inner()()) << '\n'; + << id2 << '\n'; cxtdiff_hunk_writer hunks(lines1, lines2, 3, ost, pattern); walk_hunk_consumer(lcs, left_interned, right_interned, hunks); ============================================================ --- enumerator.cc 80e8e824b9b6200feef9477123b6d36cef406f51 +++ enumerator.cc e3eff2b537853694535346e0d47489832eefccf7 @@ -235,7 +235,7 @@ revision_enumerator::step() { L(FL("revision_enumerator::step expanding " "contents of rev '%s'") - % encode_hexenc(r.inner()())); + % r); // The rev's files and fdeltas { ============================================================ --- graph.cc bd14b28a928776ba57ba209b1143041177bbe4ed +++ graph.cc cc8e1d1fb26fbb9d80096ed8d7a5f023a7b7f039 @@ -94,9 +94,7 @@ get_reconstruction_path(id const & start j != next.end(); ++j) { if (global_sanity.debug_p()) - L(FL("considering %s -> %s") - % encode_hexenc(tip()) - % encode_hexenc((*j)())); + L(FL("considering %s -> %s") % tip % *j); if (seen_nodes.find(*j) == seen_nodes.end()) { shared_ptr pthN; ============================================================ --- packet.cc e47a1ae23cd119b89b14915ce894bb05766fc78b +++ packet.cc 2d7793fd8c7172a6cc085b2c6bfe16159fe7e96d @@ -41,7 +41,7 @@ packet_writer::consume_file_data(file_id { base64 > packed; pack(dat.inner(), packed); - ost << "[fdata " << encode_hexenc(ident.inner()()) << "]\n" + ost << "[fdata " << ident << "]\n" << trim_ws(packed()) << '\n' << "[end]\n"; } @@ -53,8 +53,8 @@ packet_writer::consume_file_delta(file_i { base64 > packed; pack(del.inner(), packed); - ost << "[fdelta " << encode_hexenc(old_id.inner()()) << '\n' - << " " << encode_hexenc(new_id.inner()()) << "]\n" + ost << "[fdelta " << old_id << '\n' + << " " << new_id << "]\n" << trim_ws(packed()) << '\n' << "[end]\n"; } @@ -65,7 +65,7 @@ packet_writer::consume_revision_data(rev { base64 > packed; pack(dat.inner(), packed); - ost << "[rdata " << encode_hexenc(ident.inner()()) << "]\n" + ost << "[rdata " << ident << "]\n" << trim_ws(packed()) << '\n' << "[end]\n"; } ============================================================ --- project.cc e01f12f25458ab142b3473d1691393a5cbe767a7 +++ project.cc 9c881d67edc2e64055101bcf65a38ba01a590ebc @@ -174,7 +174,7 @@ project_t::revision_is_in_branch(revisio % num % certs.size() % branch - % encode_hexenc(id.inner()())); + % id); return !certs.empty(); } @@ -202,7 +202,7 @@ project_t::revision_is_suspended_in_bran % num % certs.size() % branch - % encode_hexenc(id.inner()())); + % id); return !certs.empty(); } ============================================================ --- rcs_import.cc 033333f985ba18bcb53942540d5b02605f04d812 +++ rcs_import.cc a7f8196795b4e5a45d74be47cf4df22e995f4659 @@ -1402,7 +1402,7 @@ cluster_consumer::build_cset(cvs_cluster { add_missing_parents(pth.dirname(), cs); L(FL("adding entry state '%s' on '%s'") - % encode_hexenc(fid.inner()()) % pth); + % fid % pth); safe_insert(cs.files_added, make_pair(pth, fid)); live_files[i->first] = i->second.version; } @@ -1411,8 +1411,8 @@ cluster_consumer::build_cset(cvs_cluster file_id old_fid(cvs.file_version_interner.lookup(e->second)); L(FL("applying state delta on '%s' : '%s' -> '%s'") % pth - % encode_hexenc(old_fid.inner()()) - % encode_hexenc(fid.inner()())); + % old_fid + % fid); safe_insert(cs.deltas_applied, make_pair(pth, make_pair(old_fid, fid))); live_files[i->first] = i->second.version; @@ -1424,7 +1424,7 @@ cluster_consumer::build_cset(cvs_cluster if (e != live_files.end()) { L(FL("deleting entry state '%s' on '%s'") - % encode_hexenc(fid.inner()()) % pth); + % fid % pth); safe_insert(cs.nodes_deleted, pth); live_files.erase(i->first); } ============================================================ --- refiner.cc edac9ab124500705179f7aa38dd8e632364b88cc +++ refiner.cc 506dd6937b1908a81bcefe63cad77293c6a9c62f @@ -185,7 +185,7 @@ refiner::note_item_in_peer(merkle_node c netcmd_item_type_to_string(their_node.type, typestr); L(FL("%s's peer has %s '%s' at slot %d (in node '%s', level %d)") - % voicestr() % typestr % encode_hexenc(slotval()) + % voicestr() % typestr % slotval % slot % hpref % their_node.level); } */ @@ -226,9 +226,7 @@ refiner::process_done_command(size_t n_i for (set::const_iterator i = local_items.begin(); i != local_items.end(); ++i) { - hexenc hid; - encode_hexenc(*i, hid); - L(FL("%s item %s") % voicestr() % hid); + L(FL("%s item %s") % voicestr() % *i); } L(FL("--- items in %s") % voicestr()); } @@ -544,16 +542,12 @@ refiner_pair L(FL("WARNING: Unequal sets in %s!") % context); for (set::const_iterator i = set1.begin(); i != set1.end(); ++i) { - hexenc hid; - encode_hexenc(*i, hid); - L(FL("%s: %s") % name1 % hid); + L(FL("%s: %s") % name1 % *i); } for (set::const_iterator i = set2.begin(); i != set2.end(); ++i) { - hexenc hid; - encode_hexenc(*i, hid); - L(FL("%s: %s") % name2 % hid); + L(FL("%s: %s") % name2 % *i); } L(FL("end of unequal sets")); } @@ -568,10 +562,8 @@ refiner_pair set::const_iterator j = dst.find(*i); if (j != dst.end()) { - hexenc hid; - encode_hexenc(*i, hid); L(FL("WARNING: %s transmission will send redundant item %s") - % context % hid); + % context % *i); } UNIT_TEST_CHECK(j == dst.end()); } ============================================================ --- revision.cc 7ade162706f7d85f1b66e51f034b6ad06e2883fb +++ revision.cc eb4d735c9967f026d1242ca4d38b2de2a483d06e @@ -304,8 +304,8 @@ is_ancestor(database & db, revision_id const & descendent_id) { L(FL("checking whether %s is an ancestor of %s") - % encode_hexenc(ancestor_id.inner()()) - % encode_hexenc(descendent_id.inner()())); + % ancestor_id + % descendent_id); multimap graph; db.get_revision_ancestry(graph); @@ -935,7 +935,7 @@ void anc_graph::write_certs() Botan::Global_RNG::randomize(reinterpret_cast(buf), constants::epochlen_bytes); epoch_data new_epoch(string(buf, buf + constants::epochlen_bytes)); L(FL("setting epoch for %s to %s") - % *i % encode_hexenc(new_epoch.inner()())); + % *i % new_epoch); db.set_epoch(branch_name(*i), new_epoch); } } @@ -1068,7 +1068,7 @@ anc_graph::add_node_for_old_manifest(man node = max_node++; ++n_nodes; L(FL("node %d = manifest %s") - % node % encode_hexenc(man.inner()())); + % node % man); old_man_to_node.insert(make_pair(man, node)); node_to_old_man.insert(make_pair(node, man)); @@ -1108,8 +1108,8 @@ u64 anc_graph::add_node_for_oldstyle_rev L(FL("node %d = revision %s = manifest %s") % node - % encode_hexenc(rev.inner()()) - % encode_hexenc(man.inner()())); + % rev + % man); old_rev_to_node.insert(make_pair(rev, node)); node_to_old_rev.insert(make_pair(node, rev)); node_to_old_man.insert(make_pair(node, man)); ============================================================ --- roster.cc 883eb12d62c7fbe359cf2ade5d1cc2f759087e23 +++ roster.cc 932a1eaa645faae04e0523ac971c997bcdeacb4f @@ -83,7 +83,7 @@ dump(marking_t const & marking, string & { ostringstream oss; string tmp; - oss << "birth_revision: " << encode_hexenc(marking.birth_revision.inner()()) << '\n'; + oss << "birth_revision: " << marking.birth_revision << '\n'; dump(marking.parent_name, tmp); oss << "parent_name: " << tmp << '\n'; dump(marking.file_content, tmp); @@ -266,10 +266,9 @@ dump(node_t const & n, string & out) oss << "type: "; if (is_file_t(n)) { - string fcontent = encode_hexenc( - downcast_to_file_t(n)->content.inner()()); - oss << "file\n" - << "content: " << fcontent << '\n'; + oss << "file\ncontent: " + << downcast_to_file_t(n)->content + << '\n'; } else { ============================================================ --- roster_merge.cc dc56815127bb89fb848939549894ff07d7ef8e70 +++ roster_merge.cc b2fca269f9de878a4c50a48f2f437cc385db52a7 @@ -95,8 +95,8 @@ dump(file_content_conflict const & confl { ostringstream oss; oss << "file_content_conflict on node: " << conflict.nid << " " - << "left: " << encode_hexenc(conflict.left.inner()()) << " " - << "right: " << encode_hexenc(conflict.right.inner()()) << "\n"; + << "left: " << conflict.left << " " + << "right: " << conflict.right << "\n"; out = oss.str(); } @@ -490,10 +490,10 @@ roster_merge_result::report_multiple_nam if (type == file_type) P(F("conflict: multiple names for file '%s' from revision %s") - % lca_name % encode_hexenc(lca_rid.inner()())); + % lca_name % lca_rid); else P(F("conflict: multiple names for directory '%s' from revision %s") - % lca_name % encode_hexenc(lca_rid.inner()())); + % lca_name % lca_rid); P(F("renamed to '%s' on the left") % left_name); P(F("renamed to '%s' on the right") % right_name); @@ -749,9 +749,9 @@ roster_merge_result::report_file_content P(F("conflict: content conflict on file '%s'") % name); P(F("content hash is %s on the left") - % encode_hexenc(conflict.left.inner()())); + % conflict.left); P(F("content hash is %s on the right") - % encode_hexenc(conflict.right.inner()())); + % conflict.right); } else { @@ -771,11 +771,11 @@ roster_merge_result::report_file_content lca_roster->get_name(conflict.nid, lca_name); P(F("conflict: content conflict on file '%s' from revision %s") - % lca_name % encode_hexenc(lca_rid.inner()())); + % lca_name % lca_rid); P(F("content hash is %s on the left in file '%s'") - % encode_hexenc(conflict.left.inner()()) % left_name); + % conflict.left % left_name); P(F("content hash is %s on the right in file '%s'") - % encode_hexenc(conflict.right.inner()()) % right_name); + % conflict.right % right_name); } } } ============================================================ --- selectors.cc be56260790906086ba840e05b8590c9c0fe27202 +++ selectors.cc 0ad775938f68b07b748a6a5b671dbbd464d23c38 @@ -374,8 +374,7 @@ complete(options const & opts, lua_hooks { completions.insert(revision_id(decode_hexenc(sels[0].second))); N(project.db.revision_exists(*completions.begin()), - F("no such revision '%s'") - % encode_hexenc(completions.begin()->inner()())); + F("no such revision '%s'") % *completions.begin()); return; } @@ -388,12 +387,12 @@ complete(options const & opts, lua_hooks for (set::const_iterator i = completions.begin(); i != completions.end(); ++i) { - P(F("expanded to '%s'") % encode_hexenc(i->inner()())); + P(F("expanded to '%s'") % *i); // This may be impossible, but let's make sure. // All the callers used to do it. N(project.db.revision_exists(*i), - F("no such revision '%s'") % encode_hexenc(i->inner()())); + F("no such revision '%s'") % *i); } } ============================================================ --- update.cc f9576513a45e2fcf500d93149ba1f035ef8eb16f +++ update.cc 04ca1a313bbd21e3fb4654074b36a791246052af @@ -84,14 +84,12 @@ acceptable_descendent(lua_hooks & lua, map & base_results, revision_id const & target) { - L(FL("Considering update target %s") - % encode_hexenc(target.inner()())); + L(FL("Considering update target %s") % target); // step 1: check the branch if (!project.revision_is_in_branch(target, branch)) { - L(FL("%s not in branch %s") - % encode_hexenc(target.inner()()) % branch); + L(FL("%s not in branch %s") % target % branch); return false; } @@ -100,14 +98,12 @@ acceptable_descendent(lua_hooks & lua, get_test_results_for_revision(project, target, target_results); if (lua.hook_accept_testresult_change(base_results, target_results)) { - L(FL("%s is acceptable update candidate") - % encode_hexenc(target.inner()())); + L(FL("%s is acceptable update candidate") % target); return true; } else { - L(FL("%s has unacceptable test results") - % encode_hexenc(target.inner()())); + L(FL("%s has unacceptable test results") % target); return false; } } ============================================================ --- vocab.cc deef30de4cfcde66bf6638aaf650c58d93748302 +++ vocab.cc 4e9da8044b886191dc47b4844c1e80c053efa0ae @@ -180,30 +180,30 @@ fake_id() #undef DECORATE #undef ENCODING #undef ENCODING_NOVERIFY -template -void dump(revision_id const & r, string &); -template -void dump(manifest_id const & r, string &); +template void dump(revision_id const & r, string &); +template void dump(manifest_id const & r, string &); +template void dump(file_id const & r, string &); +template void dump(hexenc const & r, string &); +template void dump(rsa_pub_key const&, string &); +template void dump(roster_data const & d, string &); +template void dump(roster_delta const & d, string &); +template void dump(manifest_data const & d, string &); +template void dump(revision_data const & d, string &); -template -void dump(file_id const & r, string &); +template std::ostream & operator<< <>(std::ostream &, epoch const &); +template std::ostream & operator<< <>(std::ostream &, file const &); +template std::ostream & operator<< <>(std::ostream &, key const &); +template std::ostream & operator<< <>(std::ostream &, manifest const &); +template std::ostream & operator<< <>(std::ostream &, revision const &); +template std::ostream & operator<< <>(std::ostream &, roster const &); -template -void dump(hexenc const & r, string &); +template std::ostream & operator<< <>(std::ostream &, epoch const &); +template std::ostream & operator<< <>(std::ostream &, file const &); +template std::ostream & operator<< <>(std::ostream &, manifest const &); +template std::ostream & operator<< <>(std::ostream &, revision const &); +template std::ostream & operator<< <>(std::ostream &, roster const &); -template -void dump(rsa_pub_key const&, string &); - -template -void dump(roster_data const & d, string &); - -template -void dump(roster_delta const & d, string &); - -template -void dump(manifest_data const & d, string &); - /* * specializations for id, which allows the encoded id * to be dumped out as a human readable, hex encoded ============================================================ --- vocab_terms.hh cb250f9c6fc6803bf36f8e8d94a3c5978116a9ce +++ vocab_terms.hh 8b4bb85bf082eb78e3c2b22ce78081c70f06eeed @@ -69,95 +69,47 @@ ATOMIC_NOVERIFY(merkle); // raw enc // instantiate those bits of the template vocabulary actually in use. -EXTERN template class revision; -EXTERN template class roster; -EXTERN template class manifest; -EXTERN template class file; +// decorations +EXTERN template class epoch; +EXTERN template class file; +EXTERN template class key; +EXTERN template class manifest; +EXTERN template class revision; +EXTERN template class roster; -// hex encoded ids are no longer typed -EXTERN template class hexenc; +EXTERN template class epoch; +EXTERN template class file; +EXTERN template class manifest; +EXTERN template class revision; +EXTERN template class roster; +EXTERN template class file; +EXTERN template class manifest; +EXTERN template class roster; -EXTERN template class key; -EXTERN template class epoch; - -EXTERN template class hexenc; - -EXTERN template class hexenc; - -EXTERN template class gzip; -EXTERN template class base64< gzip >; - -EXTERN template class epoch< data >; - -EXTERN template class revision< data >; -EXTERN template class roster< data >; -EXTERN template class manifest< data >; -EXTERN template class file< data >; - -EXTERN template class gzip; -EXTERN template class base64< gzip >; - -EXTERN template class roster< delta >; -EXTERN template class manifest< delta >; -EXTERN template class file< delta >; - -EXTERN template class base64< rsa_pub_key >; -EXTERN template class base64< rsa_priv_key >; -EXTERN template class base64< old_arc4_rsa_priv_key >; -EXTERN template class base64< rsa_sha1_signature >; -EXTERN template class hexenc< rsa_sha1_signature >; -EXTERN template class base64< cert_value >; - -EXTERN template class base64< var_name >; -EXTERN template class base64< var_value >; - +// encodings +EXTERN template class hexenc; +EXTERN template class hexenc; +EXTERN template class hexenc; EXTERN template class hexenc; -EXTERN template class base64; -EXTERN template class base64; +EXTERN template class hexenc; +EXTERN template class base64; +EXTERN template class base64; +EXTERN template class base64; +EXTERN template class base64; +EXTERN template class base64; +EXTERN template class base64; +EXTERN template class base64; +EXTERN template class base64; +EXTERN template class base64; -// instantiate those bits of the stream operator vocab (again) actually in -// use. "again" since stream operators are friends, not members. +EXTERN template class gzip ; +EXTERN template class base64< gzip >; -EXTERN template std::ostream & operator<< <>(std::ostream &, hexenc const &); +EXTERN template class gzip ; +EXTERN template class base64< gzip >; -EXTERN template std::ostream & operator<< <>(std::ostream &, revision const &); -EXTERN template std::ostream & operator<< <>(std::ostream &, roster const &); -EXTERN template std::ostream & operator<< <>(std::ostream &, manifest const &); -EXTERN template std::ostream & operator<< <>(std::ostream &, file const &); -EXTERN template std::ostream & operator<< <>(std::ostream &, epoch const &); - -EXTERN template std::ostream & operator<< <>(std::ostream &, hexenc const &); - -EXTERN template std::ostream & operator<< <>(std::ostream &, roster const &); -EXTERN template std::ostream & operator<< <>(std::ostream &, manifest const &); - -EXTERN template std::ostream & operator<< <>(std::ostream &, hexenc const &); -EXTERN template std::ostream & operator<< <>(std::ostream &, epoch const &); - -EXTERN template std::ostream & operator<< <>(std::ostream &, gzip const &); -EXTERN template std::ostream & operator<< <>(std::ostream &, base64< gzip > const &); -EXTERN template std::ostream & operator<< <>(std::ostream &, revision< base64< gzip > > const &); -EXTERN template std::ostream & operator<< <>(std::ostream &, manifest< base64< gzip > > const &); -EXTERN template std::ostream & operator<< <>(std::ostream &, file< base64< gzip > > const &); - -EXTERN template std::ostream & operator<< <>(std::ostream &, gzip const &); -EXTERN template std::ostream & operator<< <>(std::ostream &, base64< gzip > const &); -EXTERN template std::ostream & operator<< <>(std::ostream &, manifest< base64< gzip > > const &); -EXTERN template std::ostream & operator<< <>(std::ostream &, file< base64< gzip > > const &); - -EXTERN template std::ostream & operator<< <>(std::ostream &, base64< old_arc4_rsa_priv_key > const &); -EXTERN template std::ostream & operator<< <>(std::ostream &, base64< rsa_priv_key > const &); -EXTERN template std::ostream & operator<< <>(std::ostream &, base64< rsa_pub_key > const &); -EXTERN template std::ostream & operator<< <>(std::ostream &, base64< rsa_sha1_signature > const &); -EXTERN template std::ostream & operator<< <>(std::ostream &, hexenc< rsa_sha1_signature > const &); -EXTERN template std::ostream & operator<< <>(std::ostream &, base64< cert_value > const &); - -EXTERN template std::ostream & operator<< <>(std::ostream &, hexenc const &); -EXTERN template std::ostream & operator<< <>(std::ostream &, base64 const &); - - // Local Variables: // mode: C++ // fill-column: 76 ============================================================ --- work.cc 720e8bb75f78537a2907edf91467fb4f22b8a05e +++ work.cc 02fb2acdcae6902c334a4228807c141898af2d21 @@ -248,8 +248,7 @@ get_roster_for_rid(database & db, else { N(db.revision_exists(rid), - F("base revision %s does not exist in database") - % encode_hexenc(rid.inner()())); + F("base revision %s does not exist in database") % rid); db.get_roster(rid, cr); } L(FL("base roster has %d entries") % cr.first->all_nodes().size());