예제 #1
0
        void IBranchMenuOperations.CreateBranch()
        {
            RepositorySpec repSpec    = BranchesSelection.GetSelectedRepository(mBranchesListView);
            BranchInfo     branchInfo = BranchesSelection.GetSelectedBranch(mBranchesListView);

            BranchCreationData branchCreationData = CreateBranchDialog.CreateBranchFromLastParentBranchChangeset(
                mParentWindow,
                repSpec,
                branchInfo);

            mBranchOperations.CreateBranch(branchCreationData, RefreshAsset.UnityAssetDatabase);
        }
예제 #2
0
        void IBranchMenuOperations.CreateBranch()
        {
            RepositorySpec repSpec    = BranchesSelection.GetSelectedRepository(mBranchesListView);
            BranchInfo     branchInfo = BranchesSelection.GetSelectedBranch(mBranchesListView);

            BranchCreationData branchCreationData = CreateBranchDialog.CreateBranchFromLastParentBranchChangeset(
                mParentWindow,
                repSpec,
                branchInfo);

            mBranchOperations.CreateBranch(branchCreationData, () =>
            {
                TrackFeatureUseEvent.For(
                    repSpec,
                    TrackFeatureUseEvent.Features.CreateBranch);
            });
        }
예제 #3
0
        internal static BranchCreationData CreateBranchFromLastParentBranchChangeset(
            EditorWindow parentWindow,
            RepositorySpec repSpec,
            BranchInfo parentBranchInfo)
        {
            string changesetStr = PlasticLocalization.GetString(
                PlasticLocalization.Name.LastChangeset);

            string explanation = BranchCreationUserInfo.GetFromObjectString(
                repSpec, parentBranchInfo, changesetStr);

            CreateBranchDialog dialog         = Create(repSpec, parentBranchInfo, explanation);
            ResponseType       dialogueResult = dialog.RunModal(parentWindow);

            BranchCreationData result = dialog.BuildCreationData();

            result.Result = dialogueResult == ResponseType.Ok;
            return(result);
        }