Jaxx-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
April 2008
- 1 participants
- 373 discussions
[Buix-commits] r383 - trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 09:33:56 +0000 (Sun, 06 Apr 2008)
New Revision: 383
Modified:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexion.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSHandler.java
Log:
introduce VCSCommon contract tobe realized by VCSHandler and VCSConnexion
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexion.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexion.java 2008-04-06 09:33:33 UTC (rev 382)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexion.java 2008-04-06 09:33:56 UTC (rev 383)
@@ -15,15 +15,9 @@
package org.codelutin.vcs;
import org.codelutin.vcs.type.VCSConnexionMode;
-import org.codelutin.vcs.type.VCSState;
import java.io.File;
-import java.io.FileFilter;
-import java.io.FilenameFilter;
-import java.io.IOException;
import java.net.URI;
-import java.util.Collection;
-import java.util.List;
/**
* Contract to be realized for a connexion to a vcs.
@@ -35,10 +29,10 @@
*
* @author chemit
*/
-public interface VCSConnexion {
+public interface VCSConnexion<H extends VCSHandler> extends VCSCommon {
- /** @return the provider */
- VCSProvider getProvider();
+ /** @return the handler */
+ H getHandler();
/**
* Initialize the connexion.
@@ -119,270 +113,4 @@
/** @param l the listener to remove */
void removeVCSConnexionEventListener(VCSConnexionEventListener l);
- /**
- * init working copy, says if it is the first we use it it, we will checkout
- * the databaseDirectory directory
- *
- * @throws VCSException if any exception while init
- */
- void initWorkingCopy() throws VCSException;
-
- /** delete the local working copy with all his files */
- void deleteWorkingCopy();
-
- /**
- * @return a <code>FilenameFilter<code> to detect all files and directories in a vcs working copy that
- * must be handled by vcs
- */
- FilenameFilter getVersionnableFilenameFilter();
-
- /**
- * @return a <code>FileFilter<code> to detect all files and directories in a vcs working copy that
- * must be handled by vcs
- */
- FileFilter getVersionnableFileFilter();
-
- /**
- * @return name of directory used by vcs to store in working copy, a data's
- * directory configuration (e.g CVS for cvs and .svn for svn)
- */
- String getConfLocalDirname();
-
- /**
- * @return name of the file used by vcs to store in working copy
- * configuration directory entries of data's directory (e.g Entries
- * for cvs and entries for svn)
- */
- String getConfLocalEntriesFilename();
-
- VCSState getState(File fileState, Collection tmp) throws VCSException;
-
- VCSState getState(File file, Collection tmp, boolean noremote) throws VCSException;
-
- /**
- * @param file file to test
- * @return <code>true</code> if <code>file</code> is on remote
- * repository, <code>false</code> otherwise.
- */
- boolean isOnRemote(File file);
-
- /**
- * @param file file to test
- * @return <code>true</code> if file is uptodate,<code>false</code>
- * otherwise.
- * @throws VCSException if any exception while operation
- */
- boolean isUpToDate(File file) throws VCSException;
-
- /**
- * @param file file to test
- * @return <code>true</code> if file is handled by VCS,<code>false</code>
- * otherwise.
- */
- boolean isVersionnableFile(File file);
-
- /**
- * add on remote repository somes directories
- *
- * @param commitMessage commit message
- * @param dirNames names of the directories to create on remote repository (could
- * used multi-level directories)
- * @throws VCSException if any exception while operation
- */
- void makeRemoteDir(String commitMessage, String... dirNames)
- throws VCSException;
-
- /**
- * delete on remote repository somes directories
- *
- * @param commitMessage commit message
- * @param dirNames names of the directories to delete on remote repository (could
- * used multi-level directories)
- * @throws VCSException if any exception while operation
- */
- void deleteRemoteDir(String commitMessage, String... dirNames)
- throws VCSException;
-
- /**
- * add a list of files into repository
- *
- * @param files files to add
- * @param msg message for VCS commit, if <code>null</code> then no commit
- * is performed
- * @return revision of the operation
- * @throws VCSException if any exception while operation
- */
- long add(List<File> files, String msg) throws VCSException;
-
- // void add(File file, String msg) throws VCSException;
-
- /**
- * delete a list of files from repository
- *
- * @param files files to delete
- * @param msg message for VCS commit, if <code>null</code> then no commit
- * is performed
- * @throws VCSException if any exception while operation
- */
- void delete(List<File> files, String msg) throws VCSException;
-
- /**
- * revert a list of files from repository
- *
- * @param files files to revert
- * @throws VCSException if any exception while operation
- */
- void revert(List<File> files) throws VCSException;
-
- /**
- * commit a list of files into repository
- *
- * @param files files to commit
- * @param msg message for VCS commit
- * @return revision of the operation
- * @throws VCSException if any exception while operation
- */
- long commit(List<File> files, String msg) throws VCSException;
-
- /**
- * update a file to repository to a certain revision
- *
- * @param file file to update
- * @param revision object representing a revision for the current VCS
- * @throws VCSException if any exception while operation
- */
- void update(File file, Object revision) throws VCSException;
-
- /**
- * update a file to repository
- *
- * @param file file to update
- * @throws VCSException if any exception while operation
- */
- void update(File file) throws VCSException;
-
- /**
- * checkout a module from repository to a local file
- *
- * @param destDir local file where to checkout
- * @param module module's name to checkout
- * @param recurse flag to say to recurse checkout or not.
- * @throws VCSException if any exception while operation
- */
- void checkout(File destDir, String module, boolean recurse) throws VCSException;
-
- void checkoutFile(File destDir, String module) throws VCSException;
-
- long checkoutOnlyTheDirectory(File root, Object revision) throws VCSException;
-
- /**
- * TODO This is not the good place : VCS != Storage
- *
- * @param directory directory to treate
- * @return TODO
- * @throws VCSException TODO
- */
- List<String> getRemoteStorageNames(File directory) throws VCSException;
-
- /**
- * TODO This is not the good place : VCS != Storage
- *
- * @param directory directory to treate
- * @return TODO
- */
- List<String> getLocalStorageNames(File directory);
-
- /**
- * @param f local file to treate
- * @return current local revision of a file
- * @throws VCSException TODO
- */
- Object getRevision(File f) throws VCSException;
-
- /**
- * Obtain the list of log entries for the file
- *
- * @param startRevision TODO
- * @param endRevision TODO
- * @param file file to treate
- * @return list of log entries for this file between two revisions
- * @throws VCSException if any exception while grabbing infos
- */
- List getLog(Object startRevision, Object endRevision, File file)
- throws VCSException;
-
- /**
- * obtain the content of a file for a specific revision
- *
- * @param file file to obtain
- * @param revision revision treated
- * @return the content of the file on repository for the specific revision
- * passed as arguement.
- * @throws VCSException if any exception while operation
- * @throws java.io.IOException TODO
- */
- String getFileContent(File file, Object revision) throws VCSException, IOException;
-
- /**
- * Build the changelog for <code>file</code> from current revision of this
- * local file against head repository head version. For each revision
- * between current revision and head revision of this file, we give the
- * following informations :
- * <ul>
- * <li>revision number</li>
- * <li>author</li>
- * <li>date</li>
- * <li>commit message</li>
- * </ul>
- *
- * @param file file to treate
- * @return a string representation of change log for the local file to the
- * head ?
- * @throws VCSException if any exception while building changelog
- */
- String getChangeLog(File file) throws VCSException;
-
- /**
- * Generate in the ouputstream the diff between the current revision of the
- * local file against headest revision on repository. <br>
- * If file is uptodate, then does nothing.
- *
- * @param file the file to treate
- * @return the diff
- * @throws VCSException inf any exception while building diff, such as :
- * <ul>
- * <li>unversionned file</li>
- * <li>unexistant file locally</li>
- * <li>locally modified file ?</li>
- * <li>...</li>
- * </ul>
- * @throws java.io.IOException if io problem with streams
- */
- String getDiff(File file) throws VCSException, IOException;
-
- /**
- * Generate in the ouputstream the diff between the current revision of the
- * local file against another revision (<code>againstRevision</code>) on
- * repository. <br>
- * If file is uptodate, then does nothing.
- *
- * @param file the file to treate
- * @param againstRevision the against revision to use
- * @return the diff
- * @throws VCSException inf any exception while building diff, such as :
- * <ul>
- * <li>unversionned file</li>
- * <li>unexistant file locally</li>
- * <li>locally modified file ?</li>
- * <li>...</li>
- * </ul>
- * @throws java.io.IOException if problem with streams
- */
- String getDiff(File file, Object againstRevision) throws VCSException, IOException;
-
- /**
- * @return <code>true</code> if protocol has changed between config and working copy
- * @throws VCSException if any pb
- */
- boolean hasProtocoleChanged() throws VCSException;
}
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSHandler.java 2008-04-06 09:33:33 UTC (rev 382)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSHandler.java 2008-04-06 09:33:56 UTC (rev 383)
@@ -19,310 +19,22 @@
*##%*/
package org.codelutin.vcs;
-import org.codelutin.vcs.type.VCSState;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.List;
-
/**
* Contract of an VCS handler
*
* @author chemit
*/
-public interface VCSHandler<C extends VCSConnexion> {
+public interface VCSHandler<C extends VCSConnexion> extends VCSCommon {
/**
- * init working copy, says if it is the first we use it it, we will checkout
- * the databaseDirectory directory
+ * Attach a connexion to handler.
+ * <p/>
+ * Note : <b>This method MUST be called before all.</b>
*
- * @param connexion vcs connexion to use
- * @throws VCSException if any exception while init
+ * @param connexion the connexion to attach
*/
- void initWorkingCopy(C connexion) throws VCSException;
+ void setConnexion(C connexion);
- /**
- * delete the local working copy with all his files
- *
- * @param connexion vcs connexion to use
- */
- void deleteWorkingCopy(C connexion);
- /**
- * @return a <code>FilenameFilter<code> to detect all files and directories in a vcs working copy that
- * must be handled by vcs
- */
- FilenameFilter getVersionnableFilenameFilter();
-
- /**
- * @return a <code>FileFilter<code> to detect all files and directories in a vcs working copy that
- * must be handled by vcs
- */
- FileFilter getVersionnableFileFilter();
-
- /**
- * @return name of directory used by vcs to store in working copy, a data's
- * directory configuration (e.g CVS for cvs and .svn for svn)
- */
- String getConfLocalDirname();
-
- /**
- * @return name of the file used by vcs to store in working copy
- * configuration directory entries of data's directory (e.g Entries
- * for cvs and entries for svn)
- */
- String getConfLocalEntriesFilename();
-
- VCSState getState(C connexion, File file, Collection tmp) throws VCSException;
-
- VCSState getState(C connexion, File file, Collection tmp, boolean noremote) throws VCSException;
-
- /**
- * @param connexion vcs connexion to use
- * @param file file to test
- * @return <code>true</code> if <code>file</code> is on remote
- * repository, <code>false</code> otherwise.
- */
- boolean isOnRemote(C connexion, File file);
-
- /**
- * @param connexion vcs connexion to use
- * @param file file to test
- * @return <code>true</code> if file is uptodate,<code>false</code>
- * otherwise.
- * @throws VCSException if any exception while operation
- */
- boolean isUpToDate(C connexion, File file) throws VCSException;
-
- /**
- * @param connexion vcs connexion to use
- * @param file file to test
- * @return <code>true</code> if file is handled by VCS,<code>false</code>
- * otherwise.
- */
- boolean isVersionnableFile(C connexion, File file);
-
- /**
- * add on remote repository somes directories
- *
- * @param connexion vcs connexion to use
- * @param commitMessage commit message
- * @param dirNames names of the directories to create on remote repository (could
- * used multi-level directories)
- * @throws VCSException if any exception while operation
- */
- void makeRemoteDir(C connexion, String commitMessage, String... dirNames)
- throws VCSException;
-
- /**
- * delete on remote repository somes directories
- *
- * @param connexion vcs connexion to use
- * @param commitMessage commit message
- * @param dirNames names of the directories to delete on remote repository (could
- * used multi-level directories)
- * @throws VCSException if any exception while operation
- */
- void deleteRemoteDir(C connexion, String commitMessage, String... dirNames)
- throws VCSException;
-
- /**
- * add a list of files into repository
- *
- * @param connexion vcs connexion to use
- * @param files files to add
- * @param msg message for VCS commit, if <code>null</code> then no commit
- * is performed
- * @return revision of the operation
- * @throws VCSException if any exception while operation
- */
- long add(C connexion, List<File> files, String msg) throws VCSException;
-
- // void add(File file, String msg) throws VCSException;
-
- /**
- * delete a list of files from repository
- *
- * @param connexion vcs connexion to use
- * @param files files to delete
- * @param msg message for VCS commit, if <code>null</code> then no commit
- * is performed
- * @throws VCSException if any exception while operation
- */
- void delete(C connexion, List<File> files, String msg) throws VCSException;
-
- /**
- * revert a list of files from repository
- *
- * @param connexion vcs connexion to use
- * @param files files to revert
- * @throws VCSException if any exception while operation
- */
- void revert(C connexion, List<File> files) throws VCSException;
-
- /**
- * commit a list of files into repository
- *
- * @param connexion vcs connexion to use
- * @param files files to commit
- * @param msg message for VCS commit
- * @return revision of the operation
- * @throws VCSException if any exception while operation
- */
- long commit(C connexion, List<File> files, String msg) throws VCSException;
-
- /**
- * update a file to repository to a certain revision
- *
- * @param connexion vcs connexion to use
- * @param file file to update
- * @param revision object representing a revision for the current VCS
- * @throws VCSException if any exception while operation
- */
- void update(C connexion, File file, Object revision) throws VCSException;
-
- /**
- * update a file to repository
- *
- * @param connexion vcs connexion to use
- * @param file file to update
- * @throws VCSException if any exception while operation
- */
- void update(C connexion, File file) throws VCSException;
-
- /**
- * checkout a module from repository to a local file
- *
- * @param connexion vcs connexion to use
- * @param destDir local file where to checkout
- * @param module module's name to checkout
- * @param recurse flag to say to recurse checkout or not.
- * @throws VCSException if any exception while operation
- */
- void checkout(C connexion, File destDir, String module, boolean recurse) throws VCSException;
-
- void checkoutFile(C connexion, File destDir, String module) throws VCSException;
-
- long checkoutOnlyTheDirectory(C connexion, File root, Object revision) throws VCSException;
-
- /**
- * TODO This is not the good place : VCS != Storage
- *
- * @param connexion vcs connexion to use
- * @param directory directory to treate
- * @return TODO
- * @throws VCSException TODO
- */
- List<String> getRemoteStorageNames(C connexion, File directory) throws VCSException;
-
- /**
- * TODO This is not the good place : VCS != Storage
- *
- * @param connexion vcs connexion to use
- * @param directory directory to treate
- * @return TODO
- */
- List<String> getLocalStorageNames(C connexion, File directory);
-
- /**
- * @param connexion vcs connexion to use
- * @param f local file to treate
- * @return current local revision of a file
- * @throws VCSException TODO
- */
- Object getRevision(C connexion, File f) throws VCSException;
-
- /**
- * Obtain the list of log entries for the file
- *
- * @param connexion vcs connexion to use
- * @param startRevision TODO
- * @param endRevision TODO
- * @param file file to treate
- * @return list of log entries for this file between two revisions
- * @throws VCSException if any exception while grabbing infos
- */
- List getLog(C connexion, Object startRevision, Object endRevision, File file)
- throws VCSException;
-
- /**
- * obtain the content of a file for a specific revision
- *
- * @param connexion vcs connexion to use
- * @param file file to obtain
- * @param revision revision treated
- * @return the content of the file on repository for the specific revision
- * passed as arguement.
- * @throws VCSException if any exception while operation
- * @throws java.io.IOException TODO
- */
- String getFileContent(C connexion, File file, Object revision) throws VCSException, IOException;
-
- /**
- * Build the changelog for <code>file</code> from current revision of this
- * local file against head repository head version. For each revision
- * between current revision and head revision of this file, we give the
- * following informations :
- * <ul>
- * <li>revision number</li>
- * <li>author</li>
- * <li>date</li>
- * <li>commit message</li>
- * </ul>
- *
- * @param connexion vcs connexion to use
- * @param file file to treate
- * @return a string representation of change log for the local file to the
- * head ?
- * @throws VCSException if any exception while building changelog
- */
- String getChangeLog(C connexion, File file) throws VCSException;
-
- /**
- * Generate in the ouputstream the diff between the current revision of the
- * local file against headest revision on repository. <br>
- * If file is uptodate, then does nothing.
- *
- * @param connexion vcs connexion to use
- * @param file the file to treate
- * @return the diff
- * @throws VCSException inf any exception while building diff, such as :
- * <ul>
- * <li>unversionned file</li>
- * <li>unexistant file locally</li>
- * <li>locally modified file ?</li>
- * <li>...</li>
- * </ul>
- * @throws java.io.IOException if io problem with streams
- */
- String getDiff(C connexion, File file) throws VCSException, IOException;
-
- /**
- * Generate in the ouputstream the diff between the current revision of the
- * local file against another revision (<code>againstRevision</code>) on
- * repository. <br>
- * If file is uptodate, then does nothing.
- *
- * @param connexion vcs connexion to use
- * @param file the file to treate
- * @param againstRevision the against revision to use
- * @return the diff
- * @throws VCSException inf any exception while building diff, such as :
- * <ul>
- * <li>unversionned file</li>
- * <li>unexistant file locally</li>
- * <li>locally modified file ?</li>
- * <li>...</li>
- * </ul>
- * @throws java.io.IOException if problem with streams
- */
- String getDiff(C connexion, File file, Object againstRevision) throws VCSException, IOException;
-
-
- boolean hasProtocoleChanged(C connexion) throws VCSException;
-
}
\ No newline at end of file
1
0
[Buix-commits] r382 - trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 09:33:33 +0000 (Sun, 06 Apr 2008)
New Revision: 382
Added:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSCommon.java
Log:
introduce VCSCommon contract tobe realized by VCSHandler and VCSConnexion
Copied: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSCommon.java (from rev 376, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSHandler.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSCommon.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSCommon.java 2008-04-06 09:33:33 UTC (rev 382)
@@ -0,0 +1,302 @@
+/* *##%
+* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
+* Benjamin Poussin, Tony Chemit
+*
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*##%*/
+package org.codelutin.vcs;
+
+import org.codelutin.vcs.type.VCSState;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Contract of operations to realized by a handler or a connexion
+ *
+ * @author chemit
+ */
+
+public interface VCSCommon {
+
+ /**
+ * init working copy, says if it is the first we use it it, we will checkout
+ * the databaseDirectory directory
+ *
+ * @throws org.codelutin.vcs.VCSException if any exception while init
+ */
+ void initWorkingCopy() throws VCSException;
+
+ /** delete the local working copy with all his files */
+ void deleteWorkingCopy();
+
+ /**
+ * @return a <code>FilenameFilter<code> to detect all files and directories in a vcs working copy that
+ * must be handled by vcs
+ */
+ FilenameFilter getVersionnableFilenameFilter();
+
+ /**
+ * @return a <code>FileFilter<code> to detect all files and directories in a vcs working copy that
+ * must be handled by vcs
+ */
+ FileFilter getVersionnableFileFilter();
+
+ /**
+ * @return name of directory used by vcs to store in working copy, a data's
+ * directory configuration (e.g CVS for cvs and .svn for svn)
+ */
+ String getConfLocalDirname();
+
+ /**
+ * @return name of the file used by vcs to store in working copy
+ * configuration directory entries of data's directory (e.g Entries
+ * for cvs and entries for svn)
+ */
+ String getConfLocalEntriesFilename();
+
+ VCSState getState(File file, Collection tmp) throws VCSException;
+
+ VCSState getState(File file, Collection tmp, boolean noremote) throws VCSException;
+
+ /**
+ * @param file file to test
+ * @return <code>true</code> if <code>file</code> is on remote
+ * repository, <code>false</code> otherwise.
+ */
+ boolean isOnRemote(File file);
+
+ /**
+ * @param file file to test
+ * @return <code>true</code> if file is uptodate,<code>false</code>
+ * otherwise.
+ * @throws org.codelutin.vcs.VCSException if any exception while operation
+ */
+ boolean isUpToDate(File file) throws VCSException;
+
+ /**
+ * @param file file to test
+ * @return <code>true</code> if file is handled by VCS,<code>false</code>
+ * otherwise.
+ */
+ boolean isVersionnableFile(File file);
+
+ /**
+ * add on remote repository somes directories
+ *
+ * @param commitMessage commit message
+ * @param dirNames names of the directories to create on remote repository (could
+ * used multi-level directories)
+ * @throws org.codelutin.vcs.VCSException if any exception while operation
+ */
+ void makeRemoteDir(String commitMessage, String... dirNames)
+ throws VCSException;
+
+ /**
+ * delete on remote repository somes directories
+ *
+ * @param commitMessage commit message
+ * @param dirNames names of the directories to delete on remote repository (could
+ * used multi-level directories)
+ * @throws org.codelutin.vcs.VCSException if any exception while operation
+ */
+ void deleteRemoteDir(String commitMessage, String... dirNames)
+ throws VCSException;
+
+ /**
+ * add a list of files into repository
+ *
+ * @param files files to add
+ * @param msg message for VCS commit, if <code>null</code> then no commit
+ * is performed
+ * @return revision of the operation
+ * @throws org.codelutin.vcs.VCSException if any exception while operation
+ */
+ long add(List<File> files, String msg) throws VCSException;
+
+ // void add(File file, String msg) throws VCSException;
+
+ /**
+ * delete a list of files from repository
+ *
+ * @param files files to delete
+ * @param msg message for VCS commit, if <code>null</code> then no commit
+ * is performed
+ * @throws org.codelutin.vcs.VCSException if any exception while operation
+ */
+ void delete(List<File> files, String msg) throws VCSException;
+
+ /**
+ * revert a list of files from repository
+ *
+ * @param files files to revert
+ * @throws org.codelutin.vcs.VCSException if any exception while operation
+ */
+ void revert(List<File> files) throws VCSException;
+
+ /**
+ * commit a list of files into repository
+ *
+ * @param files files to commit
+ * @param msg message for VCS commit
+ * @return revision of the operation
+ * @throws org.codelutin.vcs.VCSException if any exception while operation
+ */
+ long commit(List<File> files, String msg) throws VCSException;
+
+ /**
+ * update a file to repository to a certain revision
+ *
+ * @param file file to update
+ * @param revision object representing a revision for the current VCS
+ * @throws org.codelutin.vcs.VCSException if any exception while operation
+ */
+ void update(File file, Object revision) throws VCSException;
+
+ /**
+ * update a file to repository
+ *
+ * @param file file to update
+ * @throws org.codelutin.vcs.VCSException if any exception while operation
+ */
+ void update(File file) throws VCSException;
+
+ /**
+ * checkout a module from repository to a local file
+ *
+ * @param destDir local file where to checkout
+ * @param module module's name to checkout
+ * @param recurse flag to say to recurse checkout or not.
+ * @throws org.codelutin.vcs.VCSException if any exception while operation
+ */
+ void checkout(File destDir, String module, boolean recurse) throws VCSException;
+
+ void checkoutFile(File destDir, String module) throws VCSException;
+
+ long checkoutOnlyTheDirectory(File root, Object revision) throws VCSException;
+
+ /**
+ * TODO This is not the good place : VCS != Storage
+ *
+ * @param directory directory to treate
+ * @return TODO
+ * @throws org.codelutin.vcs.VCSException TODO
+ */
+ List<String> getRemoteStorageNames(File directory) throws VCSException;
+
+ /**
+ * TODO This is not the good place : VCS != Storage
+ *
+ * @param directory directory to treate
+ * @return TODO
+ */
+ List<String> getLocalStorageNames(File directory);
+
+ /**
+ * @param f local file to treate
+ * @return current local revision of a file
+ * @throws org.codelutin.vcs.VCSException TODO
+ */
+ Object getRevision(File f) throws VCSException;
+
+ /**
+ * Obtain the list of log entries for the file
+ *
+ * @param startRevision TODO
+ * @param endRevision TODO
+ * @param file file to treate
+ * @return list of log entries for this file between two revisions
+ * @throws org.codelutin.vcs.VCSException if any exception while grabbing infos
+ */
+ List getLog(Object startRevision, Object endRevision, File file)
+ throws VCSException;
+
+ /**
+ * obtain the content of a file for a specific revision
+ *
+ * @param file file to obtain
+ * @param revision revision treated
+ * @return the content of the file on repository for the specific revision
+ * passed as arguement.
+ * @throws org.codelutin.vcs.VCSException if any exception while operation
+ * @throws java.io.IOException TODO
+ */
+ String getFileContent(File file, Object revision) throws VCSException, IOException;
+
+ /**
+ * Build the changelog for <code>file</code> from current revision of this
+ * local file against head repository head version. For each revision
+ * between current revision and head revision of this file, we give the
+ * following informations :
+ * <ul>
+ * <li>revision number</li>
+ * <li>author</li>
+ * <li>date</li>
+ * <li>commit message</li>
+ * </ul>
+ *
+ * @param file file to treate
+ * @return a string representation of change log for the local file to the
+ * head ?
+ * @throws org.codelutin.vcs.VCSException if any exception while building changelog
+ */
+ String getChangeLog(File file) throws VCSException;
+
+ /**
+ * Generate in the ouputstream the diff between the current revision of the
+ * local file against headest revision on repository. <br>
+ * If file is uptodate, then does nothing.
+ *
+ * @param file the file to treate
+ * @return the diff
+ * @throws org.codelutin.vcs.VCSException inf any exception while building diff, such as :
+ * <ul>
+ * <li>unversionned file</li>
+ * <li>unexistant file locally</li>
+ * <li>locally modified file ?</li>
+ * <li>...</li>
+ * </ul>
+ * @throws java.io.IOException if io problem with streams
+ */
+ String getDiff(File file) throws VCSException, IOException;
+
+
+ /**
+ * Generate in the ouputstream the diff between the current revision of the
+ * local file against another revision (<code>againstRevision</code>) on
+ * repository. <br>
+ * If file is uptodate, then does nothing.
+ *
+ * @param file the file to treate
+ * @param againstRevision the against revision to use
+ * @return the diff
+ * @throws org.codelutin.vcs.VCSException inf any exception while building diff, such as :
+ * <ul>
+ * <li>unversionned file</li>
+ * <li>unexistant file locally</li>
+ * <li>locally modified file ?</li>
+ * <li>...</li>
+ * </ul>
+ * @throws java.io.IOException if problem with streams
+ */
+ String getDiff(File file, Object againstRevision) throws VCSException, IOException;
+
+ boolean hasProtocoleChanged() throws VCSException;
+}
\ No newline at end of file
1
0
[Buix-commits] r381 - trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 08:38:06 +0000 (Sun, 06 Apr 2008)
New Revision: 381
Added:
trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockHandler.java
Removed:
trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockVCSHandler.java
Log:
rename
Copied: trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockHandler.java (from rev 378, trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockVCSHandler.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockHandler.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockHandler.java 2008-04-06 08:38:06 UTC (rev 381)
@@ -0,0 +1,119 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. This program is
+ * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.impl.mock;
+
+import org.codelutin.vcs.VCSException;
+import org.codelutin.vcs.type.VCSState;
+import org.codelutin.vcs.util.AbstractVCSHandler;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+
+/** @author chemit */
+public class MockHandler extends AbstractVCSHandler<MockConnexion> {
+
+ public MockHandler() {
+ super("", "");
+ }
+
+ public void initWorkingCopy(MockConnexion connexion) throws VCSException {
+ }
+
+ public VCSState getState(MockConnexion connexion, File fileState, Collection tmp) throws VCSException {
+ return null;
+ }
+
+ public VCSState getState(MockConnexion connexion, File file, Collection tmp, boolean noremote) throws VCSException {
+ return null;
+ }
+
+ public boolean isOnRemote(MockConnexion connexion, File file) {
+ return false;
+ }
+
+ public boolean isUpToDate(MockConnexion connexion, File file) throws VCSException {
+ return false;
+ }
+
+ public void makeRemoteDir(MockConnexion connexion, String commitMessage, String... dirNames) throws VCSException {
+ }
+
+ public void deleteRemoteDir(MockConnexion connexion, String commitMessage, String... dirNames) throws VCSException {
+ }
+
+ public long add(MockConnexion connexion, List<File> files, String msg) throws VCSException {
+ return 0;
+ }
+
+ public void delete(MockConnexion connexion, List<File> files, String msg) throws VCSException {
+ }
+
+ public void revert(MockConnexion connexion, List<File> files) throws VCSException {
+ }
+
+ public long commit(MockConnexion connexion, List<File> files, String msg) throws VCSException {
+ return 0;
+ }
+
+ public void update(MockConnexion connexion, File file, Object revision) throws VCSException {
+ }
+
+ public void update(MockConnexion connexion, File file) throws VCSException {
+ }
+
+ public void checkout(MockConnexion connexion, File destDir, String module, boolean recurse) throws VCSException {
+ }
+
+ public void checkoutFile(MockConnexion connexion, File destDir, String module) throws VCSException {
+ }
+
+ public long checkoutOnlyTheDirectory(MockConnexion connexion, File root, Object revision) throws VCSException {
+ return 0;
+ }
+
+ public List<String> getRemoteStorageNames(MockConnexion connexion, File directory) throws VCSException {
+ return null;
+ }
+
+ public Object getRevision(MockConnexion connexion, File f) throws VCSException {
+ return null;
+ }
+
+ public List getLog(MockConnexion connexion, Object startRevision, Object endRevision, File file) throws VCSException {
+ return null;
+ }
+
+ public String getFileContent(MockConnexion connexion, File file, Object revision) throws VCSException, IOException {
+ return null;
+ }
+
+ public String getChangeLog(MockConnexion connexion, File file) throws VCSException {
+ return null;
+ }
+
+ public String getDiff(MockConnexion connexion, File file) throws VCSException, IOException {
+ return null;
+ }
+
+ public String getDiff(MockConnexion connexion, File file, Object againstRevision) throws VCSException, IOException {
+ return null;
+ }
+
+ public boolean hasProtocoleChanged(MockConnexion connexion) throws VCSException {
+ return false;
+ }
+}
Deleted: trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockVCSHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockVCSHandler.java 2008-04-06 08:17:21 UTC (rev 380)
+++ trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockVCSHandler.java 2008-04-06 08:38:06 UTC (rev 381)
@@ -1,119 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * This program is free software; you
- * can redistribute it and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. This program is
- * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
- * should have received a copy of the GNU General Public License along with this
- * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.impl.mock;
-
-import org.codelutin.vcs.VCSException;
-import org.codelutin.vcs.type.VCSState;
-import org.codelutin.vcs.util.AbstractVCSHandler;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.List;
-
-/** @author chemit */
-public class MockVCSHandler extends AbstractVCSHandler<MockConnexion> {
-
- public MockVCSHandler() {
- super("", "");
- }
-
- public void initWorkingCopy(MockConnexion connexion) throws VCSException {
- }
-
- public VCSState getState(MockConnexion connexion, File fileState, Collection tmp) throws VCSException {
- return null;
- }
-
- public VCSState getState(MockConnexion connexion, File file, Collection tmp, boolean noremote) throws VCSException {
- return null;
- }
-
- public boolean isOnRemote(MockConnexion connexion, File file) {
- return false;
- }
-
- public boolean isUpToDate(MockConnexion connexion, File file) throws VCSException {
- return false;
- }
-
- public void makeRemoteDir(MockConnexion connexion, String commitMessage, String... dirNames) throws VCSException {
- }
-
- public void deleteRemoteDir(MockConnexion connexion, String commitMessage, String... dirNames) throws VCSException {
- }
-
- public long add(MockConnexion connexion, List<File> files, String msg) throws VCSException {
- return 0;
- }
-
- public void delete(MockConnexion connexion, List<File> files, String msg) throws VCSException {
- }
-
- public void revert(MockConnexion connexion, List<File> files) throws VCSException {
- }
-
- public long commit(MockConnexion connexion, List<File> files, String msg) throws VCSException {
- return 0;
- }
-
- public void update(MockConnexion connexion, File file, Object revision) throws VCSException {
- }
-
- public void update(MockConnexion connexion, File file) throws VCSException {
- }
-
- public void checkout(MockConnexion connexion, File destDir, String module, boolean recurse) throws VCSException {
- }
-
- public void checkoutFile(MockConnexion connexion, File destDir, String module) throws VCSException {
- }
-
- public long checkoutOnlyTheDirectory(MockConnexion connexion, File root, Object revision) throws VCSException {
- return 0;
- }
-
- public List<String> getRemoteStorageNames(MockConnexion connexion, File directory) throws VCSException {
- return null;
- }
-
- public Object getRevision(MockConnexion connexion, File f) throws VCSException {
- return null;
- }
-
- public List getLog(MockConnexion connexion, Object startRevision, Object endRevision, File file) throws VCSException {
- return null;
- }
-
- public String getFileContent(MockConnexion connexion, File file, Object revision) throws VCSException, IOException {
- return null;
- }
-
- public String getChangeLog(MockConnexion connexion, File file) throws VCSException {
- return null;
- }
-
- public String getDiff(MockConnexion connexion, File file) throws VCSException, IOException {
- return null;
- }
-
- public String getDiff(MockConnexion connexion, File file, Object againstRevision) throws VCSException, IOException {
- return null;
- }
-
- public boolean hasProtocoleChanged(MockConnexion connexion) throws VCSException {
- return false;
- }
-}
1
0
[Buix-commits] r380 - trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 08:17:21 +0000 (Sun, 06 Apr 2008)
New Revision: 380
Modified:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSProvider.java
Log:
javadoc
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSProvider.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSProvider.java 2008-04-06 07:31:39 UTC (rev 379)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSProvider.java 2008-04-06 08:17:21 UTC (rev 380)
@@ -31,6 +31,13 @@
String getName();
/**
+ * init the provider. (instanciate handler)
+ * <p/>
+ * This method MUST be invoked before asking any connexion.
+ */
+ void init();
+
+ /**
* return a new VCSHandler instance for given config.
*
* @return the cached instance of handler
@@ -38,15 +45,12 @@
*/
H getHandler() throws IllegalStateException;
- /** init the provider */
- void init();
-
/**
* Instanciate an new connexion for a given config, and init it.
*
* @param mode the mode required
* @param config the config to be used
- * @return the new connexion initializd <b>but not opened</b>.
+ * @return the new connexion initialized <b>but not opened</b>.
* @throws IllegalStateException if provider was not init via {@link #init()}
*/
C newConnection(VCSConnexionMode mode, VCSConnexionConfig config) throws IllegalStateException;
1
0
[Buix-commits] r379 - in trunk/lutinvcs: lutinvcs-api/src/main/java/org/codelutin/vcs lutinvcs-api/src/main/java/org/codelutin/vcs/util lutinvcs-api/src/main/resources/i18n lutinvcs-core/src/main/java/org/codelutin/vcs/runner
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 07:31:39 +0000 (Sun, 06 Apr 2008)
New Revision: 379
Modified:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexion.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/package.html
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSHandler.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSProvider.java
trunk/lutinvcs/lutinvcs-api/src/main/resources/i18n/lutinvcs-api-en_GB.properties
trunk/lutinvcs/lutinvcs-api/src/main/resources/i18n/lutinvcs-api-fr_FR.properties
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/runner/VCSActionThread.java
Log:
i18n +...
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexion.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexion.java 2008-04-06 07:04:12 UTC (rev 378)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexion.java 2008-04-06 07:31:39 UTC (rev 379)
@@ -37,9 +37,20 @@
*/
public interface VCSConnexion {
+ /** @return the provider */
VCSProvider getProvider();
/**
+ * Initialize the connexion.
+ * <p/>
+ * If connexion can not be established, then the method {@link #hasFailed()} will always
+ * return <code>true</code>.
+ *
+ * @param config config to be used to initialize the connexion.
+ */
+ void init(VCSConnexionConfig config);
+
+ /**
* @return the working copy used, can be null if no working copy exists.
* @throws IllegalStateException if {@link #init(VCSConnexionConfig)} was not invoked before.
*/
@@ -58,16 +69,6 @@
VCSConnexionMode getMode() throws IllegalStateException;
/**
- * Initialize the connexion.
- * <p/>
- * If connexion can not be established, then the method {@link #hasFailed()} will always
- * return <code>true</code>.
- *
- * @param config config to be used to initialize the connexion.
- */
- void init(VCSConnexionConfig config);
-
- /**
* @return the config of the connexion
* @throws IllegalStateException if {@link #init(VCSConnexionConfig)} was not invoked before.
*/
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/package.html
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/package.html 2008-04-06 07:04:12 UTC (rev 378)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/package.html 2008-04-06 07:31:39 UTC (rev 379)
@@ -1,11 +1,11 @@
<html>
<body>
-<h1>Lutin vcs</h1>
+<h1>Lutin vcs api</h1>
Ensemble de l'api de base pour g�rer des Versionning Concurrent System (aka
<code>vcs</code>) tel que CVS ou SVN.
<br/>
-On retrouve ici des interfaces, des classes g�n�riques et les objets li�s aux vcs.
+On retrouve dans ce paquetage, uniquement des d�finitions de types.
<br/>
-Auncune impl�mentation n'est fournit actuellement ici.
+Auncune impl�mentation n'est fournie dans ce paquetage.
</body>
</html>
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSHandler.java 2008-04-06 07:04:12 UTC (rev 378)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSHandler.java 2008-04-06 07:31:39 UTC (rev 379)
@@ -45,20 +45,15 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static protected final Log log = LogFactory.getLog(AbstractVCSHandler.class);
- /**
- * FilenameFilter to detect all files in a vcs working copy all files and directories that must be handled by vcs
- *
- * @see VCSHandler#getVersionnableFilenameFilter()
- */
+ public static final String LOCAL_SEP = File.separator;
+ public static final String LOCAL_SEP_PATTERN = "\\".equals(LOCAL_SEP) ? LOCAL_SEP + LOCAL_SEP : LOCAL_SEP;
+ public static final String REMOTE_SEP = "/";
+ public static final String REMOTE_SEP_PATTERN = "/";
+
protected final FilenameFilter versionnableFilenameFilter;
protected final FileFilter versionnableFileFilter;
protected final String confLocalDirName;
protected final String confLocalEntriesFilename;
- public static final String LOCAL_SEP = File.separator;
- public static final String LOCAL_SEP_PATTERN = "\\".equals(LOCAL_SEP) ?
- LOCAL_SEP + LOCAL_SEP : LOCAL_SEP;
- public static final String REMOTE_SEP = "/";
- public static final String REMOTE_SEP_PATTERN = "/";
protected AbstractVCSHandler(final String vCSConfLocalDirName, String vCSConfLocalEntriesFilename) {
this.confLocalDirName = vCSConfLocalDirName;
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSProvider.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSProvider.java 2008-04-06 07:04:12 UTC (rev 378)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSProvider.java 2008-04-06 07:31:39 UTC (rev 379)
@@ -14,26 +14,33 @@
*/
package org.codelutin.vcs.util;
+import static org.codelutin.i18n.I18n._;
import org.codelutin.vcs.VCSConnexion;
import org.codelutin.vcs.VCSConnexionConfig;
-import org.codelutin.vcs.type.VCSConnexionMode;
import org.codelutin.vcs.VCSHandler;
import org.codelutin.vcs.VCSProvider;
+import org.codelutin.vcs.type.VCSConnexionMode;
-import java.lang.reflect.InvocationTargetException;
-
/**
- * base implementation of provider with a cached handler and list of connexions
+ * base implementation of provider with a cached common handler for all connexions.
*
* @author chemit
*/
public abstract class AbstractVCSProvider<C extends VCSConnexion, H extends VCSHandler<C>> implements VCSProvider<C, H> {
-
+ /**
+ * shared cached instance of handler to use for this provider.
+ * <p/>
+ * The handler can be used by all connexions for this provider
+ */
protected H handler;
+ /** name of ne provider */
protected final String name;
+ /** implementation of handler to use */
private final Class<H> handlerImpl;
+
+ /** implementation of connexion to use */
private final Class<C> connexionImpl;
protected AbstractVCSProvider(String name, Class<H> handlerImpl, Class<C> connexionImpl) {
@@ -57,14 +64,8 @@
C connexion = connexionImpl.getConstructor(VCSConnexionMode.class, getClass()).newInstance(mode, this);
connexion.init(config);
return connexion;
- } catch (InstantiationException e) {
- throw new RuntimeException("could not instanciate connexion " + connexionImpl + " for reason " + e.getMessage());
- } catch (IllegalAccessException e) {
- throw new RuntimeException("could not instanciate connexion " + connexionImpl + " for reason " + e.getMessage());
- } catch (InvocationTargetException e) {
- throw new RuntimeException("could not instanciate connexion " + connexionImpl + " for reason " + e.getMessage());
- } catch (NoSuchMethodException e) {
- throw new RuntimeException("could not instanciate connexion " + connexionImpl + " for reason " + e.getMessage());
+ } catch (Exception e) {
+ throw new RuntimeException(_("lutinvcs.error.provider.init.connexion", connexionImpl, this, e.getCause()));
}
}
@@ -72,17 +73,15 @@
if (handler == null) {
try {
handler = handlerImpl.newInstance();
- } catch (InstantiationException e) {
- throw new RuntimeException("could not instanciate the handler " + handlerImpl + " for reason " + e.getMessage());
- } catch (IllegalAccessException e) {
- throw new RuntimeException("could not instanciate the handler " + handlerImpl + " for reason " + e.getMessage());
+ } catch (Exception e) {
+ throw new RuntimeException(_("lutinvcs.error.provider.init.handler", handlerImpl, this, e.getCause()));
}
}
}
protected void checkHandlerInit() throws IllegalStateException {
if (handler == null) {
- throw new IllegalStateException("handler was not init in " + this);
+ throw new IllegalStateException(_("lutinvcs.error.provider.noinit", handler, this));
}
}
Modified: trunk/lutinvcs/lutinvcs-api/src/main/resources/i18n/lutinvcs-api-en_GB.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/resources/i18n/lutinvcs-api-en_GB.properties 2008-04-06 07:04:12 UTC (rev 378)
+++ trunk/lutinvcs/lutinvcs-api/src/main/resources/i18n/lutinvcs-api-en_GB.properties 2008-04-06 07:31:39 UTC (rev 379)
@@ -9,6 +9,9 @@
lutinvcs.action.revert=revert
lutinvcs.action.update=update
lutinvcs.error.checkout.dir=Can''t checkout dir {0}
+lutinvcs.error.provider.init.connexion=could not instanciate connexion {0}, for provider {1}, reason\: {2}
+lutinvcs.error.provider.init.handler=could not instanciate handler {0}, for provider {1}, reason\: {2}
+lutinvcs.error.provider.noinit=handler {0} was not init for provider {1}
lutinvcs.location.all=All
lutinvcs.location.local=Local
lutinvcs.location.remote=Remote
Modified: trunk/lutinvcs/lutinvcs-api/src/main/resources/i18n/lutinvcs-api-fr_FR.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/resources/i18n/lutinvcs-api-fr_FR.properties 2008-04-06 07:04:12 UTC (rev 378)
+++ trunk/lutinvcs/lutinvcs-api/src/main/resources/i18n/lutinvcs-api-fr_FR.properties 2008-04-06 07:31:39 UTC (rev 379)
@@ -9,6 +9,9 @@
lutinvcs.action.revert=Rollback
lutinvcs.action.update=Update
lutinvcs.error.checkout.dir=Ne peut pas uploader le fichier ''{0}''
+lutinvcs.error.provider.init.connexion=Erreur lors de l''instanciation de la connexion {0}, provider {1}, cause\: {2}
+lutinvcs.error.provider.init.handler=Erreur lors de l''instanciation du handler {0}, provider {1}, cause\: {2}
+lutinvcs.error.provider.noinit=Le handler {0} n''a pas \u00E9t\u00E9 initialis\u00E9 pour le provider {1}
lutinvcs.location.all=All
lutinvcs.location.local=Local
lutinvcs.location.remote=Remote
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/runner/VCSActionThread.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/runner/VCSActionThread.java 2008-04-06 07:04:12 UTC (rev 378)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/runner/VCSActionThread.java 2008-04-06 07:31:39 UTC (rev 379)
@@ -56,9 +56,11 @@
catch (Throwable eee) {
if (log.isWarnEnabled()) {
log.warn(_("lutinvcs.error.thread.action", item), eee);
+ //TODO Deal with errors
}
+ } finally {
+ log.info("Stop " + getName() + " at " + new Date());
}
- log.info("Stop " + getName() + " at " + new Date());
}
protected void doAction(VCSActionManager.QueueItem item) throws VCSException {
1
0
06 Apr '08
Author: tchemit
Date: 2008-04-06 07:04:12 +0000 (Sun, 06 Apr 2008)
New Revision: 378
Modified:
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFactory.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/runner/VCSActionManager.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/VCSAbsractAction.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java
trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSConnexion.java
trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSHandler.java
trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockConnexion.java
trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockVCSHandler.java
trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNConnexion.java
trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHandler.java
trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHelper.java
trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/FindTypeRepoTest.java
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx
trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/ConfirmUIHandler.java
trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/DiffUIHandler.java
trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java
trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java
trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java
Log:
un paquetage pour contenir les constantes (Enum)
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFactory.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFactory.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFactory.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -23,6 +23,7 @@
import org.apache.commons.logging.LogFactory;
import org.codelutin.util.StringUtil;
import org.codelutin.vcs.runner.VCSActionManager;
+import org.codelutin.vcs.type.VCSConnexionMode;
import java.util.ArrayList;
import java.util.List;
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/runner/VCSActionManager.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/runner/VCSActionManager.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/runner/VCSActionManager.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -14,7 +14,7 @@
*/
package org.codelutin.vcs.runner;
-import org.codelutin.vcs.VCSAction;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSEntry;
import java.util.concurrent.PriorityBlockingQueue;
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -14,7 +14,7 @@
*/
package org.codelutin.vcs.ui.handler;
-import org.codelutin.vcs.VCSAction;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.ui.VCSUIConstants;
import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel;
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -14,7 +14,7 @@
*/
package org.codelutin.vcs.ui.handler;
-import org.codelutin.vcs.VCSAction;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.ui.VCSUIConstants;
import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel;
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -14,8 +14,8 @@
*/
package org.codelutin.vcs.ui.handler;
-import org.codelutin.vcs.VCSAction;
-import org.codelutin.vcs.VCSEntryLocation;
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.ui.VCSUIConstants;
import org.codelutin.vcs.ui.model.SynchUIModel;
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/VCSAbsractAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/VCSAbsractAction.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/VCSAbsractAction.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -16,7 +16,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.codelutin.vcs.VCSAction;
+import org.codelutin.vcs.type.VCSAction;
import javax.swing.AbstractAction;
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -18,7 +18,7 @@
import org.apache.commons.logging.LogFactory;
import org.codelutin.vcs.VCSConnexion;
import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSEntryLocation;
+import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.VCSException;
import java.beans.PropertyChangeListener;
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -20,13 +20,13 @@
package org.codelutin.vcs.ui.model;
import static org.codelutin.i18n.I18n._;
-import org.codelutin.vcs.VCSAction;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSConnexion;
import org.codelutin.vcs.VCSEntries;
import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSEntryLocation;
+import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.VCSException;
-import org.codelutin.vcs.VCSState;
+import org.codelutin.vcs.type.VCSState;
import org.codelutin.vcs.util.VCSEntriesImpl;
import javax.swing.ListSelectionModel;
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -14,9 +14,9 @@
*/
package org.codelutin.vcs.ui.model;
-import org.codelutin.vcs.VCSAction;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSEntryLocation;
+import org.codelutin.vcs.type.VCSEntryLocation;
import static org.codelutin.vcs.ui.VCSUIConstants.ACTION_PROPERTY_CHANGED;
import static org.codelutin.vcs.ui.VCSUIConstants.MESSAGE_HISTORY_PROPERTY_CHANGED;
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -16,7 +16,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.codelutin.vcs.VCSAction;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.VCSHandler;
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -14,9 +14,9 @@
*/
package org.codelutin.vcs.ui.model;
-import org.codelutin.vcs.VCSAction;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSEntryLocation;
+import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.ui.VCSUIConstants;
/**
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -15,7 +15,7 @@
package org.codelutin.vcs.ui.model;
import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSState;
+import org.codelutin.vcs.type.VCSState;
import org.codelutin.vcs.ui.VCSUIConstants;
/** @author chemit */
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -14,8 +14,8 @@
*/
package org.codelutin.vcs.ui.model;
-import org.codelutin.vcs.VCSAction;
-import org.codelutin.vcs.VCSEntryLocation;
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.ui.VCSUIConstants;
/**
Modified: trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSConnexion.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSConnexion.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSConnexion.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -16,7 +16,7 @@
import org.codelutin.vcs.CVSProvider;
import org.codelutin.vcs.VCSConnexionConfig;
-import org.codelutin.vcs.VCSConnexionMode;
+import org.codelutin.vcs.type.VCSConnexionMode;
import org.codelutin.vcs.VCSException;
import org.codelutin.vcs.util.AbstractVCSConnexion;
import org.netbeans.lib.cvsclient.CVSRoot;
Modified: trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSHandler.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSHandler.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -4,7 +4,7 @@
import org.codelutin.util.FileUtil;
import org.codelutin.vcs.VCSConnexionConfig;
import org.codelutin.vcs.VCSException;
-import org.codelutin.vcs.VCSState;
+import org.codelutin.vcs.type.VCSState;
import org.codelutin.vcs.util.AbstractVCSHandler;
import org.netbeans.lib.cvsclient.command.FileInfoContainer;
import org.netbeans.lib.cvsclient.command.log.LogInformation;
Modified: trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockConnexion.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockConnexion.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockConnexion.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -14,11 +14,11 @@
*/
package org.codelutin.vcs.impl.mock;
-import org.codelutin.vcs.ConnectionState;
+import org.codelutin.vcs.type.ConnectionState;
+import org.codelutin.vcs.type.VCSConnexionMode;
import org.codelutin.vcs.MockProvider;
import org.codelutin.vcs.VCSConnexionConfig;
import org.codelutin.vcs.VCSException;
-import org.codelutin.vcs.VCSConnexionMode;
import org.codelutin.vcs.util.AbstractVCSConnexion;
/** @author chemit */
Modified: trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockVCSHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockVCSHandler.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockVCSHandler.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -15,7 +15,7 @@
package org.codelutin.vcs.impl.mock;
import org.codelutin.vcs.VCSException;
-import org.codelutin.vcs.VCSState;
+import org.codelutin.vcs.type.VCSState;
import org.codelutin.vcs.util.AbstractVCSHandler;
import java.io.File;
Modified: trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNConnexion.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNConnexion.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNConnexion.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -15,10 +15,10 @@
package org.codelutin.vcs.impl.svn;
import static org.codelutin.i18n.I18n._;
-import org.codelutin.vcs.ConnectionState;
+import org.codelutin.vcs.type.ConnectionState;
+import org.codelutin.vcs.type.VCSConnexionMode;
import org.codelutin.vcs.SVNProvider;
import org.codelutin.vcs.VCSConnexionConfig;
-import org.codelutin.vcs.VCSConnexionMode;
import org.codelutin.vcs.VCSException;
import org.codelutin.vcs.VCSRuntimeException;
import org.codelutin.vcs.util.AbstractVCSConnexion;
Modified: trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHandler.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHandler.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -23,11 +23,11 @@
import org.codelutin.vcs.VCSConnexionConfig;
import org.codelutin.vcs.VCSException;
import org.codelutin.vcs.VCSRuntimeException;
-import org.codelutin.vcs.VCSState;
-import static org.codelutin.vcs.VCSState.OUT_OF_DATE;
-import static org.codelutin.vcs.VCSState.OUT_OF_DATE_AND_MODIFIED;
-import static org.codelutin.vcs.VCSState.UP_TO_DATE;
-import org.codelutin.vcs.VCSStatus;
+import org.codelutin.vcs.type.VCSState;
+import static org.codelutin.vcs.type.VCSState.OUT_OF_DATE;
+import static org.codelutin.vcs.type.VCSState.OUT_OF_DATE_AND_MODIFIED;
+import static org.codelutin.vcs.type.VCSState.UP_TO_DATE;
+import org.codelutin.vcs.type.VCSStatus;
import org.codelutin.vcs.util.AbstractVCSHandler;
import org.tmatesoft.svn.core.ISVNDirEntryHandler;
import org.tmatesoft.svn.core.ISVNLogEntryHandler;
Modified: trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHelper.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHelper.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHelper.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -24,7 +24,7 @@
import org.codelutin.vcs.VCSException;
import org.codelutin.vcs.util.AbstractVCSHandler;
import org.codelutin.vcs.VCSRuntimeException;
-import org.codelutin.vcs.VCSTypeRepo;
+import org.codelutin.vcs.type.VCSTypeRepo;
import org.tmatesoft.svn.core.SVNCancelException;
import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.SVNNodeKind;
Modified: trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/FindTypeRepoTest.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/FindTypeRepoTest.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/FindTypeRepoTest.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -2,7 +2,7 @@
import junit.framework.TestCase;
import org.codelutin.vcs.VCSException;
-import org.codelutin.vcs.VCSTypeRepo;
+import org.codelutin.vcs.type.VCSTypeRepo;
/**
* User: tony
Modified: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/ConfirmUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/ConfirmUIHandler.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/ConfirmUIHandler.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -14,7 +14,7 @@
*/
package org.codelutin.vcs.ui;
-import org.codelutin.vcs.VCSAction;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.ui.handler.AbstractConfirmUIHandler;
import org.codelutin.vcs.ui.model.ConfirmUIModel;
Modified: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/DiffUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/DiffUIHandler.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/DiffUIHandler.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -14,7 +14,7 @@
*/
package org.codelutin.vcs.ui;
-import org.codelutin.vcs.VCSAction;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.ui.handler.AbstractDiffUIHandler;
import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel;
Modified: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -1,8 +1,8 @@
package org.codelutin.vcs.ui;
-import org.codelutin.vcs.VCSAction;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSEntryLocation;
+import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.ui.handler.AbstractSynchUIHandler;
import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel;
import org.codelutin.vcs.ui.model.SynchUIModel;
Modified: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -14,9 +14,9 @@
*/
package org.codelutin.vcs.ui;
-import org.codelutin.vcs.VCSAction;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSEntryLocation;
+import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.ui.handler.VCSAbsractAction;
import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel;
Modified: trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java 2008-04-06 07:04:12 UTC (rev 378)
@@ -16,12 +16,12 @@
import org.codelutin.i18n.I18n;
import org.codelutin.vcs.VCSConnexion;
-import org.codelutin.vcs.VCSConnexionMode;
+import org.codelutin.vcs.type.VCSConnexionMode;
+import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSEntryLocation;
+import org.codelutin.vcs.type.VCSState;
import org.codelutin.vcs.VCSFactory;
-import org.codelutin.vcs.VCSState;
-import org.codelutin.vcs.VCSType;
+import org.codelutin.vcs.type.VCSType;
import org.codelutin.vcs.ui.model.SynchUIModel;
import org.codelutin.vcs.util.VCSConnexionConfigImpl;
import org.codelutin.vcs.util.VCSEntryImpl;
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx 2008-04-06 07:04:12 UTC (rev 378)
@@ -2,7 +2,7 @@
resizable='false' height='300' width='400'>
<style source="common.css"/>
<script>
- import org.codelutin.vcs.VCSAction;
+ import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.ui.handler.AbstractConfirmUIHandler;
import org.codelutin.vcs.ui.model.ConfirmUIModel ;
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 07:04:12 UTC (rev 378)
@@ -2,8 +2,8 @@
<style source="common.css"/>
<script>
- import org.codelutin.vcs.VCSAction;
- import org.codelutin.vcs.VCSEntryLocation;
+ import org.codelutin.vcs.type.VCSAction;
+ import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.ui.handler.AbstractDiffUIHandler;
import org.codelutin.vcs.ui.VCSUIConstants;
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx 2008-04-06 07:04:12 UTC (rev 378)
@@ -2,8 +2,8 @@
<style source="common.css"/>
<script>
- import org.codelutin.vcs.VCSAction;
- import org.codelutin.vcs.VCSEntryLocation;
+ import org.codelutin.vcs.type.VCSAction;
+ import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.ui.handler.AbstractSynchUIHandler;
import org.codelutin.vcs.ui.model.SynchUIModel;
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx 2008-04-06 07:03:42 UTC (rev 377)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx 2008-04-06 07:04:12 UTC (rev 378)
@@ -1,6 +1,6 @@
<JPopupMenu>
<script>
- import org.codelutin.vcs.VCSAction;
+ import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.ui.handler.VCSAbsractAction;
protected VCSAbsractAction dispatchAction;
1
0
[Buix-commits] r377 - trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 07:03:42 +0000 (Sun, 06 Apr 2008)
New Revision: 377
Modified:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSHandler.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSProvider.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/VCSConnexionConfigImpl.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/VCSEntryImpl.java
Log:
un paquetage pour contenir les constantes (Enum)
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java 2008-04-06 07:03:17 UTC (rev 376)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java 2008-04-06 07:03:42 UTC (rev 377)
@@ -17,18 +17,18 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.codelutin.util.ListenerSet;
-import org.codelutin.vcs.ConnectionState;
-import org.codelutin.vcs.VCSAction;
+import org.codelutin.vcs.type.ConnectionState;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSConnexion;
import org.codelutin.vcs.VCSConnexionConfig;
import org.codelutin.vcs.VCSConnexionEvent;
import org.codelutin.vcs.VCSConnexionEvent.Type;
import org.codelutin.vcs.VCSConnexionEventListener;
-import org.codelutin.vcs.VCSConnexionMode;
+import org.codelutin.vcs.type.VCSConnexionMode;
import org.codelutin.vcs.VCSException;
import org.codelutin.vcs.VCSHandler;
import org.codelutin.vcs.VCSProvider;
-import org.codelutin.vcs.VCSState;
+import org.codelutin.vcs.type.VCSState;
import java.io.File;
import java.io.FileFilter;
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSHandler.java 2008-04-06 07:03:17 UTC (rev 376)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSHandler.java 2008-04-06 07:03:42 UTC (rev 377)
@@ -26,7 +26,7 @@
import org.codelutin.vcs.VCSConnexion;
import org.codelutin.vcs.VCSHandler;
import org.codelutin.vcs.VCSRuntimeException;
-import org.codelutin.vcs.VCSTypeRepo;
+import org.codelutin.vcs.type.VCSTypeRepo;
import java.io.File;
import java.io.FileFilter;
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSProvider.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSProvider.java 2008-04-06 07:03:17 UTC (rev 376)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSProvider.java 2008-04-06 07:03:42 UTC (rev 377)
@@ -16,7 +16,7 @@
import org.codelutin.vcs.VCSConnexion;
import org.codelutin.vcs.VCSConnexionConfig;
-import org.codelutin.vcs.VCSConnexionMode;
+import org.codelutin.vcs.type.VCSConnexionMode;
import org.codelutin.vcs.VCSHandler;
import org.codelutin.vcs.VCSProvider;
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/VCSConnexionConfigImpl.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/VCSConnexionConfigImpl.java 2008-04-06 07:03:17 UTC (rev 376)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/VCSConnexionConfigImpl.java 2008-04-06 07:03:42 UTC (rev 377)
@@ -15,8 +15,8 @@
package org.codelutin.vcs.util;
import org.codelutin.vcs.VCSConnexionConfig;
-import org.codelutin.vcs.VCSType;
-import org.codelutin.vcs.VCSTypeRepo;
+import org.codelutin.vcs.type.VCSType;
+import org.codelutin.vcs.type.VCSTypeRepo;
import java.io.File;
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java 2008-04-06 07:03:17 UTC (rev 376)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java 2008-04-06 07:03:42 UTC (rev 377)
@@ -14,13 +14,13 @@
*/
package org.codelutin.vcs.util;
-import org.codelutin.vcs.VCSAction;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSConnexion;
import org.codelutin.vcs.VCSEntries;
import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSEntryLocation;
+import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.VCSException;
-import org.codelutin.vcs.VCSState;
+import org.codelutin.vcs.type.VCSState;
import javax.swing.ListSelectionModel;
import java.util.ArrayList;
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/VCSEntryImpl.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/VCSEntryImpl.java 2008-04-06 07:03:17 UTC (rev 376)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/VCSEntryImpl.java 2008-04-06 07:03:42 UTC (rev 377)
@@ -16,8 +16,8 @@
import org.codelutin.vcs.VCSConnexion;
import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSEntryLocation;
-import org.codelutin.vcs.VCSState;
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.type.VCSState;
import org.codelutin.vcs.VCSException;
import java.io.BufferedReader;
1
0
[Buix-commits] r376 - trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 07:03:17 +0000 (Sun, 06 Apr 2008)
New Revision: 376
Modified:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexion.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionConfig.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntries.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntry.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSHandler.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSProvider.java
Log:
un paquetage pour contenir les constantes (Enum)
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexion.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexion.java 2008-04-06 07:03:02 UTC (rev 375)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexion.java 2008-04-06 07:03:17 UTC (rev 376)
@@ -14,6 +14,9 @@
*/
package org.codelutin.vcs;
+import org.codelutin.vcs.type.VCSConnexionMode;
+import org.codelutin.vcs.type.VCSState;
+
import java.io.File;
import java.io.FileFilter;
import java.io.FilenameFilter;
@@ -28,7 +31,7 @@
* The method {@link #init(VCSConnexionConfig)} must be invoked before using the connexion.
* <p/>
* Note: you should not instanciate directly this class but use
- * {@link org.codelutin.vcs.VCSProvider#newConnection(org.codelutin.vcs.VCSConnexionMode , VCSConnexionConfig)} instead.
+ * {@link org.codelutin.vcs.VCSProvider#newConnection(org.codelutin.vcs.type.VCSConnexionMode , VCSConnexionConfig)} instead.
*
* @author chemit
*/
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionConfig.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionConfig.java 2008-04-06 07:03:02 UTC (rev 375)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionConfig.java 2008-04-06 07:03:17 UTC (rev 376)
@@ -18,6 +18,9 @@
* ##% */
package org.codelutin.vcs;
+import org.codelutin.vcs.type.VCSType;
+import org.codelutin.vcs.type.VCSTypeRepo;
+
import java.io.File;
/**
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntries.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntries.java 2008-04-06 07:03:02 UTC (rev 375)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntries.java 2008-04-06 07:03:17 UTC (rev 376)
@@ -14,6 +14,10 @@
*/
package org.codelutin.vcs;
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.type.VCSState;
+
import javax.swing.ListSelectionModel;
import java.util.List;
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntry.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntry.java 2008-04-06 07:03:02 UTC (rev 375)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntry.java 2008-04-06 07:03:17 UTC (rev 376)
@@ -14,6 +14,9 @@
*/
package org.codelutin.vcs;
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.type.VCSState;
+
import java.io.BufferedReader;
import java.io.File;
import java.io.Serializable;
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSHandler.java 2008-04-06 07:03:02 UTC (rev 375)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSHandler.java 2008-04-06 07:03:17 UTC (rev 376)
@@ -19,6 +19,8 @@
*##%*/
package org.codelutin.vcs;
+import org.codelutin.vcs.type.VCSState;
+
import java.io.File;
import java.io.FileFilter;
import java.io.FilenameFilter;
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSProvider.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSProvider.java 2008-04-06 07:03:02 UTC (rev 375)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSProvider.java 2008-04-06 07:03:17 UTC (rev 376)
@@ -14,6 +14,8 @@
*/
package org.codelutin.vcs;
+import org.codelutin.vcs.type.VCSConnexionMode;
+
/**
* The contract to be realized to provide vcs communication.
* <p/>
1
0
[Buix-commits] r375 - in trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs: . type
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 07:03:02 +0000 (Sun, 06 Apr 2008)
New Revision: 375
Added:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/ConnectionState.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSAction.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSConnexionMode.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSEntryLocation.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSState.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSStatus.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSType.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSTypeRepo.java
Removed:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/ConnectionState.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSAction.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionMode.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntryLocation.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSState.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSStatus.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSType.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSTypeRepo.java
Log:
un paquetage pour contenir les constantes (Enum)
Deleted: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/ConnectionState.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/ConnectionState.java 2008-04-06 07:02:17 UTC (rev 374)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/ConnectionState.java 2008-04-06 07:03:02 UTC (rev 375)
@@ -1,37 +0,0 @@
-/*
-* \#\#% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
-* Tony Chemit
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* \#\#% */
-package org.codelutin.vcs;
-
-/**
- * Une enumeration pour definir l'�tat du connexion � un serveur vcs.
- *
- * @author chemit
- */
-public enum ConnectionState {
- /** lorsque la connexion a �t� initialis�e (valid�e) mais pas ouverte */
- INIT,
- /** lorsque la connexion n'a pas encore initialis�e */
- UNDEFINED,
- /** lorsque la connexion est ok, mais que l'on est pas connect� */
- OFF_LINE,
- /** lorsque la connexion est �tablie avec succes */
- ON_LINE,
- /** lorsque la connexion a tent�e de s'initialiser sans succes */
- ERROR
-}
Deleted: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSAction.java 2008-04-06 07:02:17 UTC (rev 374)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSAction.java 2008-04-06 07:03:02 UTC (rev 375)
@@ -1,100 +0,0 @@
-/* ##%
-* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
-* Benjamin Poussin, Tony Chemit
-*
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*##%*/
-package org.codelutin.vcs;
-
-import static org.codelutin.i18n.I18n._;
-import static org.codelutin.i18n.I18n.n_;
-
-/**
- * a VCSAction represents an action that can be realized on a file in working
- * copy or on remote repository.
- * <p/>
- * Each <code>VCSAction</code> has 4 properties :
- * <ul>
- * <li>libelle : i18n to be used for this action</li>
- * <li>visible : flag to say if action should be visible in ui</li>
- * <li>backup : flag to say if this action need backup</li>
- * <li>write : flag to say if this action need write access to repository</li>
- * </ul>
- *
- * @author chemit
- */
-(a)org.codelutin.i18n.I18nable
-public enum VCSAction {
- /** to refresh the state of a file on repository */
- REFRESH(n_("lutinvcs.action.refresh"), true, false, false, false),
- /** to add an unversionned file on repository */
- ADD(n_("lutinvcs.action.add"), true, false, true, true),
- /** to delete locally and from repository */
- DELETE(n_("lutinvcs.action.delete"), true, true, true, true),
- /** to get another version from repository */
- UPDATE(n_("lutinvcs.action.update"), true, true, false, false),
- /** to get a clean copy from repository */
- OVERWRITE_AND_UPDATE(n_("lutinvcs.action.overwriteAndUpdate"), true, true, false, false),
- /** commit a modification to repository */
- COMMIT(n_("lutinvcs.action.commit"), true, false, true, true),
- /** to rollback to working base revision */
- REVERT(n_("lutinvcs.action.revert"), true, true, false, false),
- /** to acquire a file from repository */
- CHECKOUT(n_("lutinvcs.action.checkout"), true, false, false, false),
- /** to obtain the changelog of a file */
- CHANGELOG(n_("lutinvcs.action.changeLog"), false, false, false, false),
- /** to obtain diif */
- DIFF(n_("lutinvcs.action.diff"), false, false, false, false);
-
- /** libelle of the action */
- private final String libelle;
- /** flag to say if action should be visible in ui TODO Delete this */
- private final boolean visible;
- /** flag to say if this action need backup TODO Delete this ? */
- private final boolean backup;
- /** flag to say if this action need write access to repository */
- private final boolean write;
- /** flag to say if this action need a commit message to be performed */
- private boolean commit;
-
- VCSAction(String libelle, boolean visible, boolean backup, boolean commit, boolean write) {
- this.libelle = libelle;
- this.visible = visible;
- this.backup = backup;
- this.commit = commit;
- this.write = write;
- }
-
- public String getLibelle() {
- return _(libelle);
- }
-
- public boolean isVisible() {
- return visible;
- }
-
- public boolean isBackup() {
- return backup;
- }
-
- public boolean isWrite() {
- return write;
- }
-
- public boolean isCommit() {
- return commit;
- }
-}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionMode.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionMode.java 2008-04-06 07:02:17 UTC (rev 374)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionMode.java 2008-04-06 07:03:02 UTC (rev 375)
@@ -1,26 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * This program is free software; you
- * can redistribute it and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. This program is
- * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
- * should have received a copy of the GNU General Public License along with this
- * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs;
-
-/**
- * L'ensemble des typs de connexion VCS connues
- *
- * @author chemit
- */
-public enum VCSConnexionMode {
- ANONYMOUS,
- PASSWORD,
- SSH
-}
Deleted: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntryLocation.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntryLocation.java 2008-04-06 07:02:17 UTC (rev 374)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntryLocation.java 2008-04-06 07:03:02 UTC (rev 375)
@@ -1,65 +0,0 @@
-/* ##%
-* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
-* Benjamin Poussin, Tony Chemit
-*
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*##%*/
-package org.codelutin.vcs;
-
-import static org.codelutin.i18n.I18n._;
-import static org.codelutin.i18n.I18n.n_;
-
-/**
- * a VCSEntryLocation represents where a {@link VCSEntry} was found, should be :
- * <p/>
- * <ul>
- * <li>{@link #ALL} : if entry is both on local and on remote</li>
- * <li>{@link #LOCAL} : if entry is only on local </li>
- * <li>{@link #REMOTE} : if entryis only on remote</li>
- * <p/>
- * </ul>
- * VCSAction represents an action that can be realized on a file in working
- * copy or on remote repository.
- * <p/>
- * Each <code>VCSAction</code> has 4 properties :
- * <ul>
- * <li>libelle : i18n to be used for this action</li>
- * <li>visible : flag to say if action should be visible in ui</li>
- * <li>backup : flag to say if this action need backup</li>
- * <li>write : flag to say if this action need write access to repository</li>
- * </ul>
- *
- * @author chemit
- */
-(a)org.codelutin.i18n.I18nable
-public enum VCSEntryLocation {
- ALL(n_("lutinvcs.location.all")),
- LOCAL(n_("lutinvcs.location.local")),
- REMOTE(n_("lutinvcs.location.remote")),
- UNKNOW(n_("lutinvcs.location.unknown"));
-
- /** libelle of location */
- private final String libelle;
-
-
- public String getLibelle() {
- return _(libelle);
- }
-
- VCSEntryLocation(String libelle) {
- this.libelle = libelle;
- }
-}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSState.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSState.java 2008-04-06 07:02:17 UTC (rev 374)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSState.java 2008-04-06 07:03:02 UTC (rev 375)
@@ -1,180 +0,0 @@
-package org.codelutin.vcs;
-
-import static org.codelutin.i18n.I18n._;
-import static org.codelutin.i18n.I18n.n_;
-import static org.codelutin.vcs.VCSAction.ADD;
-import static org.codelutin.vcs.VCSAction.CHANGELOG;
-import static org.codelutin.vcs.VCSAction.COMMIT;
-import static org.codelutin.vcs.VCSAction.DELETE;
-import static org.codelutin.vcs.VCSAction.DIFF;
-import static org.codelutin.vcs.VCSAction.OVERWRITE_AND_UPDATE;
-import static org.codelutin.vcs.VCSAction.REVERT;
-import static org.codelutin.vcs.VCSAction.UPDATE;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * This constants represents all states for a file.
- * Should contains all static data concerning file state (libelle, actions,
- * icon link, color,...).
- * We associate for each state, all VCSActions authorized for this state.
- */
-(a)org.codelutin.i18n.I18nable
-public enum VCSState {
-
- /**
- * when a local file matches the latest remote copy.
- * <br/>
- * The only action for this state is to delete the file, nothing else.
- */
- UP_TO_DATE("uptodate", n_("lutinvcs.state.uptodate"), VCSEntryLocation.ALL, DELETE),
-
- /**
- * when a local file matches a remote copy but not the latest one.
- * <br/>
- * This state owns 3 actions :
- * <ul>
- * <li>{@link VCSAction#UPDATE}</li>
- * <li>{@link VCSAction#DIFF}</li>
- * <li>{@link VCSAction#CHANGELOG}</li>
- * </ul>
- */
- OUT_OF_DATE("outofdate", n_("lutinvcs.state.outofdate"), VCSEntryLocation.REMOTE, UPDATE, DIFF, CHANGELOG),
-
- /**
- * when a local file does not matches his remote latest copy, but is based
- * on.
- * This state owns 4 actions :
- * <ul>
- * <li>{@link VCSAction#COMMIT}</li>
- * <li>{@link VCSAction#REVERT}</li>
- * <li>{@link VCSAction#OVERWRITE_AND_UPDATE}</li>
- * <li>{@link VCSAction#DIFF}</li>
- * </ul>
- */
- MODIFIED("modified", n_("lutinvcs.state.modified"), VCSEntryLocation.LOCAL, COMMIT, OVERWRITE_AND_UPDATE, REVERT, DIFF),
-
- /**
- * when a local file does not match the working version remote copy and
- * there is also new yougest version on remote : this is the worse case
- * (conflict).
- * This state owns 4 actions :
- * <ul>
- * <li>{@link VCSAction#REVERT}</li>
- * <li>{@link VCSAction#OVERWRITE_AND_UPDATE}</li>
- * <li>{@link VCSAction#DIFF}</li>
- * <li>{@link VCSAction#CHANGELOG}</li>
- * </ul>
- */
- OUT_OF_DATE_AND_MODIFIED("outofdateAndModified", n_("lutinvcs.state.outofdateAndModified"), VCSEntryLocation.ALL, OVERWRITE_AND_UPDATE, REVERT, DIFF, CHANGELOG),
-
- /**
- * when a local file does not exist on remote repository.
- * * This state owns 1 action :
- * <ul>
- * <li>{@link VCSAction#ADD}</li>
- * </ul>
- */
- UNVERSIONNED("unversionned", n_("lutinvcs.state.unversionned"), VCSEntryLocation.LOCAL, ADD, REVERT),
-
- /**
- * when a file exists on remote repository but not locally.
- * * This state owns 1 action :
- * <ul>
- * <li>{@link VCSAction#UPDATE}</li>
- * </ul>
- */
- MISSING("missing", n_("lutinvcs.state.missing"), VCSEntryLocation.REMOTE, UPDATE),
-
- /**
- * when a file is unversionned or missing : this special and durty state
- * correspond for exemple when you want to add a file under a no checked
- * directory...
- * <br/>
- * <b> This state needs special add and update operation to create unchecked
- * directories).</b>
- * This state owns 2 action :
- * <ul>
- * <li>{@link VCSAction#ADD}</li>
- * <li>{@link VCSAction#UPDATE}</li>
- * <p/>
- * </ul>
- */
- UNVERSIONNED_OR_MISSING("unversionnedOrMissing", n_("lutinvcs.state.unversionnedOrMissing"), VCSEntryLocation.LOCAL, ADD, UPDATE),
-
- REMOVED("removed", n_("lutinvcs.state.removed"), VCSEntryLocation.LOCAL, DELETE, REVERT),
-
- /** to deal with other cases (...) */
- UNKNOWN("unknown", n_("lutinvcs.state.unknown"), null);
-
-
- /** libelle to be used */
- private final String libelle;
- /** key of the state */
- private final String key;
-
- /** VCSAction associated with this state */
- private final List<VCSAction> actions;
-
- /** location of the state */
- private VCSEntryLocation location;
-
- VCSState(String key, String libelle, VCSEntryLocation location, VCSAction... actions) {
- this.location = location;
- this.libelle = libelle;
- List<VCSAction> actions1 = new ArrayList<VCSAction>(Arrays.asList(actions));
- // refresh action is enabled for all states
- actions1.add(VCSAction.REFRESH);
- this.actions = Collections.unmodifiableList(actions1);
- this.key = key;
-
- }
-
- public String libelle() {
- return _(libelle);
- }
-
- public List<VCSAction> getActions() {
- return actions;
- }
-
- public String getKey() {
- return key;
- }
-
- public VCSEntryLocation getLocation() {
- return location;
- }
-
- public boolean isLocal() {
- return location != VCSEntryLocation.REMOTE;
- }
-
- public boolean isRemote() {
- return location != VCSEntryLocation.LOCAL;
- }
-
- public boolean authorizeAction(VCSAction... actions) {
- java.util.List<VCSAction> acts = java.util.Arrays.asList(actions);
- for (VCSAction vcsAction : this.actions) {
- if (acts.contains(vcsAction)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * @param key key of required state
- * @return the <code>VCSState</code> with <code>key</code> as key value,
- * or <code>null</code> if no state found.
- */
- public static VCSState valueOfKey(String key) {
- for (VCSState state : VCSState.values())
- if (state.key.equals(key)) return state;
- return null;
- }
-}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSStatus.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSStatus.java 2008-04-06 07:02:17 UTC (rev 374)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSStatus.java 2008-04-06 07:03:02 UTC (rev 375)
@@ -1,32 +0,0 @@
-/* *##%
-* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
-* Benjamin Poussin, Tony Chemit
-*
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*##%*/
-package org.codelutin.vcs;
-
-public enum VCSStatus {
- NORMAL,
- ADDED,
- MODIFIED,
- DELETED,
- UNVERSIONED,
- MISSING,
- IGNORED,
- CONFLICTED,
- NONE
-}
Deleted: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSType.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSType.java 2008-04-06 07:02:17 UTC (rev 374)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSType.java 2008-04-06 07:03:02 UTC (rev 375)
@@ -1,31 +0,0 @@
-/* *##%
-* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
-* Benjamin Poussin, Tony Chemit
-*
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*##%*/
-package org.codelutin.vcs;
-
-/**
- * This type-safe class representing a type of vcs (SVN,CVS,...)
- *
- * @author chemit
- */
-public enum VCSType {
-
- CVS, SVN, MOCK
-
-}
Deleted: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSTypeRepo.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSTypeRepo.java 2008-04-06 07:02:17 UTC (rev 374)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSTypeRepo.java 2008-04-06 07:03:02 UTC (rev 375)
@@ -1,55 +0,0 @@
-/* *##%
-* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
-* Benjamin Poussin, Tony Chemit
-*
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*##%*/
-package org.codelutin.vcs;
-
-/**
- * type of repository to used, if no typeRepo (for CVS, use {@link #NONE}
- *
- * @author chemit
- */
-public enum VCSTypeRepo {
- /** head repo : is writable */
- HEAD("trunk", false),
- /** tag repo : readonly */
- TAG("tags", true),
- /** branch repo : should be writable ? */
- BRANCH("branches", false),
- /** no type of repo : readonly */
- NONE(null, true);
-
- /** the path of the type of repo */
- final String path;
-
- /** flag to say this type of repo is readonly or not. */
- final boolean readonly;
-
- VCSTypeRepo(String path, boolean readOnly) {
- this.path = path;
- this.readonly = readOnly;
- }
-
- public String getPath() {
- return path;
- }
-
- public boolean isReadonly() {
- return readonly;
- }
-}
Copied: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/ConnectionState.java (from rev 371, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/ConnectionState.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/ConnectionState.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/ConnectionState.java 2008-04-06 07:03:02 UTC (rev 375)
@@ -0,0 +1,37 @@
+/*
+* \#\#% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
+* Tony Chemit
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+* \#\#% */
+package org.codelutin.vcs.type;
+
+/**
+ * Une enumeration pour definir l'�tat du connexion � un serveur vcs.
+ *
+ * @author chemit
+ */
+public enum ConnectionState {
+ /** lorsque la connexion a �t� initialis�e (valid�e) mais pas ouverte */
+ INIT,
+ /** lorsque la connexion n'a pas encore initialis�e */
+ UNDEFINED,
+ /** lorsque la connexion est ok, mais que l'on est pas connect� */
+ OFF_LINE,
+ /** lorsque la connexion est �tablie avec succes */
+ ON_LINE,
+ /** lorsque la connexion a tent�e de s'initialiser sans succes */
+ ERROR
+}
Copied: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSAction.java (from rev 371, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSAction.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSAction.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSAction.java 2008-04-06 07:03:02 UTC (rev 375)
@@ -0,0 +1,100 @@
+/* ##%
+* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
+* Benjamin Poussin, Tony Chemit
+*
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*##%*/
+package org.codelutin.vcs.type;
+
+import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18n.n_;
+
+/**
+ * a VCSAction represents an action that can be realized on a file in working
+ * copy or on remote repository.
+ * <p/>
+ * Each <code>VCSAction</code> has 4 properties :
+ * <ul>
+ * <li>libelle : i18n to be used for this action</li>
+ * <li>visible : flag to say if action should be visible in ui</li>
+ * <li>backup : flag to say if this action need backup</li>
+ * <li>write : flag to say if this action need write access to repository</li>
+ * </ul>
+ *
+ * @author chemit
+ */
+(a)org.codelutin.i18n.I18nable
+public enum VCSAction {
+ /** to refresh the state of a file on repository */
+ REFRESH(n_("lutinvcs.action.refresh"), true, false, false, false),
+ /** to add an unversionned file on repository */
+ ADD(n_("lutinvcs.action.add"), true, false, true, true),
+ /** to delete locally and from repository */
+ DELETE(n_("lutinvcs.action.delete"), true, true, true, true),
+ /** to get another version from repository */
+ UPDATE(n_("lutinvcs.action.update"), true, true, false, false),
+ /** to get a clean copy from repository */
+ OVERWRITE_AND_UPDATE(n_("lutinvcs.action.overwriteAndUpdate"), true, true, false, false),
+ /** commit a modification to repository */
+ COMMIT(n_("lutinvcs.action.commit"), true, false, true, true),
+ /** to rollback to working base revision */
+ REVERT(n_("lutinvcs.action.revert"), true, true, false, false),
+ /** to acquire a file from repository */
+ CHECKOUT(n_("lutinvcs.action.checkout"), true, false, false, false),
+ /** to obtain the changelog of a file */
+ CHANGELOG(n_("lutinvcs.action.changeLog"), false, false, false, false),
+ /** to obtain diif */
+ DIFF(n_("lutinvcs.action.diff"), false, false, false, false);
+
+ /** libelle of the action */
+ private final String libelle;
+ /** flag to say if action should be visible in ui TODO Delete this */
+ private final boolean visible;
+ /** flag to say if this action need backup TODO Delete this ? */
+ private final boolean backup;
+ /** flag to say if this action need write access to repository */
+ private final boolean write;
+ /** flag to say if this action need a commit message to be performed */
+ private boolean commit;
+
+ VCSAction(String libelle, boolean visible, boolean backup, boolean commit, boolean write) {
+ this.libelle = libelle;
+ this.visible = visible;
+ this.backup = backup;
+ this.commit = commit;
+ this.write = write;
+ }
+
+ public String getLibelle() {
+ return _(libelle);
+ }
+
+ public boolean isVisible() {
+ return visible;
+ }
+
+ public boolean isBackup() {
+ return backup;
+ }
+
+ public boolean isWrite() {
+ return write;
+ }
+
+ public boolean isCommit() {
+ return commit;
+ }
+}
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSConnexionMode.java (from rev 371, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionMode.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSConnexionMode.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSConnexionMode.java 2008-04-06 07:03:02 UTC (rev 375)
@@ -0,0 +1,26 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. This program is
+ * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.type;
+
+/**
+ * L'ensemble des typs de connexion VCS connues
+ *
+ * @author chemit
+ */
+public enum VCSConnexionMode {
+ ANONYMOUS,
+ PASSWORD,
+ SSH
+}
Copied: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSEntryLocation.java (from rev 371, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntryLocation.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSEntryLocation.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSEntryLocation.java 2008-04-06 07:03:02 UTC (rev 375)
@@ -0,0 +1,65 @@
+/* ##%
+* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
+* Benjamin Poussin, Tony Chemit
+*
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*##%*/
+package org.codelutin.vcs.type;
+
+import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18n.n_;
+
+/**
+ * a VCSEntryLocation represents where a {@link org.codelutin.vcs.VCSEntry} was found, should be :
+ * <p/>
+ * <ul>
+ * <li>{@link #ALL} : if entry is both on local and on remote</li>
+ * <li>{@link #LOCAL} : if entry is only on local </li>
+ * <li>{@link #REMOTE} : if entryis only on remote</li>
+ * <p/>
+ * </ul>
+ * VCSAction represents an action that can be realized on a file in working
+ * copy or on remote repository.
+ * <p/>
+ * Each <code>VCSAction</code> has 4 properties :
+ * <ul>
+ * <li>libelle : i18n to be used for this action</li>
+ * <li>visible : flag to say if action should be visible in ui</li>
+ * <li>backup : flag to say if this action need backup</li>
+ * <li>write : flag to say if this action need write access to repository</li>
+ * </ul>
+ *
+ * @author chemit
+ */
+(a)org.codelutin.i18n.I18nable
+public enum VCSEntryLocation {
+ ALL(n_("lutinvcs.location.all")),
+ LOCAL(n_("lutinvcs.location.local")),
+ REMOTE(n_("lutinvcs.location.remote")),
+ UNKNOW(n_("lutinvcs.location.unknown"));
+
+ /** libelle of location */
+ private final String libelle;
+
+
+ public String getLibelle() {
+ return _(libelle);
+ }
+
+ VCSEntryLocation(String libelle) {
+ this.libelle = libelle;
+ }
+}
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSState.java (from rev 371, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSState.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSState.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSState.java 2008-04-06 07:03:02 UTC (rev 375)
@@ -0,0 +1,180 @@
+package org.codelutin.vcs.type;
+
+import static org.codelutin.i18n.I18n._;
+import static org.codelutin.i18n.I18n.n_;
+import static org.codelutin.vcs.type.VCSAction.ADD;
+import static org.codelutin.vcs.type.VCSAction.CHANGELOG;
+import static org.codelutin.vcs.type.VCSAction.COMMIT;
+import static org.codelutin.vcs.type.VCSAction.DELETE;
+import static org.codelutin.vcs.type.VCSAction.DIFF;
+import static org.codelutin.vcs.type.VCSAction.OVERWRITE_AND_UPDATE;
+import static org.codelutin.vcs.type.VCSAction.REVERT;
+import static org.codelutin.vcs.type.VCSAction.UPDATE;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * This constants represents all states for a file.
+ * Should contains all static data concerning file state (libelle, actions,
+ * icon link, color,...).
+ * We associate for each state, all VCSActions authorized for this state.
+ */
+(a)org.codelutin.i18n.I18nable
+public enum VCSState {
+
+ /**
+ * when a local file matches the latest remote copy.
+ * <br/>
+ * The only action for this state is to delete the file, nothing else.
+ */
+ UP_TO_DATE("uptodate", n_("lutinvcs.state.uptodate"), VCSEntryLocation.ALL, DELETE),
+
+ /**
+ * when a local file matches a remote copy but not the latest one.
+ * <br/>
+ * This state owns 3 actions :
+ * <ul>
+ * <li>{@link VCSAction#UPDATE}</li>
+ * <li>{@link VCSAction#DIFF}</li>
+ * <li>{@link VCSAction#CHANGELOG}</li>
+ * </ul>
+ */
+ OUT_OF_DATE("outofdate", n_("lutinvcs.state.outofdate"), VCSEntryLocation.REMOTE, UPDATE, DIFF, CHANGELOG),
+
+ /**
+ * when a local file does not matches his remote latest copy, but is based
+ * on.
+ * This state owns 4 actions :
+ * <ul>
+ * <li>{@link VCSAction#COMMIT}</li>
+ * <li>{@link VCSAction#REVERT}</li>
+ * <li>{@link VCSAction#OVERWRITE_AND_UPDATE}</li>
+ * <li>{@link VCSAction#DIFF}</li>
+ * </ul>
+ */
+ MODIFIED("modified", n_("lutinvcs.state.modified"), VCSEntryLocation.LOCAL, COMMIT, OVERWRITE_AND_UPDATE, REVERT, DIFF),
+
+ /**
+ * when a local file does not match the working version remote copy and
+ * there is also new yougest version on remote : this is the worse case
+ * (conflict).
+ * This state owns 4 actions :
+ * <ul>
+ * <li>{@link VCSAction#REVERT}</li>
+ * <li>{@link VCSAction#OVERWRITE_AND_UPDATE}</li>
+ * <li>{@link VCSAction#DIFF}</li>
+ * <li>{@link VCSAction#CHANGELOG}</li>
+ * </ul>
+ */
+ OUT_OF_DATE_AND_MODIFIED("outofdateAndModified", n_("lutinvcs.state.outofdateAndModified"), VCSEntryLocation.ALL, OVERWRITE_AND_UPDATE, REVERT, DIFF, CHANGELOG),
+
+ /**
+ * when a local file does not exist on remote repository.
+ * * This state owns 1 action :
+ * <ul>
+ * <li>{@link VCSAction#ADD}</li>
+ * </ul>
+ */
+ UNVERSIONNED("unversionned", n_("lutinvcs.state.unversionned"), VCSEntryLocation.LOCAL, ADD, REVERT),
+
+ /**
+ * when a file exists on remote repository but not locally.
+ * * This state owns 1 action :
+ * <ul>
+ * <li>{@link VCSAction#UPDATE}</li>
+ * </ul>
+ */
+ MISSING("missing", n_("lutinvcs.state.missing"), VCSEntryLocation.REMOTE, UPDATE),
+
+ /**
+ * when a file is unversionned or missing : this special and durty state
+ * correspond for exemple when you want to add a file under a no checked
+ * directory...
+ * <br/>
+ * <b> This state needs special add and update operation to create unchecked
+ * directories).</b>
+ * This state owns 2 action :
+ * <ul>
+ * <li>{@link VCSAction#ADD}</li>
+ * <li>{@link VCSAction#UPDATE}</li>
+ * <p/>
+ * </ul>
+ */
+ UNVERSIONNED_OR_MISSING("unversionnedOrMissing", n_("lutinvcs.state.unversionnedOrMissing"), VCSEntryLocation.LOCAL, ADD, UPDATE),
+
+ REMOVED("removed", n_("lutinvcs.state.removed"), VCSEntryLocation.LOCAL, DELETE, REVERT),
+
+ /** to deal with other cases (...) */
+ UNKNOWN("unknown", n_("lutinvcs.state.unknown"), null);
+
+
+ /** libelle to be used */
+ private final String libelle;
+ /** key of the state */
+ private final String key;
+
+ /** VCSAction associated with this state */
+ private final List<VCSAction> actions;
+
+ /** location of the state */
+ private VCSEntryLocation location;
+
+ VCSState(String key, String libelle, VCSEntryLocation location, VCSAction... actions) {
+ this.location = location;
+ this.libelle = libelle;
+ List<VCSAction> actions1 = new ArrayList<VCSAction>(Arrays.asList(actions));
+ // refresh action is enabled for all states
+ actions1.add(VCSAction.REFRESH);
+ this.actions = Collections.unmodifiableList(actions1);
+ this.key = key;
+
+ }
+
+ public String libelle() {
+ return _(libelle);
+ }
+
+ public List<VCSAction> getActions() {
+ return actions;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public VCSEntryLocation getLocation() {
+ return location;
+ }
+
+ public boolean isLocal() {
+ return location != VCSEntryLocation.REMOTE;
+ }
+
+ public boolean isRemote() {
+ return location != VCSEntryLocation.LOCAL;
+ }
+
+ public boolean authorizeAction(VCSAction... actions) {
+ java.util.List<VCSAction> acts = java.util.Arrays.asList(actions);
+ for (VCSAction vcsAction : this.actions) {
+ if (acts.contains(vcsAction)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @param key key of required state
+ * @return the <code>VCSState</code> with <code>key</code> as key value,
+ * or <code>null</code> if no state found.
+ */
+ public static VCSState valueOfKey(String key) {
+ for (VCSState state : VCSState.values())
+ if (state.key.equals(key)) return state;
+ return null;
+ }
+}
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSStatus.java (from rev 371, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSStatus.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSStatus.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSStatus.java 2008-04-06 07:03:02 UTC (rev 375)
@@ -0,0 +1,32 @@
+/* *##%
+* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
+* Benjamin Poussin, Tony Chemit
+*
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*##%*/
+package org.codelutin.vcs.type;
+
+public enum VCSStatus {
+ NORMAL,
+ ADDED,
+ MODIFIED,
+ DELETED,
+ UNVERSIONED,
+ MISSING,
+ IGNORED,
+ CONFLICTED,
+ NONE
+}
Copied: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSType.java (from rev 371, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSType.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSType.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSType.java 2008-04-06 07:03:02 UTC (rev 375)
@@ -0,0 +1,31 @@
+/* *##%
+* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
+* Benjamin Poussin, Tony Chemit
+*
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*##%*/
+package org.codelutin.vcs.type;
+
+/**
+ * This type-safe class representing a type of vcs (SVN,CVS,...)
+ *
+ * @author chemit
+ */
+public enum VCSType {
+
+ CVS, SVN, MOCK
+
+}
Copied: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSTypeRepo.java (from rev 371, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSTypeRepo.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSTypeRepo.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSTypeRepo.java 2008-04-06 07:03:02 UTC (rev 375)
@@ -0,0 +1,55 @@
+/* *##%
+* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
+* Benjamin Poussin, Tony Chemit
+*
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*##%*/
+package org.codelutin.vcs.type;
+
+/**
+ * type of repository to used, if no typeRepo (for CVS, use {@link #NONE}
+ *
+ * @author chemit
+ */
+public enum VCSTypeRepo {
+ /** head repo : is writable */
+ HEAD("trunk", false),
+ /** tag repo : readonly */
+ TAG("tags", true),
+ /** branch repo : should be writable ? */
+ BRANCH("branches", false),
+ /** no type of repo : readonly */
+ NONE(null, true);
+
+ /** the path of the type of repo */
+ final String path;
+
+ /** flag to say this type of repo is readonly or not. */
+ final boolean readonly;
+
+ VCSTypeRepo(String path, boolean readOnly) {
+ this.path = path;
+ this.readonly = readOnly;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public boolean isReadonly() {
+ return readonly;
+ }
+}
1
0
[Buix-commits] r374 - trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 07:02:17 +0000 (Sun, 06 Apr 2008)
New Revision: 374
Added:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/
Log:
un paquetage our contenir les constantes (Enum)
1
0