Inheritance: ScmRepository
Ejemplo n.º 1
0
        private void AddFile(string fileName)
        {
            string path = Path.GetDirectoryName(fileName);

            if (!folders.ContainsPath(fileName))
            {
                if (Directory.Exists(path + @"\.svn") || Directory.Exists(path + @"\_svn"))
                {
                    SvnRepository repo = new SvnRepository(fileName, ScmRepository.PathType.File);
                    folders.Add(repo);

                    listViewFolders.Items.Add(new ListViewItem(fileName, repo.IconName));
                    UpdateListViewFolderNames();

                    Config.SaveSvnFolders(folders);

                    UpdateTray(false);
                    BeginUpdateFolderStatuses();
                }
                else
                {
                    MessageBox.Show("This file is not under SCM", "SCM Notifier", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else
            {
                SelectFolder(fileName);
            }
        }
Ejemplo n.º 2
0
 public static ScmRepository create(string path)
 {
     if (SvnRepository.IsSvnRepositoryDir(path))
     {
         return(new SvnRepository(path, ScmRepository.PathType.Directory));
     }
     if (GitRepository.IsGitRepositoryDir(path))
     {
         return(new GitRepository(path, ScmRepository.PathType.Directory));
     }
     return(null);
 }
Ejemplo n.º 3
0
        private void AddFile(string fileName)
        {
            string path = Path.GetDirectoryName(fileName);

            if (!folders.ContainsPath(fileName))
            {
                if (Directory.Exists(path + @"\.svn") || Directory.Exists(path + @"\_svn"))
                {
                    SvnRepository repo = new SvnRepository(fileName, ScmRepository.PathType.File);
                    folders.Add(repo);

                    listViewFolders.Items.Add(new ListViewItem(fileName, repo.IconName));
                    UpdateListViewFolderNames();

                    Config.SaveSvnFolders(folders);

                    UpdateTray(false);
                    BeginUpdateFolderStatuses();
                }
                else
                {
                    MessageBox.Show("This file is not under SCM", "SCM Notifier", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else
                SelectFolder(fileName);
        }