protected override void OnNotify(SvnNotifyEventArgs e) { base.OnNotify(e); string path = e.FullPath; SvnClientAction action; if (!_changes.TryGetValue(path, out action)) { _changes.Add(path, action = new SvnClientAction(path)); } switch (e.Action) { case SvnNotifyAction.Revert: case SvnNotifyAction.TreeConflict: action.Recursive = true; break; case SvnNotifyAction.UpdateDelete: action.Recursive = true; action.AddOrRemove = true; break; case SvnNotifyAction.UpdateReplace: case SvnNotifyAction.UpdateAdd: action.AddOrRemove = true; break; case SvnNotifyAction.UpdateUpdate: action.OldRevision = e.OldRevision; break; } }
protected override void OnNotify(SvnNotifyEventArgs e) { base.OnNotify(e); if (e.Uri != null) { return; } string path = e.FullPath; if (string.IsNullOrEmpty(path)) { return; } SvnClientAction action; if (!_changes.TryGetValue(path, out action)) { _changes.Add(path, action = new SvnClientAction(path)); } switch (e.Action) { case SvnNotifyAction.CommitDeleted: case SvnNotifyAction.Revert: case SvnNotifyAction.TreeConflict: case SvnNotifyAction.UpgradedDirectory: action.Recursive = true; break; case SvnNotifyAction.UpdateDelete: action.Recursive = true; action.AddOrRemove = true; break; case SvnNotifyAction.UpdateReplace: case SvnNotifyAction.UpdateAdd: action.AddOrRemove = true; break; case SvnNotifyAction.UpdateUpdate: action.OldRevision = e.OldRevision; break; } }
protected override void OnNotify(SvnNotifyEventArgs e) { base.OnNotify(e); string path = e.FullPath; if (string.IsNullOrEmpty(path)) return; SvnClientAction action; if (!_changes.TryGetValue(path, out action)) _changes.Add(path, action = new SvnClientAction(path)); switch (e.Action) { case SvnNotifyAction.CommitDeleted: case SvnNotifyAction.Revert: case SvnNotifyAction.TreeConflict: action.Recursive = true; break; case SvnNotifyAction.UpdateDelete: action.Recursive = true; action.AddOrRemove = true; break; case SvnNotifyAction.UpdateReplace: case SvnNotifyAction.UpdateAdd: action.AddOrRemove = true; break; case SvnNotifyAction.UpdateUpdate: action.OldRevision = e.OldRevision; break; } }
protected override void OnCommitting(SvnCommittingEventArgs e) { base.OnCommitting(e); if (e.CurrentCommandType != SvnCommandType.Commit) return; foreach (SvnCommitItem item in e.Items) { string fp = item.FullPath; if (fp == null) // Non local operation return; SvnClientAction action; if (!_changes.TryGetValue(fp, out action)) _changes.Add(fp, action = new SvnClientAction(fp)); } }