CBVGAARCMKJ2EARAQCVSPKMB43NATIYEY76BOQJLN7MXDUQVSJBAC
RRCSHAYZ6RLWVPNYHF2F5FSRL2KKJNPQUQRIJYLJGB23BZQQ7JLQC
SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC
352WW5FPLUBGEHM7W5WF7N7AMO56LPLL4WSR44VIPCSZVQRDLN4AC
CCFJ7VO3I73FE3MZRS5RSDRYNZVW7AXC345P4BXS7JIL2TU3LQJQC
CCLLB7OIFNFYJZTG3UCI7536TOCWSCSXR67VELSB466R24WLJSDAC
ZSF3YFZTDOXMCOC3HOT5C6MQLYLWOR7QJAOUDS2M2Z4SC2YW3GRAC
Q3GU26WDEYE2HXMM4WWNEGVMSXLQAKRJBSB2EJZA6JTHPKQHXCXQC
XR7MNOMU5PMOOEY2EPPUABZ7NOP432RDCWUET23ONPXTT3JQIFIAC
VO5OQW4W2656DIYYRNZ3PO7TQ4JOKQ3GVWE5ALUTYVMX3WMXJOYQC
pub fn local(&self) -> Option<&Local> {
match self {
Hunk::Edit { ref local, .. }
| Hunk::Replacement { ref local, .. }
| Hunk::SolveOrderConflict { ref local, .. }
| Hunk::UnsolveOrderConflict { ref local, .. }
| Hunk::ResurrectZombies { ref local, .. } => Some(local),
_ => None,
}
}
match self {
Hunk::FileMove { .. }
| Hunk::FileDel { .. }
| Hunk::FileUndel { .. }
| Hunk::SolveNameConflict { .. }
| Hunk::UnsolveNameConflict { .. }
| Hunk::FileAdd { .. } => None,
Hunk::Edit { ref local, .. }
| Hunk::Replacement { ref local, .. }
| Hunk::SolveOrderConflict { ref local, .. }
| Hunk::UnsolveOrderConflict { ref local, .. }
| Hunk::ResurrectZombies { ref local, .. } => Some(local.line),
}
self.local().map(|x| x.line)
Hunk::FileMove { del, add, path } => Hunk::FileMove {
del: del.globalize(txn)?,
add: add.globalize(txn)?,
BaseHunk::FileMove { del, add, path } => BaseHunk::FileMove {
del: f(del)?,
add: f(add)?,
} => Hunk::FileDel {
del: del.globalize(txn)?,
contents: contents.as_ref().map(|del| del.globalize(txn).unwrap()),
} => BaseHunk::FileDel {
del: f(del)?,
contents: if let Some(c) = contents {
Some(f(c)?)
} else {
None
},
} => Hunk::FileUndel {
undel: undel.globalize(txn)?,
contents: contents.as_ref().map(|del| del.globalize(txn).unwrap()),
} => BaseHunk::FileUndel {
undel: f(undel)?,
contents: if let Some(c) = contents {
Some(f(c)?)
} else {
None
},
Hunk::SolveNameConflict { name, path } => Hunk::SolveNameConflict {
name: name.globalize(txn)?,
BaseHunk::SolveNameConflict { name, path } => BaseHunk::SolveNameConflict {
name: f(name)?,
Hunk::UnsolveNameConflict { name, path } => Hunk::UnsolveNameConflict {
name: name.globalize(txn)?,
BaseHunk::UnsolveNameConflict { name, path } => BaseHunk::UnsolveNameConflict {
name: f(name)?,
} => Hunk::FileAdd {
add_name: add_name.globalize(txn)?,
add_inode: add_inode.globalize(txn)?,
contents: contents.as_ref().map(|add| add.globalize(txn).unwrap()),
} => BaseHunk::FileAdd {
add_name: f(add_name)?,
add_inode: f(add_inode)?,
contents: if let Some(c) = contents {
Some(f(c)?)
} else {
None
},
} => Hunk::Replacement {
change: change.globalize(txn)?,
replacement: replacement.globalize(txn)?,
} => BaseHunk::Replacement {
change: f(change)?,
replacement: f(replacement)?,
Hunk::SolveOrderConflict { change, local } => Hunk::SolveOrderConflict {
change: change.globalize(txn)?,
BaseHunk::SolveOrderConflict { change, local } => BaseHunk::SolveOrderConflict {
change: f(change)?,
Hunk::UnsolveOrderConflict { change, local } => Hunk::UnsolveOrderConflict {
change: change.globalize(txn)?,
BaseHunk::UnsolveOrderConflict { change, local } => BaseHunk::UnsolveOrderConflict {
change: f(change)?,