# # # patch "work.cc" # from [e0fe90634bfe1aa58632bfbb9158416a793b5e08] # to [04389e4274f38d0b2bc866c6938d53bbda5e8a2f] # # patch "work.hh" # from [49bf298fac3d660308c2b7106ff46854546401bd] # to [8ba21b48a4ac6d7c479b6116f0da96dcbf902f66] # ============================================================ --- work.cc e0fe90634bfe1aa58632bfbb9158416a793b5e08 +++ work.cc 04389e4274f38d0b2bc866c6938d53bbda5e8a2f @@ -1048,80 +1048,7 @@ add_parent_dirs(file_path const & dst, r // updating rosters from the workspace -// TODO: unchanged, changed, missing might be better as set - -// note that this does not take a restriction because it is used only by -// automate_inventory which operates on the entire, unrestricted, working -// directory. - void -workspace::classify_roster_paths(roster_t const & ros, - set & unchanged, - set & changed, - set & missing) -{ - temp_node_id_source nis; - inodeprint_map ipm; - - if (in_inodeprints_mode()) - { - data dat; - read_inodeprints(dat); - read_inodeprint_map(dat, ipm); - } - - // this code is speed critical, hence the use of inode fingerprints so be - // careful when making changes in here and preferably do some timing tests - - if (!ros.has_root()) - return; - - node_map const & nodes = ros.all_nodes(); - for (node_map::const_iterator i = nodes.begin(); i != nodes.end(); ++i) - { - node_id nid = i->first; - node_t node = i->second; - - file_path fp; - ros.get_name(nid, fp); - - // if this node is a file, check the inodeprint cache for changes - if (!is_dir_t(node) && inodeprint_unchanged(ipm, fp)) - { - unchanged.insert(fp); - continue; - } - - // if the node is a directory, check if it exists - // directories do not have content changes, thus are inserted in the - // unchanged set - if (is_dir_t(node)) - { - if (directory_exists(fp)) - unchanged.insert(fp); - else - missing.insert(fp); - continue; - } - - // the node is a file, check if it exists and has been changed - file_t file = downcast_to_file_t(node); - file_id fid; - if (ident_existing_file(fp, fid)) - { - if (file->content == fid) - unchanged.insert(fp); - else - changed.insert(fp); - } - else - { - missing.insert(fp); - } - } -} - -void workspace::update_current_roster_from_filesystem(roster_t & ros) { update_current_roster_from_filesystem(ros, node_restriction()); ============================================================ --- work.hh 49bf298fac3d660308c2b7106ff46854546401bd +++ work.hh 8ba21b48a4ac6d7c479b6116f0da96dcbf902f66 @@ -124,13 +124,6 @@ struct workspace // revision. void get_parent_rosters(parent_map & parents); - // Inspect the workspace and classify all the paths in it according to - // what ROS thinks of them. - void classify_roster_paths(roster_t const & ros, - std::set & unchanged, - std::set & changed, - std::set & missing); - // This updates the file-content hashes in ROSTER, which is assumed to be // the "current" roster returned by one of the above get_*_roster_shape // functions. If a node_restriction is provided, only the files matching