Avoid converting between base32 and hash in pijul::commands::unrecord
[?]
Jan 8, 2021, 1:50 PM
EGSVRZJVIBSPYAI65A25CH5RYAGL4PUP3B24VSRUS3M4WIUCZWHACDependencies
- [2]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [3]
SLJ3OHD4unrecord: show list of changes if none were given as arguments - [4]
GHO6DWPIRefactoring iterators - [5]
YAJAXIV5Unrecording changes atomically - [6]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [7]
5DVRL6MFHard-unrecord - [8]
I52XSRUHMassive cleanup, and simplification
Change contents
- replacement in pijul/src/commands/unrecord.rs at line 48
let hashes = if self.change_id.is_empty() {let mut hashes = Vec::new();if self.change_id.is_empty() { - replacement in pijul/src/commands/unrecord.rs at line 66
let hashes = txnlet hashes_ = txn - replacement in pijul/src/commands/unrecord.rs at line 71
let o = make_changelist(&repo.changes, &hashes, "unrecord")?;parse_changelist(&edit::edit_bytes(&o[..])?).iter().map(|h| h.to_base32()).collect::<_>()let o = make_changelist(&repo.changes, &hashes_, "unrecord")?;for h in parse_changelist(&edit::edit_bytes(&o[..])?).iter() {hashes.push((*h, txn.get_internal(*h)?.unwrap()))} - replacement in pijul/src/commands/unrecord.rs at line 76
self.change_idfor c in self.change_id.iter() {let (hash, cid) = txn.hash_from_prefix(c)?;hashes.push((hash, cid))} - replacement in pijul/src/commands/unrecord.rs at line 83
for c in hashes {let (hash, change_id) = txn.hash_from_prefix(&c)?;for (hash, change_id) in hashes { - replacement in pijul/src/commands/unrecord.rs at line 87
changes.push((hash, change_id, n, c));changes.push((hash, change_id, n)); - replacement in pijul/src/commands/unrecord.rs at line 91
for (hash, change_id, _, c) in changes {for (hash, change_id, _) in changes { - replacement in pijul/src/commands/unrecord.rs at line 105
chash.to_base32() - replacement in pijul/src/commands/unrecord.rs at line 110
c,hash.to_base32(),