I am doing a documentation for svn for my project. So I made a sample svn update.During that time I faced the below issue.
I am working on a file in my local copy. I made a single line change in the file, before committing the changes i did an update. I have changed in the same file(same line) in my local copy. In this case, I need to get a conflict which needs to be resolved. But in my case, what happened is neither conflict nor auto merge occured. The file was same like when i had changed it.
File in the repository
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");**
}
}
I made the line BOLD which i have made change in the local copy. Can you guys help me fix this issue?. Thanks in advance
If you make changes in a file then update the repository, the repository file will attempt to overwrite your changes resulting in a conflict as you have realised.
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.