1 11 package org.eclipse.team.internal.ccvs.core.client; 12 13 14 import org.eclipse.core.runtime.IProgressMonitor; 15 import org.eclipse.team.internal.ccvs.core.*; 16 import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo; 17 import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo; 18 19 public class NewEntryHandler extends ResponseHandler { 20 21 24 public String getResponseID() { 25 return "New-entry"; } 27 28 31 public void handle(Session session, String localDir, IProgressMonitor monitor) 32 throws CVSException { 33 34 String repositoryFile = session.readLine(); 36 String entryLine = session.readLine(); 37 38 session.setModTime(null); 40 41 String fileName = repositoryFile.substring(repositoryFile.lastIndexOf("/") + 1); ICVSFolder mParent = session.getLocalRoot().getFolder(localDir); 44 ICVSFile mFile = mParent.getFile(fileName); 45 46 ResourceSyncInfo fileInfo = mFile.getSyncInfo(); 47 MutableResourceSyncInfo newInfo = fileInfo.cloneMutable(); 48 newInfo.setEntryLine(entryLine); 49 if(newInfo.getTag() != null && newInfo.getTag().getName().equals(CVSTag.BASE.getName())) { 51 newInfo.setTag(fileInfo.getTag()); 52 } 53 mFile.setSyncInfo(newInfo, ICVSFile.UNKNOWN); 54 } 55 } 56 | Popular Tags |