Subversion Repositories XServices

Rev

Rev 198 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 198 Rev 199
Line 1... Line 1...
1
/*     */ package net.brutex.xservices.util;
1
/*     */ package net.brutex.xservices.util;
2
/*     */ 
2
/*     */ 
3
/*     */ import java.io.File;
3
/*     */ import java.io.File;
-
 
4
/*     */ import lombok.extern.slf4j.Slf4j;
4
/*     */ import net.brutex.xservices.types.scm.ItemType;
5
import net.brutex.xservices.types.scm.ItemType;
5
			import net.brutex.xservices.util.CVSRoot;
6
			import net.brutex.xservices.util.CVSRoot;
Line 6... Line 7...
6
 
7
 
7
import org.apache.commons.configuration2.PropertiesConfiguration;
8
import org.apache.commons.configuration2.PropertiesConfiguration;
8
import org.apache.commons.configuration2.builder.fluent.Configurations;
9
import org.apache.commons.configuration2.builder.fluent.Configurations;
9
import org.apache.commons.configuration2.ex.ConfigurationException;
-
 
10
import org.apache.logging.log4j.LogManager;
-
 
-
 
10
import org.apache.commons.configuration2.ex.ConfigurationException;
11
import org.apache.logging.log4j.Logger;
11
 
12
/*     */ import org.netbeans.lib.cvsclient.Client;
12
/*     */ import org.netbeans.lib.cvsclient.Client;
13
/*     */ import org.netbeans.lib.cvsclient.admin.StandardAdminHandler;
13
/*     */ import org.netbeans.lib.cvsclient.admin.StandardAdminHandler;
14
/*     */ import org.netbeans.lib.cvsclient.command.CommandAbortedException;
14
/*     */ import org.netbeans.lib.cvsclient.command.CommandAbortedException;
15
/*     */ import org.netbeans.lib.cvsclient.command.GlobalOptions;
15
/*     */ import org.netbeans.lib.cvsclient.command.GlobalOptions;
16
/*     */ import org.netbeans.lib.cvsclient.connection.AuthenticationException;
16
/*     */ import org.netbeans.lib.cvsclient.connection.AuthenticationException;
17
/*     */ import org.netbeans.lib.cvsclient.connection.PServerConnection;
17
/*     */ import org.netbeans.lib.cvsclient.connection.PServerConnection;
-
 
18
/*     */
18
/*     */ 
19
@Slf4j
19
/*     */ public class CVSClient
20
/*     */ public class CVSClient
20
/*     */ {
21
/*     */ {
21
/*     */   private final File configfile;
22
/*     */   private final File configfile;
22
/*     */   private final PServerConnection connection;
23
/*     */   private final PServerConnection connection;
23
/*     */   private final CVSRoot root;
24
/*     */   private final CVSRoot root;
24
/*     */   private final GlobalOptions globalOptions;
-
 
25
/*  41 */   final Logger logger = LogManager.getLogger();
25
/*     */   private final GlobalOptions globalOptions;
26
/*     */   public final Client client;
26
/*     */   public final Client client;
27
/*     */ 
27
/*     */ 
28
/*     */   public Client getClient()
28
/*     */   public Client getClient()
29
/*     */   {
29
/*     */   {
Line 59... Line 59...
59
/*  76 */     this.connection.setHostName(this.root.host);
59
/*  76 */     this.connection.setHostName(this.root.host);
60
/*  77 */     this.connection.setRepository(this.root.repository);
60
/*  77 */     this.connection.setRepository(this.root.repository);
61
/*     */     try {
61
/*     */     try {
62
/*  79 */       this.connection.open();
62
/*  79 */       this.connection.open();
63
/*     */     } catch (AuthenticationException ex) {
63
/*     */     } catch (AuthenticationException ex) {
64
/*  81 */       this.logger.error(ex.getMessage());
64
/*  81 */       log.error(ex.getMessage());
65
/*     */     }
65
/*     */     }
66
/*     */ 
66
/*     */ 
67
/*  84 */     this.client = new Client(this.connection, new StandardAdminHandler());
67
/*  84 */     this.client = new Client(this.connection, new StandardAdminHandler());
68
/*  85 */     this.client.setLocalPath(workdir);
68
/*  85 */     this.client.setLocalPath(workdir);
69
/*     */   }
69
/*     */   }