# # patch "automate.cc" # from [7b9265dbdf4cb7458a01457f45a12fdae102dc57] # to [3363afb1c7295a58b900de799f89d6fe2aeb144a] # # patch "database_check.cc" # from [3635697e22e75bdf7eed8d61a77fb48fdcb151da] # to [91484f8c51ca3e6010adbd800401f3ec9763222c] # ======================================================================== --- automate.cc 7b9265dbdf4cb7458a01457f45a12fdae102dc57 +++ automate.cc 3363afb1c7295a58b900de799f89d6fe2aeb144a @@ -225,34 +225,38 @@ if (args.size() > 1) throw usage(help_name); - // is there an .mt-attrs? - file_path attr_path; - get_attr_path(attr_path); - if (!file_exists(attr_path)) return; + roster_t base, current; + temp_node_id_source nis; + get_base_and_current_roster_shape(base, current, nis, app); - // read attribute map - data attr_data; - attr_map attrs; - - read_data(attr_path, attr_data); - read_attr_map(attr_data, attrs); - - if (args.size() == 1) { - // a filename was given, if it has attributes, print them - file_path path = file_path_external(idx(args,0)); - attr_map::const_iterator i = attrs.find(path); - if (i == attrs.end()) return; - - for (std::map::const_iterator j = i->second.begin(); - j != i->second.end(); ++j) - output << j->first << std::endl; - } - else { - for (attr_map::const_iterator i = attrs.begin(); i != attrs.end(); ++i) - { - output << (*i).first << std::endl; - } - } + if (args.size() == 1) + { + // a filename was given, if it has attributes, print them + split_path path; + file_path_external(idx(args,0)).split(path); + + if (current.has_node(path)) + { + node_t n = current.get_node(path); + for (full_attr_map_t::const_iterator i = n->attrs.begin(); + i != n->attrs.end(); ++i) + if (i->second.first) + output << i->first << std::endl; + } + } + else + { + for (node_map::const_iterator i = current.all_nodes().begin(); + i != current.all_nodes().end(); ++i) + { + if (!i->second->attrs.empty()) + { + split_path path; + current.get_name(i->first, path); + output << file_path(path) << std::endl; + } + } + } } // Name: toposort ======================================================================== --- database_check.cc 3635697e22e75bdf7eed8d61a77fb48fdcb151da +++ database_check.cc 91484f8c51ca3e6010adbd800401f3ec9763222c @@ -123,6 +123,8 @@ I(checked_files.size() == files.size()); } +/* FIXME_ROSTERS + static void check_manifests(app_state & app, std::map & checked_manifests, @@ -179,6 +181,8 @@ I(checked_manifests.size() == manifests.size()); } +*/ + static void check_revisions(app_state & app, std::map & checked_revisions, @@ -689,7 +693,8 @@ size_t bad_sigs = 0; check_files(app, checked_files); - check_manifests(app, checked_manifests, checked_files); + // FIXME_ROSTERS + //check_manifests(app, checked_manifests, checked_files); check_revisions(app, checked_revisions, checked_manifests); check_ancestry(app, checked_revisions); check_sane(app, checked_revisions);