# # patch "ChangeLog" # from [16eaf2f39b3e7810dc6f96b82c707ee9533e9e4e] # to [e4802714bb6c994af8f40710cde72b7dd71216ba] # # patch "commands.cc" # from [65bd342331e14e65a0af0e73f480d0f5be591931] # to [745f6c0c04a1f46a01d97d5cb1e82384e0fc7882] # # patch "manifest.cc" # from [82408edf5ddadecd83e6b43bd7a8dc40e3f6d9b3] # to [63b95a89a40d5d8c24fda2e2103b31e53dc67026] # # patch "manifest.hh" # from [32ecf7dfe6decb959f38856418e5e572afa82cd2] # to [2665667c3cf960e64f39301fea45d1e4e67e5dba] # --- ChangeLog +++ ChangeLog @@ -3410,7 +3410,7 @@ * AUTHORS: Mention Wojciech and Neil. * revision.cc (calculate_ancestors_from_graph): Make non-recursive. -2005-01-17 Wojciech MiÂ‚kowski +2005-01-17 Wojciech Mi‚kowski * std_hooks.lua: Teach about meld. --- commands.cc +++ commands.cc @@ -597,7 +597,7 @@ apply_path_rearrangement(old_paths, cs->rearrangement, new_paths); - build_restricted_manifest_map(new_paths, m_old, m_new, missing_files, app); + build_restricted_manifest_map(new_paths, m_old, m_new, app); complete_change_set(m_old, m_new, *cs); calculate_ident(m_new, rev.new_manifest); --- manifest.cc +++ manifest.cc @@ -63,7 +63,6 @@ build_restricted_manifest_map(path_set const & paths, manifest_map const & m_old, manifest_map & m_new, - path_set & missing_files, app_state & app) { m_new.clear(); @@ -76,12 +75,11 @@ read_inodeprint_map(dat, ipm); } + size_t missing_files = 0; + for (path_set::const_iterator i = paths.begin(); i != paths.end(); ++i) { - bool exists = file_exists(*i); - bool included = app.restriction_includes(*i); - - if (included && exists) + if (app.restriction_includes(*i)) { // compute the current sha1 id for included files // we might be able to avoid it, if we have an inode fingerprint... @@ -101,20 +99,18 @@ } // ...ah, well, no good fingerprint, just check directly. - hexenc ident; - calculate_ident(*i, ident, app.lua); - m_new.insert(manifest_entry(*i, file_id(ident))); + if (file_exists(*i)) + { + hexenc ident; + calculate_ident(*i, ident, app.lua); + m_new.insert(manifest_entry(*i, file_id(ident))); + } + else + { + W(F("missing %s") % (*i)()); + missing_files++; + } } - else if (included && !exists) - { - missing_files.insert(*i); - - // copy the old manifest entry for missing files - manifest_map::const_iterator old = m_old.find(*i); - N(old != m_old.end(), - F("file missing but does not exist in old manifest: %s") % *i); - m_new.insert(*old); - } else { // copy the old manifest entry for excluded files --- manifest.hh +++ manifest.hh @@ -77,7 +77,6 @@ void build_restricted_manifest_map(path_set const & paths, manifest_map const & m_old, manifest_map & m_new, - path_set & missing_files, app_state & app); void read_manifest_map(data const & dat,