# # patch "manifest.cc" # from [2695b611dfe537d04d667bdf1b6de27c2ce9b155] # to [cfa44e867c9068323e6cfe566b69d2e84f103264] # # patch "work.hh" # from [20134a58bcfbd026e89d495521c56422cc620c6f] # to [7d962298e1f4f0e65ec9b058caeb0f1db5b881fd] # --- manifest.cc +++ manifest.cc @@ -58,89 +58,7 @@ man.insert(manifest_entry(path, file_id(ident))); } -inline static bool -inodeprint_unchanged(inodeprint_map const & ipm, file_path const & path) -{ - inodeprint_map::const_iterator old_ip = ipm.find(path); - if (old_ip != ipm.end()) - { - hexenc ip; - if (inodeprint_file(path, ip) && ip == old_ip->second) - return true; // unchanged - else - return false; // changed or unavailable - } - else - return false; // unavailable -} - void -classify_paths(app_state & app, - path_set const & paths, - manifest_map const & m_old, - path_set & missing, - path_set & changed, - path_set & unchanged) -{ - 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 - - for (path_set::const_iterator i = paths.begin(); i != paths.end(); ++i) - { - 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... - if (inodeprint_unchanged(ipm, *i)) - { - // the inode fingerprint hasn't changed, so we assume the file - // hasn't either. - manifest_map::const_iterator k = m_old.find(*i); - I(k != m_old.end()); - unchanged.insert(*i); - continue; - } - - // ...ah, well, no good fingerprint, just check directly. - if (file_exists(*i)) - { - hexenc ident; - calculate_ident(*i, ident, app.lua); - manifest_map::const_iterator k = m_old.find(*i); - - if (k != m_old.end()) - { - if (ident == k->second.inner()) - unchanged.insert(*i); - else - changed.insert(*i); - } - - // if the path was not found in the old manifest it must have - // been added or renamed ad it's ignored here - - } - else - missing.insert(*i); - } - else - { - // changes to excluded files are ignored - unchanged.insert(*i); - } - } -} - -void extract_path_set(manifest_map const & man, path_set & paths) { paths.clear(); --- work.hh +++ work.hh @@ -129,8 +129,6 @@ void enable_inodeprints(); -void enable_inodeprints(); - // the "attribute map" is part of a working copy. it is *not* stored in MT, // because its contents are considered part of the "content" of a tree of // files. it is therefore stored in .mt-attrs, in the root of your