Better reflection of extraction interface refactoring in subversion
I am retrieving an interface that I would like to keep the original name. The actual class will receive the "Impl" suffix according to our naming conventions. I want to know how to best reflect this in subversion so that the history of "AppPropertiesImpl.java" spans his life as "AppProperties.java". As for the new "AppProperties.java", I think it can be either a new file or a copy of the old one. Any idea how to do this?
Here's what I have now:
AppProperties.java
public class AppProperties {
public static final CONSTANT_ONE = "CONSTANT_ONE";
private String propertyOne;
public String getPropertyOne() {
return propertyOne;
}
public String setPropertyOne(String propertyOne) {
this.propertyOne = propertyOne;
}
}
And I want in the end:
AppProperties.java
public interface AppProperties {
public static final CONSTANT_ONE = "CONSTANT_ONE";
String getPropertyOne();
String setPropertyOne(String propertyOne);
}
AppPropertiesImpl.java
public class AppPropertiesImpl implements AppProperties {
private String propertyOne;
public String getPropertyOne() {
return propertyOne;
}
public String setPropertyOne(String propertyOne) {
this.propertyOne;
}
}
Rename AppProperties.java
to AppPropertiesImpl.java
(using svn rename
) and commit. Then change your files and add a new one AppProperties.java
to Subversion. Voila.
If you want to keep the history of the file you want to use svn move
svn move AppProperties.java AppPropertiesImpl.Java