|
|
|
@ -184,6 +184,10 @@ public class VcsHelper implements JTemplateActionListener {
|
|
|
|
|
|
|
|
|
|
private String getEditingFilename() { |
|
|
|
|
JTemplate jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); |
|
|
|
|
return getFilename(jt); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private String getFilename(JTemplate jt) { |
|
|
|
|
String editingFilePath = jt.getEditingFILE().getPath(); |
|
|
|
|
return VcsFileUtils.dealWithFilePath(editingFilePath); |
|
|
|
|
} |
|
|
|
@ -215,7 +219,7 @@ public class VcsHelper implements JTemplateActionListener {
|
|
|
|
|
fireVcs.execute(new Runnable() { |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
String fileName = getEditingFilename(); |
|
|
|
|
String fileName = getFilename(jt); |
|
|
|
|
VcsOperator operator = WorkContext.getCurrent().get(VcsOperator.class); |
|
|
|
|
VcsEntity entity = operator.getFileVersionByIndex(fileName, 0); |
|
|
|
|
boolean replace = needDeleteVersion(entity); |
|
|
|
|