首页 > 解决方案 > svn冲突问题

问题描述

我正在为我的项目制作 svn 文档。所以我做了一个示例 svn update。在那段时间我遇到了以下问题。

我正在处理本地副本中的文件。在提交更改之前,我在文件中进行了单行更改,我进行了更新。我在本地副本中的同一文件(同一行)中进行了更改。在这种情况下,我需要解决需要解决的冲突。但就我而言,发生的事情既没有发生冲突,也没有发生自动合并。该文件与我更改它时相同。

存储库中的文件


package com.toy.anagrams.ui;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author avijayakumar
 */
public class AnagramsTest {

    public AnagramsTest() {
    }

    @BeforeClass
    public static void setUpClass() {
    }

    @AfterClass
    public static void tearDownClass() {
    }

    @Before
    public void setUp() {
    }

    @After
    public void tearDown() {
    }

    /**
     * Test of main method, of class Anagrams.
     */
    @Test
    public void testMain() {
        System.out.println("main");
        String[] args = null;
        **System.out.println("Hello World!!!");**
    }

}

Local copy change
*******************

package com.toy.anagrams.ui;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author avijayakumar
 */
public class AnagramsTest {

    public AnagramsTest() {
    }

    @BeforeClass
    public static void setUpClass() {
    }

    @AfterClass
    public static void tearDownClass() {
    }

    @Before
    public void setUp() {
    }

    @After
    public void tearDown() {
    }

    /**
     * Test of main method, of class Anagrams.
     */
    @Test
    public void testMain() {
        System.out.println("main");
        String[] args = null;
        **System.out.println("test");**

    }

}

我做了粗体字,我在本地副本中做了更改。你们能帮我解决这个问题吗?提前致谢

标签: svnconflictautomerge

解决方案


如果您在文件中进行更改然后更新存储库,存储库文件将尝试覆盖您的更改,从而导致您意识到的冲突。

If you want to start editing from the current repository files, update to the latest revision then move your changes across and commit your changes. You do not need to update before you commit as commiting updates files and will let you know of any conflicts that you need to resolve.


推荐阅读