Esempio n. 1
0
        public async Task Execute(MergeModel mergeModel)
        {
            await CheckIfWorkspaceHasIncludedPendingChangesAsync(mergeModel.WorkspaceModel);

            await DoGetLatestOnBranchAsync(mergeModel.WorkspaceModel, mergeModel.SourceBranch, mergeModel.TargetBranch);

            SetCurrentAction(Resources.MergingBranches);
            await _mergeService.MergeBranches(mergeModel.WorkspaceModel, mergeModel.SourceBranch, mergeModel.TargetBranch, mergeModel.OrderedChangesetIds.First(), mergeModel.OrderedChangesetIds.Last());

            await _mergeService.AddWorkItemsAndNavigate(mergeModel.WorkspaceModel, mergeModel.OrderedChangesetIds);
        }
Esempio n. 2
0
        public async Task ExecuteAsync(MergeModel mergeModel)
        {
            await CheckIfWorkspaceHasIncludedPendingChangesAsync(mergeModel.WorkspaceModel);

            await DoGetLatestOnBranchAsync(mergeModel.WorkspaceModel, mergeModel.SourceBranch, mergeModel.TargetBranch);

            SetCurrentAction(Resources.MergingBranches);
            await _mergeService.MergeBranchesAsync(mergeModel.WorkspaceModel, mergeModel.SourceBranch, mergeModel.TargetBranch, mergeModel.OrderedChangesetIds.First(), mergeModel.OrderedChangesetIds.Last());

            var workItemIds = await GetWorkItemIdsAsync(mergeModel.OrderedChangesetIds);

            var comment = GetCommentForMerge(mergeModel.SourceBranch, mergeModel.TargetBranch, workItemIds, mergeModel.OrderedChangesetIds, mergeModel.IsLatestVersion);

            _teamExplorerService.AddWorkItemsAndCommentThenNavigate(mergeModel.WorkspaceModel, comment, workItemIds);
        }