##// END OF EJS Templates
rhg: avoid calculating copies for status --no-status...
rhg: avoid calculating copies for status --no-status This changes how rhg status avoids printing copies with --no-status. Originally 668a871454e8 added a check right before printing copies. This changes it to match Python and check it earlier by defining `list_copies = ... && !no_status`. This makes no difference now, but when we implement --rev --rev --copies it will ensure we don't do wasteful copy tracing when it's not going to be printed.

File last commit:

r53063:1a8466fd default
r53239:53dc147b default
Show More
fncache.rs
26 lines | 1.1 KiB | application/rls-services+xml | RustLexer
use std::path::Path;
use dyn_clone::DynClone;
/// The FnCache stores the list of most files contained in the store and is
/// used for stream/copy clones.
///
/// It keeps track of the name of "all" indexes and data files for all revlogs.
/// The names are relative to the store roots and are stored before any
/// encoding or path compression.
///
/// Despite its name, the FnCache is *NOT* a cache, it keep tracks of
/// information that is not easily available elsewhere. It has no mechanism
/// for detecting isn't up to date, and de-synchronization with the actual
/// contents of the repository will lead to a corrupted clone and possibly
/// other corruption during maintenance operations.
/// Strictly speaking, it could be recomputed by looking at the contents of all
/// manifests AND actual store files on disk, however that is a
/// prohibitively expensive operation.
pub trait FnCache: Sync + Send + DynClone {
/// Whether the fncache was loaded from disk
fn is_loaded(&self) -> bool;
/// Add a path to be tracked in the fncache
fn add(&self, path: &Path);
// TODO add more methods once we start doing more with the FnCache
}