Example #1
0
        /// <exception cref="NGit.Api.Errors.JGitInternalException"></exception>
        /// <exception cref="NGit.Api.Errors.RefAlreadyExistsException"></exception>
        /// <exception cref="NGit.Api.Errors.RefNotFoundException"></exception>
        /// <exception cref="NGit.Api.Errors.InvalidRefNameException"></exception>
        public virtual Ref CreateBranch(Git actGit, string name, bool force, string startPoint
			, CreateBranchCommand.SetupUpstreamMode? mode)
        {
            CreateBranchCommand cmd = actGit.BranchCreate();
            cmd.SetName(name);
            cmd.SetForce(force);
            cmd.SetStartPoint(startPoint);
            cmd.SetUpstreamMode(mode != null ? mode.Value : CreateBranchCommand.SetupUpstreamMode.NOT_SET);
            return cmd.Call();
        }
Example #2
0
 private void OnToolStripButtonCreateBranchClick(object sender, EventArgs e)
 {
     SvnExplorer svnExplorer = new SvnExplorer();
     svnExplorer.TrunkSubTagOrSubBranchOnly = true;
     if (svnExplorer.ShowDialog(this) == DialogResult.OK)
     {
         IUICommand command = new CreateBranchCommand(svnExplorer.GetSvnExplorerSelection());
         RunSynchronousCommand(command);
     }
 }