Changeset 854
- Timestamp:
- May 3, 2013, 3:35:11 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/SVNAccess/src/net/oni2/svnaccess/SVN.java
r852 r854 45 45 private void setProxy(BasicAuthenticationManager authMan) { 46 46 ProxySettings prox = ProxySettings.getInstance(); 47 if (prox.validate() ) {47 if (prox.validate() && prox.isUseProxy()) { 48 48 authMan.setProxy(prox.getHostOrIp(), prox.getPort(), null, null); 49 49 } … … 126 126 * @param wcDir 127 127 * Local working copy path to compare against 128 * @return -1: No local working copy yet<br> 128 * @return -2: No connection to remote repos<br> 129 * -1: No local working copy yet<br> 129 130 * 0: Revisions are equal<br> 130 131 * 1: SVN contains newer revisions<br> … … 138 139 if (wcDir.exists()) { 139 140 int localRev = pathIsWCof(repos, wcDir); 140 if (localRev < 0) 141 throw new Exception( 142 "Destination path exists but is not a Working Copy of the SVN"); 141 if (localRev < 0) { 142 if (wcDir.listFiles().length > 0) { 143 throw new Exception( 144 "Destination path exists but is not a Working Copy of the SVN"); 145 } else { 146 wcDir.delete(); 147 return -1; 148 } 149 } 143 150 int remoteRev = getRemoteHeadRevision(repos); 144 151 if (remoteRev > localRev) 145 152 return 1; 146 153 else { 147 if (getMissingFiles(wcDir)) 148 return 2; 149 else 150 return 0; 154 if (remoteRev < 0) { 155 return -2; 156 } else { 157 if (getMissingFiles(wcDir)) 158 return 2; 159 else 160 return 0; 161 } 151 162 } 152 163 } else { … … 201 212 err.println("Error while getting information of working copy for the location '" 202 213 + reposUrl + "': " + e.getMessage()); 214 e.printStackTrace(); 203 215 } 204 216 } … … 240 252 err.println("Error while updating the working copy for the location '" 241 253 + reposUrl + "': " + e.getMessage()); 254 e.printStackTrace(); 242 255 } 243 256 return false; … … 254 267 err.println("Error while getting the list of files of the location '" 255 268 + reposUrl + "': " + e.getMessage()); 269 e.printStackTrace(); 256 270 } 257 271 return list; … … 274 288 err.println("Error while checking out a working copy for the location '" 275 289 + reposUrl + "': " + e.getMessage()); 290 e.printStackTrace(); 276 291 } 277 292 return result;
Note:
See TracChangeset
for help on using the changeset viewer.