Пример #1
0
        private IVcsWrapper CreateVcsWrapper(Encoding commitEncoding)
        {
            Invoke((MethodInvoker) delegate
                   { if (transcodeCheckBox.Checked)
                     {
                         commitEncoding = Encoding.UTF8;
                     }
                   });
            string repoPath = outDirTextBox.Text;
            string vcsType  = vcsSetttingsTabs.SelectedTab.Text;

            if (vcsType.Equals(vcsTypeGit))
            {
                GitWrapper wrapper = new GitWrapper(repoPath, logger, commitEncoding, forceAnnotatedCheckBox.Checked);
                wrapper.GitIgnoreInfo = $"{ignoreFile.Text}|{attributesFile.Text}|{userName.Text}|{userEmail.Text}|{initialComment.Text}";
                return(wrapper);
            }
            else if (vcsType.Equals(vcsTypeSvn))
            {
                bool   stdLayout = svnStandardLayoutCheckBox.Checked;
                string trunk     = stdLayout ? SvnWrapper.stdTrunk : svnTrunkTextBox.Text;
                string tags      = stdLayout ? SvnWrapper.stdTags : svnTagsTextBox.Text;
                string branches  = stdLayout ? SvnWrapper.stdBranches : svnBranchesTextBox.Text;
                var    wrapper   = new SvnWrapper(repoPath, svnRepoTextBox.Text, svnProjectPathTextBox.Text,
                                                  trunk, tags, branches, logger);
                wrapper.SetCredentials(svnUserTextBox.Text, svnPasswordTextBox.Text);
                return(wrapper);
            }
            throw new ArgumentOutOfRangeException("vcsType", vcsType, "Undefined VCS Type");
        }
Пример #2
0
        private IVcsWrapper CreateVcsWrapper(Encoding commitEncoding)
        {
            string repoPath = outDirTextBox.Text;
            string vcsType  = vcsSetttingsTabs.SelectedTab.Text;

            if (vcsType.Equals(vcsTypeGit))
            {
                return(new GitWrapper(repoPath, logger, commitEncoding, forceAnnotatedCheckBox.Checked));
            }
            else if (vcsType.Equals(vcsTypeSvn))
            {
                bool   stdLayout = svnStandardLayoutCheckBox.Checked;
                string trunk     = stdLayout ? SvnWrapper.stdTrunk : svnTrunkTextBox.Text;
                string tags      = stdLayout ? SvnWrapper.stdTags : svnTagsTextBox.Text;
                string branches  = stdLayout ? SvnWrapper.stdBranches : svnBranchesTextBox.Text;
                var    wrapper   = new SvnWrapper(repoPath, svnRepoTextBox.Text, svnProjectPathTextBox.Text,
                                                  trunk, tags, branches, logger);
                wrapper.SetCredentials(svnUserTextBox.Text, svnPasswordTextBox.Text);
                return(wrapper);
            }
            throw new ArgumentOutOfRangeException("vcsType", vcsType, "Undefined VCS Type");
        }
Пример #3
0
 private IVcsWrapper CreateVcsWrapper(Encoding commitEncoding)
 {
     string repoPath = outDirTextBox.Text;
     string vcsType = vcsSetttingsTabs.SelectedTab.Text;
     if (vcsType.Equals(vcsTypeGit))
     {
         return new GitWrapper(repoPath, logger, commitEncoding, forceAnnotatedCheckBox.Checked);
     }
     else if (vcsType.Equals(vcsTypeSvn))
     {
         bool stdLayout = svnStandardLayoutCheckBox.Checked;
         string trunk = stdLayout ? SvnWrapper.stdTrunk : svnTrunkTextBox.Text;
         string tags = stdLayout ? SvnWrapper.stdTags : svnTagsTextBox.Text;
         string branches = stdLayout ? SvnWrapper.stdBranches : svnBranchesTextBox.Text;
         var wrapper = new SvnWrapper(repoPath, svnRepoTextBox.Text, svnProjectPathTextBox.Text,
             trunk, tags, branches, logger);
         wrapper.SetCredentials(svnUserTextBox.Text, svnPasswordTextBox.Text);
         return wrapper;
     }
     throw new ArgumentOutOfRangeException("vcsType", vcsType, "Undefined VCS Type");
 }