Search in sources :

Example 1 with MergeContext

use of org.jetbrains.idea.svn.integrate.MergeContext in project intellij-community by JetBrains.

the class SvnMergeInfoTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    myTrunkUrl = myRepoUrl + "/trunk";
    myBranchUrl = myRepoUrl + "/branch";
    myBranchVcsRoot = new File(myTempDirFixture.getTempDirPath(), "branch");
    myBranchVcsRoot.mkdir();
    myProjectLevelVcsManager = (ProjectLevelVcsManagerImpl) ProjectLevelVcsManager.getInstance(myProject);
    myProjectLevelVcsManager.setDirectoryMapping(myBranchVcsRoot.getAbsolutePath(), SvnVcs.VCS_NAME);
    VirtualFile vcsRoot = LocalFileSystem.getInstance().findFileByIoFile(myBranchVcsRoot);
    Node node = new Node(vcsRoot, SVNURL.parseURIEncoded(myBranchUrl), SVNURL.parseURIEncoded(myRepoUrl));
    RootUrlInfo root = new RootUrlInfo(node, WorkingCopyFormat.ONE_DOT_SIX, vcsRoot, null);
    myWCInfo = new WCInfo(root, true, Depth.INFINITY);
    myMergeContext = new MergeContext(SvnVcs.getInstance(myProject), myTrunkUrl, myWCInfo, SVNPathUtil.tail(myTrunkUrl), vcsRoot);
    myOneShotMergeInfoHelper = new OneShotMergeInfoHelper(myMergeContext);
    myVcs = SvnVcs.getInstance(myProject);
    myVcs.getSvnConfiguration().setCheckNestedForQuickMerge(true);
    enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
    enableSilentOperation(VcsConfiguration.StandardConfirmation.REMOVE);
    final String repoUrl = SVNURL.parseURIDecoded(myRepoUrl).toString();
    myWCInfoWithBranches = new WCInfoWithBranches(myWCInfo, Collections.emptyList(), vcsRoot, new WCInfoWithBranches.Branch(repoUrl + "/trunk"));
    myMergeChecker = new BranchInfo(myVcs, myWCInfoWithBranches, new WCInfoWithBranches.Branch(repoUrl + "/branch"));
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) WCInfo(org.jetbrains.idea.svn.dialogs.WCInfo) BranchInfo(org.jetbrains.idea.svn.mergeinfo.BranchInfo) Node(org.jetbrains.idea.svn.Node) RootUrlInfo(org.jetbrains.idea.svn.RootUrlInfo) MergeContext(org.jetbrains.idea.svn.integrate.MergeContext) OneShotMergeInfoHelper(org.jetbrains.idea.svn.mergeinfo.OneShotMergeInfoHelper) VirtualFile(com.intellij.openapi.vfs.VirtualFile) File(java.io.File) WCInfoWithBranches(org.jetbrains.idea.svn.dialogs.WCInfoWithBranches)

Example 2 with MergeContext

use of org.jetbrains.idea.svn.integrate.MergeContext in project intellij-community by JetBrains.

the class SvnQuickMergeTest method waitQuickMerge.

private void waitQuickMerge(@NotNull String sourceUrl, @NotNull QuickMergeTestInteraction interaction) throws Exception {
    MergeContext mergeContext = new MergeContext(myVcs, sourceUrl, getWcInfo(), SVNPathUtil.tail(sourceUrl), myWorkingCopyDir);
    QuickMerge quickMerge = new QuickMerge(mergeContext, interaction);
    getApplication().invokeAndWait(quickMerge::execute);
    quickMerge.waitForTasksToFinish();
    interaction.throwIfExceptions();
}
Also used : QuickMerge(org.jetbrains.idea.svn.integrate.QuickMerge) MergeContext(org.jetbrains.idea.svn.integrate.MergeContext)

Example 3 with MergeContext

use of org.jetbrains.idea.svn.integrate.MergeContext in project intellij-community by JetBrains.

the class CopiesPanel method mergeFrom.

private void mergeFrom(@NotNull final WCInfo wcInfo, @NotNull final VirtualFile root, @Nullable final Component mergeLabel) {
    SelectBranchPopup.showForBranchRoot(myProject, root, (project, configuration, branchUrl, revision) -> {
        String workingCopyUrlInSelectedBranch = getCorrespondingUrlInOtherBranch(configuration, wcInfo.getUrl(), branchUrl);
        MergeContext mergeContext = new MergeContext(myVcs, workingCopyUrlInSelectedBranch, wcInfo, SVNPathUtil.tail(branchUrl), root);
        new QuickMerge(mergeContext, new QuickMergeInteractionImpl(mergeContext)).execute();
    }, "Select branch", mergeLabel);
}
Also used : QuickMerge(org.jetbrains.idea.svn.integrate.QuickMerge) QuickMergeInteractionImpl(org.jetbrains.idea.svn.integrate.QuickMergeInteractionImpl) MergeContext(org.jetbrains.idea.svn.integrate.MergeContext)

Example 4 with MergeContext

use of org.jetbrains.idea.svn.integrate.MergeContext in project intellij-community by JetBrains.

the class SvnMergeInfoTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    myTrunkUrl = myRepoUrl + "/trunk";
    myBranchUrl = myRepoUrl + "/branch";
    myBranchVcsRoot = new File(myTempDirFixture.getTempDirPath(), "branch");
    myBranchVcsRoot.mkdir();
    myProjectLevelVcsManager = (ProjectLevelVcsManagerImpl) ProjectLevelVcsManager.getInstance(myProject);
    myProjectLevelVcsManager.setDirectoryMapping(myBranchVcsRoot.getAbsolutePath(), SvnVcs.VCS_NAME);
    VirtualFile vcsRoot = LocalFileSystem.getInstance().findFileByIoFile(myBranchVcsRoot);
    Node node = new Node(vcsRoot, SVNURL.parseURIEncoded(myBranchUrl), SVNURL.parseURIEncoded(myRepoUrl));
    RootUrlInfo root = new RootUrlInfo(node, WorkingCopyFormat.ONE_DOT_SIX, vcsRoot, null);
    myWCInfo = new WCInfo(root, true, Depth.INFINITY);
    myMergeContext = new MergeContext(SvnVcs.getInstance(myProject), myTrunkUrl, myWCInfo, SVNPathUtil.tail(myTrunkUrl), vcsRoot);
    myOneShotMergeInfoHelper = new OneShotMergeInfoHelper(myMergeContext);
    myVcs = SvnVcs.getInstance(myProject);
    myVcs.getSvnConfiguration().setCheckNestedForQuickMerge(true);
    enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
    enableSilentOperation(VcsConfiguration.StandardConfirmation.REMOVE);
    final String repoUrl = SVNURL.parseURIDecoded(myRepoUrl).toString();
    myWCInfoWithBranches = new WCInfoWithBranches(myWCInfo, Collections.emptyList(), vcsRoot, new WCInfoWithBranches.Branch(repoUrl + "/trunk"));
    myMergeChecker = new BranchInfo(myVcs, myWCInfoWithBranches, new WCInfoWithBranches.Branch(repoUrl + "/branch"));
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) WCInfo(org.jetbrains.idea.svn.dialogs.WCInfo) BranchInfo(org.jetbrains.idea.svn.mergeinfo.BranchInfo) MergeContext(org.jetbrains.idea.svn.integrate.MergeContext) OneShotMergeInfoHelper(org.jetbrains.idea.svn.mergeinfo.OneShotMergeInfoHelper) VirtualFile(com.intellij.openapi.vfs.VirtualFile) File(java.io.File) WCInfoWithBranches(org.jetbrains.idea.svn.dialogs.WCInfoWithBranches)

Aggregations

MergeContext (org.jetbrains.idea.svn.integrate.MergeContext)4 VirtualFile (com.intellij.openapi.vfs.VirtualFile)2 File (java.io.File)2 WCInfo (org.jetbrains.idea.svn.dialogs.WCInfo)2 WCInfoWithBranches (org.jetbrains.idea.svn.dialogs.WCInfoWithBranches)2 QuickMerge (org.jetbrains.idea.svn.integrate.QuickMerge)2 BranchInfo (org.jetbrains.idea.svn.mergeinfo.BranchInfo)2 OneShotMergeInfoHelper (org.jetbrains.idea.svn.mergeinfo.OneShotMergeInfoHelper)2 Node (org.jetbrains.idea.svn.Node)1 RootUrlInfo (org.jetbrains.idea.svn.RootUrlInfo)1 QuickMergeInteractionImpl (org.jetbrains.idea.svn.integrate.QuickMergeInteractionImpl)1