public static void HandleNotifications(SvnClientWrapper client) { client.Notify += delegate (object sender, NotificationEventArgs e) { AppendLine(e.Kind + e.Action + " " + e.Path); }; AsynchronousWaitDialog waitDialog = null; client.OperationStarted += delegate (object sender, SubversionOperationEventArgs e) { if (waitDialog == null) { waitDialog = AsynchronousWaitDialog.ShowWaitDialog("svn " + e.Operation); // waitDialog.Cancelled += delegate { // client.Cancel(); // }; } }; client.OperationFinished += delegate { if (waitDialog != null) { waitDialog.Dispose(); waitDialog = null; } }; }
public Stream OpenBaseVersion(string fileName) { if (!SvnClientWrapper.IsInSourceControl(fileName)) return null; using (var client = new SvnClientWrapper()) return client.OpenBaseVersion(fileName); }
public bool IsValid(object caller, Condition condition) { if (condition == null) { return false; } var selectedNode = ProjectBrowserPad.Instance?.SelectedNode; var fileSystemInfo = selectedNode?.GetNodeFileSystemInfo(); var workingCopyRoot = fileSystemInfo?.GetWorkingCopyRoot(); if (workingCopyRoot == null) { return false; } using (var client = new SvnClientWrapper()) { var multiStatus = client.MultiStatus(workingCopyRoot); var result = multiStatus.Any(pair => Modified.Contains(pair.Value.TextStatus)); return result; } }