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); }
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); }); }
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); }