Browse Source

First removing bundles, then adding new ones

pull/10/head
Dennis Schwerdel 5 years ago
parent
commit
3db78a64c5
  1. 16
      src/repository/mod.rs

16
src/repository/mod.rs

@ -120,14 +120,6 @@ impl Repository {
};
if !rebuild_bundle_map {
let mut save_bundle_map = false;
if !new.is_empty() {
info!("Adding {} new bundles to index", new.len());
try!(repo.write_mode());
for bundle in ProgressIter::new("adding bundles to index", new.len(), new.into_iter()) {
try!(repo.add_new_remote_bundle(bundle))
}
save_bundle_map = true;
}
if !gone.is_empty() {
info!("Removig {} old bundles from index", gone.len());
try!(repo.write_mode());
@ -136,6 +128,14 @@ impl Repository {
}
save_bundle_map = true;
}
if !new.is_empty() {
info!("Adding {} new bundles to index", new.len());
try!(repo.write_mode());
for bundle in ProgressIter::new("adding bundles to index", new.len(), new.into_iter()) {
try!(repo.add_new_remote_bundle(bundle))
}
save_bundle_map = true;
}
if save_bundle_map {
try!(repo.write_mode());
try!(repo.save_bundle_map());

Loading…
Cancel
Save