void HandleChangesWithRemove(IEnumerable <FileObjectMapping> mappings, Package.ChangeList changeAg, ProgressLeaf progressLeaf) { HandleCopy(changeAg.Copy, changeAg.StatusDic); HandleRemove(changeAg.Remove, changeAg.StatusDic); HandleChangedCase(changeAg.ChangedCase, changeAg.StatusDic); HandleModify(Convert(mappings, changeAg.GetModified()).ToArray(), changeAg.StatusDic, progressLeaf); }
void PrintDetailedChanges(Package.ChangeList changeAg, bool withRemoval) { var overview = new StringBuilder(); var full = new StringBuilder(); BuildLogInfos(changeAg.Equal, overview, full, changeAg.Copy, changeAg.Update, withRemoval ? changeAg.Remove : new List <string>(), changeAg.New, changeAg.ChangedCase); this.Logger().Info(full.ToString()); Repository.Log(overview.ToString()); }
// TODO: Make this a Verifying progress state? void ConfirmChanges(bool withRemoval, IOrderedEnumerable <FileObjectMapping> mappings) { var afterChangeAg = new Package.ChangeList(GetWorkingPathFiles(withRemoval, mappings), mappings, this); if (!afterChangeAg.HasChanges(withRemoval)) { return; } PrintDetailedChanges(afterChangeAg, withRemoval); throw new ChecksumException("See log for details"); }
Package.ChangeList GetInitialChangeList(bool withRemoval, IOrderedEnumerable <FileObjectMapping> mappings) { var workingPathFiles = GetWorkingPathFiles(withRemoval, mappings); var changeAg = new Package.ChangeList(workingPathFiles, mappings, this); PrintChangeOverview(workingPathFiles, mappings); Console.WriteLine(); PrintDetailedChanges(changeAg, withRemoval); return(changeAg); }