Verbose printing of conflicts to stderr
Dependencies
- [2]
E7UUQQCCApply changes with prefixes in .pijul/changes - [3]
EUZFFJSOUpdating Pijul with the latest changes in Libpijul - [4]
QMTANHVNReset: only output changed files - [5]
L4JXJHWXpijul/*: reorganize imports and remove extern crate - [6]
Y6EVFMTADon't output files if they aren't in the current channel - [7]
2D7P2VKJChange completions (where the whole progress bar story started) - [8]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [9]
V435QOJRUsing path-slash to fix path issues on Windows - [10]
MDADYULSFix a panic when switching between channels that have different files - [11]
VO5OQW4WRemoving anyhow in libpijul - [12]
GHO6DWPIRefactoring iterators - [13]
VYHHOEYHVersions and formatting - [14]
YCEZL7VFMoving to temporary paths when outputting - [15]
FXEDPLRIResurrecting tests, and type cleanup (no need for Arc<RwLock<…>> anymore) - [16]
I24UEJQLVarious post-fire fixes - [17]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [18]
LGEJSLTYFixing output (including its uses in reset and pull) - [19]
2RXOCWUWMaking libpijul deterministic (and getting rid of `rand`) - [20]
3AMEP2Y5More convenient interface for channels - [*]
MU5GSJAWPartial push and pull (WARNING: breaks the existing protocol) - [*]
SLJ3OHD4unrecord: show list of changes if none were given as arguments
Change contents
- edit in pijul/src/commands/reset.rs at line 128
let mut conflicts = Vec::new(); - replacement in pijul/src/commands/reset.rs at line 188[4.10659]→[4.10659:10723](∅→∅),[4.10723]→[3.4704:4744](∅→∅),[3.4744]→[4.10770:10805](∅→∅),[4.10770]→[4.10770:10805](∅→∅),[4.10805]→[3.4745:4801](∅→∅),[3.4801]→[4.10875:10991](∅→∅),[4.10875]→[4.10875:10991](∅→∅),[4.10991]→[4.318:341](∅→∅),[4.341]→[4.10991:11011](∅→∅),[4.10991]→[4.10991:11011](∅→∅)
libpijul::output::output_repository_no_pending(&repo.working_copy,&repo.changes,&txn,&channel,&path,true,None,num_cpus::get(),0,)?;conflicts.extend(libpijul::output::output_repository_no_pending(&repo.working_copy,&repo.changes,&txn,&channel,&path,true,None,num_cpus::get(),0,)?.into_iter(),); - replacement in pijul/src/commands/reset.rs at line 204[4.11059]→[4.11059:11123](∅→∅),[4.11123]→[3.4802:4842](∅→∅),[3.4842]→[4.11162:11197](∅→∅),[4.11162]→[4.11162:11197](∅→∅),[4.11197]→[3.4843:4899](∅→∅),[3.4899]→[4.11259:11372](∅→∅),[4.11259]→[4.11259:11372](∅→∅),[4.11372]→[4.342:365](∅→∅),[4.365]→[4.11372:11392](∅→∅),[4.11372]→[4.11372:11392](∅→∅)
libpijul::output::output_repository_no_pending(&repo.working_copy,&repo.changes,&txn,&channel,"",true,None,num_cpus::get(),0,)?;conflicts.extend(libpijul::output::output_repository_no_pending(&repo.working_copy,&repo.changes,&txn,&channel,"",true,None,num_cpus::get(),0,)?.into_iter(),); - replacement in pijul/src/commands/reset.rs at line 233[4.452]→[4.11865:11929](∅→∅),[4.11865]→[4.11865:11929](∅→∅),[4.11929]→[3.4900:4940](∅→∅),[3.4940]→[4.11976:12011](∅→∅),[4.11976]→[4.11976:12011](∅→∅),[4.12011]→[3.4941:4997](∅→∅),[3.4997]→[4.12081:12197](∅→∅),[4.12081]→[4.12081:12197](∅→∅),[4.12197]→[4.366:389](∅→∅),[4.389]→[4.12197:12217](∅→∅),[4.12197]→[4.12197:12217](∅→∅)
libpijul::output::output_repository_no_pending(&repo.working_copy,&repo.changes,&txn,&channel,&path,true,None,num_cpus::get(),0,)?;conflicts.extend(libpijul::output::output_repository_no_pending(&repo.working_copy,&repo.changes,&txn,&channel,&path,true,None,num_cpus::get(),0,)?.into_iter(),); - edit in pijul/src/commands/reset.rs at line 250
super::print_conflicts(&conflicts)?; - edit in pijul/src/commands/pushpull.rs at line 532
super::print_conflicts(&conflicts)?; - edit in pijul/src/commands/mod.rs at line 296[2.1046][23.5215]
}use libpijul::Conflict;fn print_conflicts(conflicts: &[Conflict]) -> Result<(), std::io::Error> {if conflicts.is_empty() {return Ok(());}let mut w = termcolor::StandardStream::stderr(termcolor::ColorChoice::Auto);use std::io::Write;use termcolor::*;w.set_color(ColorSpec::new().set_fg(Some(Color::Red)))?;writeln!(w, "\nThere were conflicts:\n")?;w.set_color(ColorSpec::new().set_fg(None))?;for c in conflicts.iter() {match c {Conflict::Name { ref path } => writeln!(w, " - Name conflict on \"{}\"", path)?,Conflict::ZombieFile { ref path } => {writeln!(w, " - Path deletion conflict \"{}\"", path)?}Conflict::MultipleNames { ref path, .. } => {writeln!(w, " - File has multiple names: \"{}\"", path)?}Conflict::Zombie { ref path, ref line } => writeln!(w," - Deletion conflict in \"{}\" starting on line {}",path, line)?,Conflict::Cyclic { ref path, ref line } => writeln!(w," - Cycle conflict in \"{}\" starting on line {}",path, line)?,Conflict::Order { ref path, ref line } => writeln!(w," - Order conflict in \"{}\" starting on line {}",path, line)?,}}Ok(()) - edit in pijul/src/commands/archive.rs at line 1
use std::io::Write; - replacement in pijul/src/commands/archive.rs at line 139
if !conflicts.is_empty() {writeln!(std::io::stderr(),"There were {} conflicts",conflicts.len())?}super::print_conflicts(&conflicts)?; - edit in pijul/src/commands/apply.rs at line 128
let mut conflicts = Vec::new(); - replacement in pijul/src/commands/apply.rs at line 130[4.3430]→[4.23911:23975](∅→∅),[4.23975]→[3.18455:18495](∅→∅),[3.18495]→[4.3524:3559](∅→∅),[4.24022]→[4.3524:3559](∅→∅),[4.3524]→[4.3524:3559](∅→∅),[4.3559]→[3.18496:18552](∅→∅),[3.18552]→[4.3593:3672](∅→∅),[4.24093]→[4.3593:3672](∅→∅),[4.3593]→[4.3593:3672](∅→∅),[4.3672]→[4.24094:24131](∅→∅),[4.24131]→[4.1653:1676](∅→∅),[4.1676]→[4.3672:3692](∅→∅),[4.24131]→[4.3672:3692](∅→∅),[4.3672]→[4.3672:3692](∅→∅)
libpijul::output::output_repository_no_pending(&repo.working_copy,&repo.changes,&txn,&channel,&path,true,None,num_cpus::get(),0,)?;conflicts.extend(libpijul::output::output_repository_no_pending(&repo.working_copy,&repo.changes,&txn,&channel,&path,true,None,num_cpus::get(),0,)?.into_iter(),); - replacement in pijul/src/commands/apply.rs at line 146[4.3749]→[4.24132:24196](∅→∅),[4.24196]→[3.18553:18593](∅→∅),[3.18593]→[4.3843:3878](∅→∅),[4.24243]→[4.3843:3878](∅→∅),[4.3843]→[4.3843:3878](∅→∅),[4.3878]→[3.18594:18650](∅→∅),[3.18650]→[4.3912:3988](∅→∅),[4.24314]→[4.3912:3988](∅→∅),[4.3912]→[4.3912:3988](∅→∅),[4.3988]→[4.24315:24352](∅→∅),[4.24352]→[4.1677:1700](∅→∅),[4.1700]→[4.3988:4008](∅→∅),[4.24352]→[4.3988:4008](∅→∅),[4.3988]→[4.3988:4008](∅→∅)
libpijul::output::output_repository_no_pending(&repo.working_copy,&repo.changes,&txn,&channel,"",true,None,num_cpus::get(),0,)?;conflicts.extend(libpijul::output::output_repository_no_pending(&repo.working_copy,&repo.changes,&txn,&channel,"",true,None,num_cpus::get(),0,)?.into_iter(),); - edit in pijul/src/commands/apply.rs at line 162
super::print_conflicts(&conflicts)?; - replacement in libpijul/src/output/output.rs at line 19
Name { path: String },ZombieFile { path: String },MultipleNames { pos: Position<ChangeId> },Zombie { path: String, line: usize },Cyclic { path: String, line: usize },Order { path: String, line: usize },Name {path: String,},ZombieFile {path: String,},MultipleNames {pos: Position<ChangeId>,path: String,},Zombie {path: String,line: usize,},Cyclic {path: String,line: usize,},Order {path: String,line: usize,}, - replacement in libpijul/src/output/output.rs at line 204
let mut done_vertices = HashMap::default();let mut done_vertices: HashMap<_, (Vertex<ChangeId>, String)> = HashMap::default(); - replacement in libpijul/src/output/output.rs at line 229
match done_vertices.entry(output_item.pos) {let name_entry = match done_vertices.entry(output_item.pos) { - replacement in libpijul/src/output/output.rs at line 232
if *e.get() != name_key {if e.get().0 != name_key { - edit in libpijul/src/output/output.rs at line 235
path: e.get().1.clone(), - replacement in libpijul/src/output/output.rs at line 240
Entry::Vacant(e) => {e.insert(name_key);}}Entry::Vacant(e) => e,}; - edit in libpijul/src/output/output.rs at line 276
name_entry.insert((name_key, output_item.path.clone())); - replacement in libpijul/src/output/archive.rs at line 163
let mut done = HashMap::default();let mut done: HashMap<_, (Vertex<ChangeId>, String)> = HashMap::default(); - replacement in libpijul/src/output/archive.rs at line 182
match done.entry(output_item.pos) {let name_entry = match done.entry(output_item.pos) { - replacement in libpijul/src/output/archive.rs at line 185
if *e.get() != name_key {if e.get().0 != name_key { - edit in libpijul/src/output/archive.rs at line 188
path: e.get().1.clone(), - edit in libpijul/src/output/archive.rs at line 192
}Entry::Vacant(e) => {e.insert(name_key); - replacement in libpijul/src/output/archive.rs at line 193
}Entry::Vacant(e) => e,}; - edit in libpijul/src/output/archive.rs at line 210
name_entry.insert((name_key, output_item.path.clone()));