Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java')
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java90
1 files changed, 45 insertions, 45 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java
index 0186e7612..d450e4cd9 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java
@@ -70,51 +70,51 @@ public class RestoreFromRepositoryAction extends WorkspaceTraversalAction {
// Extract the file name and path from the RCS path
// String filePath = line.substring(index);
- // Find all RCS file names that contain "Attic"
- int start = line.lastIndexOf(Session.SERVER_SEPARATOR);
- if (start != -1) {
- String fileName = line.substring(start + 1);
- if (fileName.endsWith(RCS_FILE_POSTFIX)) {
- fileName = fileName.substring(0, fileName.length() - RCS_FILE_POSTFIX.length());
- }
- if (currentFolder != null) {
- try {
- ICVSFile file = currentFolder.getFile(fileName);
- if (!file.exists())
- atticFiles.add(file);
- } catch (CVSException e) {
- return e.getStatus();
- }
- } else {
- // Executed for every message line when in quiet mode.
- // See bug 238334
- CVSRepositoryLocation repo = (CVSRepositoryLocation)location;
- // If exists, remove root directory
- if (line.startsWith(repo.getRootDirectory())) {
- String repoPath = line.substring(repo.getRootDirectory().length());
- try {
- String cmdRootRelativePath = commandRoot.getRepositoryRelativePath();
- // Remove command root path
- String path = repoPath.substring(repoPath.indexOf(cmdRootRelativePath) + cmdRootRelativePath.length());
- // Remove filename at the end
- String folderPath = path.substring(0, path.indexOf(fileName));
- // The "raw" folderPath contains CVS's 'Attic/' segment when a file has been deleted from cvs.
- if (folderPath.endsWith(ATTIC)) {
- folderPath = folderPath.substring(0, folderPath.length() - ATTIC_LENGTH);
- }
- // A separator means the same as "current folder"
- if (folderPath.equals(Session.SERVER_SEPARATOR))
- folderPath = Session.CURRENT_LOCAL_FOLDER;
- ICVSFolder folder = commandRoot.getFolder(folderPath);
- ICVSFile file = folder.getFile(fileName);
- if (!file.exists())
- atticFiles.add(file);
- } catch (CVSException e) {
- return e.getStatus();
- }
- }
- }
- }
+ // Find all RCS file names that contain "Attic"
+ int start = line.lastIndexOf(Session.SERVER_SEPARATOR);
+ if (start != -1) {
+ String fileName = line.substring(start + 1);
+ if (fileName.endsWith(RCS_FILE_POSTFIX)) {
+ fileName = fileName.substring(0, fileName.length() - RCS_FILE_POSTFIX.length());
+ }
+ if (currentFolder != null) {
+ try {
+ ICVSFile file = currentFolder.getFile(fileName);
+ if (!file.exists())
+ atticFiles.add(file);
+ } catch (CVSException e) {
+ return e.getStatus();
+ }
+ } else {
+ // Executed for every message line when in quiet mode.
+ // See bug 238334
+ CVSRepositoryLocation repo = (CVSRepositoryLocation)location;
+ // If exists, remove root directory
+ if (line.startsWith(repo.getRootDirectory())) {
+ String repoPath = line.substring(repo.getRootDirectory().length());
+ try {
+ String cmdRootRelativePath = commandRoot.getRepositoryRelativePath();
+ // Remove command root path
+ String path = repoPath.substring(repoPath.indexOf(cmdRootRelativePath) + cmdRootRelativePath.length());
+ // Remove filename at the end
+ String folderPath = path.substring(0, path.indexOf(fileName));
+ // The "raw" folderPath contains CVS's 'Attic/' segment when a file has been deleted from cvs.
+ if (folderPath.endsWith(ATTIC)) {
+ folderPath = folderPath.substring(0, folderPath.length() - ATTIC_LENGTH);
+ }
+ // A separator means the same as "current folder"
+ if (folderPath.equals(Session.SERVER_SEPARATOR))
+ folderPath = Session.CURRENT_LOCAL_FOLDER;
+ ICVSFolder folder = commandRoot.getFolder(folderPath);
+ ICVSFile file = folder.getFile(fileName);
+ if (!file.exists())
+ atticFiles.add(file);
+ } catch (CVSException e) {
+ return e.getStatus();
+ }
+ }
+ }
+ }
return OK;
}

Back to the top