/// <summary>
        /// Called just before a file in a project is renamed
        /// </summary>
        /// <param name="project">The SCC project.</param>
        /// <param name="oldName">The old name.</param>
        /// <param name="newName">The new name.</param>
        /// <param name="flags">The flags.</param>
        /// <param name="ok">if set to <c>true</c> [ok].</param>
        internal void OnBeforeProjectRenameFile(IVsSccProject2 project, string oldName, string newName, VSQUERYRENAMEFILEFLAGS flags, out bool ok)
        {
            ok = true;

            if (!_projectMap.ContainsKey(project))
                return; // Not managed by us

            if (!IsActive)
                return;

            using (GitSccContext git = new GitSccContext(Context))
            {
                if (!git.CouldAdd(newName, GitNodeKind.File))
                {
                    ok = false;
                    return;
                }

                if (git.IsUnversioned(oldName))
                    return;
            }
        }
        internal void OnBeforeSolutionRenameFile(string oldName, string newName, VSQUERYRENAMEFILEFLAGS flags, out bool ok)
        {
            ok = true;
            if (!IsActive)
                return;

            //if (IsProjectFileOrSolution(oldName))
            //{
            //    // TODO: Is enlisted -> Ask user!
            //}

            using (GitSccContext git = new GitSccContext(Context))
            {
                if (!git.CouldAdd(newName, GitNodeKind.File))
                {
                    ok = false;
                    return;
                }

                if (git.IsUnversioned(oldName))
                    return;
            }
        }
 protected bool GitCanAddPath(string fullpath, GitNodeKind nodeKind)
 {
     using (GitSccContext git = new GitSccContext(Context))
     {
         // Determine if we could add fullname
         if (!git.CouldAdd(fullpath, nodeKind))
         {
             if (git.BelowAdminDir(fullpath))
                 _batchErrors.Add(string.Format(Resources.GitPathXBlocked, fullpath));
             else
                 _batchErrors.Add(string.Format(Resources.PathXBlocked, fullpath));
             return false;
         }
         else
             return true;
     }
 }