Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TemplateHandler.java')
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TemplateHandler.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TemplateHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TemplateHandler.java
index 9c99a9a0f..dd7783fac 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TemplateHandler.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TemplateHandler.java
@@ -40,18 +40,18 @@ public class TemplateHandler extends ResponseHandler {
@Override
public void handle(Session session, String localDir, IProgressMonitor monitor) throws CVSException {
session.readLine(); /* read the remote dir which is not needed */
- // Only read the template file if the container exists.
- // This is OK as we only use the template from the project folder which must exist
- ICVSFolder localFolder = session.getLocalRoot().getFolder(localDir);
+ // Only read the template file if the container exists.
+ // This is OK as we only use the template from the project folder which must exist
+ ICVSFolder localFolder = session.getLocalRoot().getFolder(localDir);
IContainer container = (IContainer)localFolder.getIResource();
ICVSStorage templateFile = null;
if (container != null && container.exists()) {
- try {
- templateFile = CVSWorkspaceRoot.getCVSFileFor(SyncFileWriter.getTemplateFile(container));
- } catch (CVSException e) {
- // Log the inability to create the template file
- CVSProviderPlugin.log(new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, "Could not write template file in " + container.getFullPath() + ": " + e.getMessage(), e, session.getLocalRoot())); //$NON-NLS-1$ //$NON-NLS-2$
- }
+ try {
+ templateFile = CVSWorkspaceRoot.getCVSFileFor(SyncFileWriter.getTemplateFile(container));
+ } catch (CVSException e) {
+ // Log the inability to create the template file
+ CVSProviderPlugin.log(new CVSStatus(IStatus.ERROR, CVSStatus.ERROR, "Could not write template file in " + container.getFullPath() + ": " + e.getMessage(), e, session.getLocalRoot())); //$NON-NLS-1$ //$NON-NLS-2$
+ }
}
if (container == null || templateFile == null) {
// Create a dummy storage handle to recieve the contents from the server
@@ -98,12 +98,12 @@ public class TemplateHandler extends ResponseHandler {
};
}
try {
- session.receiveFile(templateFile, false, UpdatedHandler.HANDLE_UPDATED, monitor);
- } catch (CVSException e) {
- if (!(templateFile instanceof ICVSFile && handleInvalidResourceName(session, (ICVSFile)templateFile, e))) {
- throw e;
- }
- }
+ session.receiveFile(templateFile, false, UpdatedHandler.HANDLE_UPDATED, monitor);
+ } catch (CVSException e) {
+ if (!(templateFile instanceof ICVSFile && handleInvalidResourceName(session, (ICVSFile)templateFile, e))) {
+ throw e;
+ }
+ }
}
}

Back to the top