public IEnumerator TestMergeWorkerSmoke() { testObject1.transform.position = new Vector2(0.0f, 0.0f); testObject2.transform.position = new Vector2(3.0f, 3.0f); VersionManager.Instance().Add(testController1); VersionManager.Instance().Add(testController2); ICommit commit = VersionManager.Instance().Commit("Add two objects"); yield return(null); IBranch testBranch = VersionManager.Instance().CreateBranch("testBranch"); VersionManager.Instance().Checkout("testBranch"); testObject1.transform.position = new Vector2(1.0f, 0.0f); VersionManager.Instance().Add(testController1); ICommit secondCommit = VersionManager.Instance().Commit("Move testObject1"); VersionManager.Instance().Checkout("master"); Assert.AreEqual("master", master.GetName()); Assert.AreSame(commit, master.GetTip()); Assert.AreEqual("testBranch", testBranch.GetName()); Assert.AreSame(secondCommit, testBranch.GetTip()); IMergeWorker mw = new MergeWorker(master, testBranch, null, null); Assert.AreEqual(Relationship.FastForward, mw.GetMergeType()); Assert.AreEqual(MergeStatus.FastForward, mw.GetStatus(testController1)); Assert.AreEqual(MergeStatus.FastForward, mw.GetStatus(testController2)); Assert.AreEqual(true, mw.IsResolved()); }
public void SandBoxMergeTest() { var targetXmlDoc = LoadEmbeddedXmlResource(@"SandboxReplicationFeed.config"); var scriptXmlDoc = LoadEmbeddedXmlResource(@"SandboxXpathMerge.xml"); var mergeworker = new MergeWorker(null, scriptXmlDoc, targetXmlDoc); mergeworker.Merge(); }
public void MergeTest() { var targetXmlDoc = LoadEmbeddedXmlResource(@"MergeTarget.config"); var scriptXmlDoc = LoadEmbeddedXmlResource(@"XpathMerge.xml"); var mergeworker = new MergeWorker(null, scriptXmlDoc, targetXmlDoc); mergeworker.Merge(); }
/// <inheritdoc /> public void MergeWithCall(Snapshot snapshot, Snapshot callSnapshot, List <Snapshot> snapshots) { int localLevel = callSnapshot.CallLevel; MergeWorker worker = new MergeWorker(Factories, snapshot, snapshots, localLevel, true); worker.Merge(); ISnapshotStructureProxy structure = worker.Structure; ISnapshotDataProxy data = worker.Data; snapshot.SetMemoryMergeResult(localLevel, structure, data); }
public void MetaDataMergeTest() { var scriptXmlDoc = LoadEmbeddedXmlResource(@"XpathCombine.xml"); var medataDataSourceXmlDoc = LoadEmbeddedXmlResource(@"MetadataSourceSamplet.xml"); var medataDataTargetXmlDoc = LoadEmbeddedXmlResource(@"MetadataTargetSamplet.xml"); var mergeworker = new MergeWorker(null, scriptXmlDoc, medataDataTargetXmlDoc, medataDataSourceXmlDoc); mergeworker.Merge(); }
public Relationship Merge(IBranch featureBranch) { if (!EnabledVersionControls.Instance().CanMerge) { Debug.Log("Merging not enabled yet"); } if (isDetached) { throw new Exception("Can't merge if detached"); } if (this.mw != null) { throw new Exception("Already doing a merge, resolve this first"); } IMergeWorker mw = new MergeWorker(activeBranch, featureBranch, pickTrigger, mergeUI); Relationship mergeType = mw.GetMergeType(); if (mw.GetMergeType() == Relationship.FastForward) { mw.End(); activeBranch.UpdateTip(featureBranch.GetTip()); activeCommit = activeBranch.GetTip(); LoadStateOfCommit(activeCommit); if (mergeTrigger != null) { mergeTrigger.Trigger(); } return(mergeType); } this.mw = mw; return(mergeType); }
private void OnMergeClick(object sender, EventArgs e) { try { if (string.IsNullOrEmpty(mergeScriptSourceTextBox.Text) || string.IsNullOrEmpty(xmlTreeViewTarget.Xml)) { return; } var targetXmlDoc = new XmlDocument(); targetXmlDoc.LoadXml(xmlTreeViewTarget.Xml); var sourceXmlDoc = new XmlDocument(); sourceXmlDoc.LoadXml(mergeScriptSourceTextBox.Text); var mergeworker = new MergeWorker(_maiForm.Logger, sourceXmlDoc, targetXmlDoc); mergeworker.Merge(); _mergedXmlDoc = mergeworker.MergedXmlDoc; xmlTreeViewTarget.Xml = _mergedXmlDoc.OuterXml; } catch (Exception ex) { _maiForm.DisplayMessage(@"---OnMergeClick", ex); } }
public void SetMergeWorker(MergeWorker mergeWorker) { this.mw = mergeWorker; }