Fixing apply (ghost channels could happen in case of error)
Dependencies
- [2]
3XMVMFPTFixing an error (ChannelRc) when checking that apply is nondestructive - [3]
R3H7D42UDebugging `pijul git`: proper error reporting - [4]
MDADYULSFix a panic when switching between channels that have different files - [5]
I24UEJQLVarious post-fire fixes - [6]
26VQKD25A more accurate safeguard for apply, to check if the output is nondestructive - [7]
Y6EVFMTADon't output files if they aren't in the current channel - [8]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [9]
XA23FMQMReset only files that have been modified - [10]
LGEJSLTYFixing output (including its uses in reset and pull) - [11]
EUZFFJSOUpdating Pijul with the latest changes in Libpijul - [12]
ISZ65SPQChecking that `pijul apply` does not destroy unrecorded changes
Change contents
- replacement in pijul/src/commands/apply.rs at line 61
// Channel used to check if we can output the repo.let forked_s: String = rand::thread_rng().sample_iter(&rand::distributions::Alphanumeric).take(20).map(char::from).collect();let forked = txn.write().fork(&channel, &forked_s)?;// Forked channel before the apply, in order to check whether// we are overwriting a path.let forked = if is_current_channel {let forked_s: String = rand::thread_rng().sample_iter(&rand::distributions::Alphanumeric).take(20).map(char::from).collect();let forked = txn.write().fork(&channel, &forked_s)?;Some((forked_s, forked))} else {None}; - replacement in pijul/src/commands/apply.rs at line 129
if is_current_channel {if let Some((_, ref forked)) = forked { - edit in pijul/src/commands/apply.rs at line 188
} else {std::mem::drop(forked);txn.write().drop_channel(&forked_s)?; - edit in pijul/src/commands/apply.rs at line 227
if let Some((forked_s, forked)) = forked {std::mem::drop(forked);txn.write().drop_channel(&forked_s)?;}