public void Log(string[] paths, Revision start, Revision end,
		                int limit, bool discoverChangePaths, bool strictNodeHistory,
		                Action<LogMessage> logMessageReceiver)
		{
			Debug("SVN: Log({" + string.Join(",", paths) + "}, " + start + ", " + end +
			      ", " + limit + ", " + discoverChangePaths + ", " + strictNodeHistory + ")");
			BeforeOperation("log");
			try {
				client.Log(
					paths,
					new SvnLogArgs {
						Start = start,
						End = end,
						Limit = limit,
						RetrieveChangedPaths = discoverChangePaths,
						StrictNodeHistory = strictNodeHistory
					},
					delegate (object sender, SvnLogEventArgs e) {
						try {
							Debug("SVN: Log: Got revision " + e.Revision);
							LogMessage msg = new LogMessage() {
								Revision = e.Revision,
								Author = e.Author,
								Date = e.Time,
								Message = e.LogMessage
							};
							if (discoverChangePaths) {
								msg.ChangedPaths = new List<ChangedPath>();
								foreach (var entry in e.ChangedPaths) {
									msg.ChangedPaths.Add(new ChangedPath {
									                     	Path = entry.Path,
									                     	CopyFromPath = entry.CopyFromPath,
									                     	CopyFromRevision = entry.CopyFromRevision,
									                     	Action = entry.Action
									                     });
								}
							}
							logMessageReceiver(msg);
						} catch (Exception ex) {
							MessageService.ShowError(ex);
						}
					}
				);
				Debug("SVN: Log finished");
			} catch (SvnOperationCanceledException) {
				// allow cancel without exception
			} catch (SvnException ex) {
				throw new SvnClientException(ex);
			} finally {
				AfterOperation();
			}
		}
Пример #2
0
		void ShowDiff()
		{
			Disable();
			
			if (leftListView.SelectedItems.Count == 0 || rightListView.SelectedItems.Count == 0 ) {
				return;
			}
			
			fromRevision = leftListView.SelectedItems[0].Tag as Revision;
			toRevision   = rightListView.SelectedItems[0].Tag as Revision;
			fileName     = Path.GetFullPath(viewContent.PrimaryFileName);
			
			if (fromRevision.ToString() == toRevision.ToString()) {
				output = "";
			} else {
				//SvnClient.Instance.OperationStart("Diff", DoDiffOperation);
			}
		}