Ejemplo n.º 1
0
        string GetActionText(GitNotifyAction action)
        {
            string actionText = action.ToString();

            switch (action)
            {
                case GitNotifyAction.UpdateAdd:
                case GitNotifyAction.UpdateDelete:
                case GitNotifyAction.UpdateReplace:
                case GitNotifyAction.UpdateUpdate:
                case GitNotifyAction.UpdateCompleted:
                case GitNotifyAction.UpdateExternal:
                    actionText = actionText.Substring(6);
                    break;
                case GitNotifyAction.CommitAdded:
                case GitNotifyAction.CommitDeleted:
                case GitNotifyAction.CommitModified:
                case GitNotifyAction.CommitReplaced:
                    actionText = actionText.Substring(6);
                    break;
                case GitNotifyAction.CommitSendData:
                    actionText = "Sending";
                    break;
                case GitNotifyAction.BlameRevision:
                    actionText = "Annotating";
                    break;
            }

            return actionText;
        }
Ejemplo n.º 2
0
 private void RaiseNotifyFromDiff(Repository repository, ICollection<string> paths, GitNotifyAction action)
 {
     foreach (string path in paths)
     {
         RaiseNotify(new GitNotifyEventArgs
         {
             Action = action,
             CommandType = Args.CommandType,
             ContentState = GitNotifyState.Unknown,
             FullPath = repository.GetAbsoluteRepositoryPath(path),
             NodeKind = GitNodeKind.Unknown
         });
     }
 }