Exemple #1
0
        public MergeResult Merge()
        {
            var mergeResult = MergeResult.Empty();

            if (this.MergeSet.IsNew)
            {
                mergeResult = mergeResult.Combine(this.MergeSet.Merge());
            }
            else
            {
                var selectedChangeSets = this.ChangeSets.Where(cs => cs.IsSelected)
                                         .OrderBy(cs => cs.Id)
                                         .ToArray();
                if (this.ChangeSets.Count() == selectedChangeSets.Length)
                {
                    mergeResult = mergeResult.Combine(this.MergeSet.Merge());
                }
                else
                {
                    foreach (var changeSet in selectedChangeSets)
                    {
                        mergeResult = mergeResult.Combine(changeSet.Merge());
                    }
                }
            }

            return(mergeResult);
        }
Exemple #2
0
        public MergeResult Merge()
        {
            var mergeResult = MergeResult.Empty();

            this.SourceComponent.As <ISupportBranching>().Do(c => mergeResult = c.Merge(_targetComponentsFolder));

            return(mergeResult);
        }
Exemple #3
0
        private void StartMerge()
        {
            StartBusyAction(() =>
            {
                var mergeResult = MergeResult.Empty();
                foreach (var ms in this.MergeSets)
                {
                    mergeResult = mergeResult.Combine(ms.Merge());
                }

                WriteRelatedWorkItemsForVsExtension();

                ExecuteOnUIThread(Deactivate);

                if (mergeResult.NumberOfConflicts > 0)
                {
                    this.ServiceLocator.GetInstance <IMessageBox>().ShowMessage($"There are some merge conflicts!{Environment.NewLine}{Environment.NewLine}Open Visual Studio and go to{Environment.NewLine}'Team Explorer => Pending Changes => Resolve Conflicts'");
                }
            },
                            "Merging...");
        }
Exemple #4
0
 public MergeResult Merge()
 {
     this.SourceComponent.As <ISupportBranching>().Do(c => c.Branch(_targetComponentsFolder));
     return(MergeResult.Empty());
 }