Buix-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
r433 - in trunk/lutinvcs: lutinvcs-api/src/main/java/org/codelutin/vcs lutinvcs-core/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 19:17:09 +0000 (Sun, 06 Apr 2008)
New Revision: 433
Added:
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSCommon.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSConnexion.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSConnexionConfig.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntry.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSException.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSHandler.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSProvider.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSRevision.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSRuntimeException.java
Removed:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSCommon.java
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/VCSException.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
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSRevision.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSRuntimeException.java
Log:
remove module api, now just the core-module :)
Deleted: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSCommon.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSCommon.java 2008-04-06 19:16:23 UTC (rev 432)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSCommon.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -1,302 +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 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
Deleted: 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 19:16:23 UTC (rev 432)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexion.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -1,117 +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;
-
-import org.codelutin.vcs.type.VCSConnexionMode;
-import org.codelutin.vcs.event.VCSConnexionEventListener;
-
-import java.io.File;
-import java.net.URI;
-
-/**
- * Contract to be realized for a connexion to a vcs.
- * <p/>
- * 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.type.VCSConnexionMode , VCSConnexionConfig)} instead.
- *
- * @author chemit
- */
-public interface VCSConnexion<H extends VCSHandler> extends VCSCommon {
-
- /** @return the handler */
- H getHandler();
-
- /**
- * 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.
- */
- File getWorkingCopy() throws IllegalStateException;
-
- /**
- * @return the URI used to connect to vcs
- * @throws IllegalStateException if {@link #init(VCSConnexionConfig)} was not invoked before.
- */
- URI getRemoteURI() throws IllegalStateException;
-
- /**
- * @return the mode of this connexion
- * @throws IllegalStateException if {@link #init(VCSConnexionConfig)} was not invoked before.
- */
- VCSConnexionMode getMode() throws IllegalStateException;
-
- /**
- * @return the config of the connexion
- * @throws IllegalStateException if {@link #init(VCSConnexionConfig)} was not invoked before.
- */
- VCSConnexionConfig getConfig() throws IllegalStateException;
-
- /**
- * test if connection is ok
- *
- * @throws VCSException if any problem
- */
- void testConnection() throws VCSException;
-
- /**
- * Close connexion.
- *
- * @throws IllegalStateException if {@link #init(VCSConnexionConfig)} was not invoked before.
- */
- void open() throws IllegalStateException;
-
- /**
- * Close connexion.
- *
- * @throws IllegalStateException if {@link #init(VCSConnexionConfig)} was not invoked before.
- */
- void close() throws IllegalStateException;
-
- /**
- * @return <code>true</code> if connexion is opened, <code>false</code> otherwise
- * @throws IllegalStateException if {@link #init(VCSConnexionConfig)} was not invoked before.
- */
- boolean isOpen() throws IllegalStateException;
-
- /**
- * @return <code>true</code> if connexion is closed, <code>false</code> otherwise
- * @throws IllegalStateException if {@link #init(VCSConnexionConfig)} was not invoked before.
- */
- boolean isClosed() throws IllegalStateException;
-
- /**
- * @return <code>true</code> if connexion has failed, <code>false</code> otherwise
- * @throws IllegalStateException if {@link #init(VCSConnexionConfig)} was not invoked before.
- */
- boolean hasFailed() throws IllegalStateException;
-
- /** @param l the listener to add */
- void addVCSConnexionEventListener(VCSConnexionEventListener l);
-
- /** @param l the listener to remove */
- void removeVCSConnexionEventListener(VCSConnexionEventListener l);
-
-}
Deleted: 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 19:16:23 UTC (rev 432)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionConfig.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -1,90 +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;
-
-import org.codelutin.vcs.type.VCSTypeRepo;
-
-import java.io.File;
-
-/**
- * Contract to be realized by a VCSConnexion configuration.
- * <p/>
- * This class has no logic, ans is a <code>POJO</code>.
- *
- * @author chemit
- */
-public interface VCSConnexionConfig {
-
- /** @return the type of vcs used */
- String getType();
-
- /** @return <code>true</code> if ssh connexion is used */
- boolean isUseSshConnexion();
-
- /** @return the url of hostname */
- String getHostName();
-
- /** @return location of the private ssh2 key file */
- File getKeyFile();
-
- /** @return the user connexion login */
- String getUserName();
-
- /** @return <code>true</code> if user ssh2 pair keys use a passphrase */
- boolean isNoPassPhrase();
-
- String getPassphrase();
-
- /** @return the full location path of the remote container of module */
- String getRemotePath();
-
- /** @return the name of remote module */
- String getRemoteDatabase();
-
- /** @return the full url path to the remote repository (with module name include) */
- String getRemoteDatabasePath();
-
- File getLocalDatabasePath();
-
- /** @return the type of reposotory used (head,tags,branches,...) */
- VCSTypeRepo getTypeRepo();
-
-
- void setHostName(String hostName);
-
- void setKeyFile(File keyFile);
-
- void setLocalDatabasePath(File localDatabasePath);
-
- void setNoPassPhrase(boolean noPassPhrase);
-
- void setPassPhrase(String passPhrase);
-
- void setRemoteDatabase(String remoteDatabase);
-
- void setRemotePath(String remotePath);
-
- void setType(String type);
-
- void setTypeRepo(VCSTypeRepo typeRepo);
-
- void setUserName(String userName);
-
- void setUseSshConnexion(boolean newValue);
-}
\ No newline at end of file
Deleted: 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 19:16:23 UTC (rev 432)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntries.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -1,141 +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;
-
-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;
-
-/**
- * Contract of list of VCSEntry
- *
- * @author chemit
- */
-public interface VCSEntries {
-
- /**
- * Discover and Populate with all local and remote entries.
- *
- * @param timestamp gloabal timestamp to apply
- * @param connexion connexion used to populate
- * @throws VCSException if any pb with vcs io
- */
- void populate(VCSConnexion connexion, long timestamp) throws VCSException;
-
- /**
- * Populate with no discovering for a given list of local relative paths for a given location type.
- * <p/>
- * Note : <b>We always used the filesystem path separator to encode paths.</b>
- *
- * @param relativeLocalPaths list of local relative path to populate
- * @param location location to be used
- * @param timestamp gloabal timestamp to apply
- * @param connexion connexion used tro refresh
- * @throws VCSException if any pb with vcs io
- */
- void populate(VCSConnexion connexion, List<String> relativeLocalPaths, VCSEntryLocation location, long timestamp) throws VCSException;
-
- /**
- * Populate from pre-computed entries. No discovering is done, nor vcs io operations.
- *
- * @param location given location to use
- * @param states pre-computed states to populate
- */
- void populate(VCSEntryLocation location, VCSEntry[] states);
-
- /**
- * refresh state of the entry.
- *
- * @param entries entries to refresh
- * @param timestamp global timestamp to apply
- * @throws IllegalStateException if entry was never populated
- */
- void refresh(List<VCSEntry> entries, long timestamp) throws IllegalStateException;
-
- /**
- * obtain the array of all {@link VCSAction} found in the given entries
- *
- * @param entries entries to scan
- * @return array of {@link VCSAction} found in entires
- */
- VCSAction[] getActions(List<VCSEntry> entries);
-
- /**
- * obtain the array of all {@link VCSState} found in the given entries
- *
- * @param entries entries to scan
- * @return array of {@link VCSState found in entires
- */
- VCSState[] getStates(List<VCSEntry> entries);
-
- /** clear the internal list of entries. */
- void clear();
-
- /**
- * obtain the list of all entries.
- *
- * @return list of all entries
- * @throws IllegalStateException if entry was never populated
- */
- List<VCSEntry> getEntries() throws IllegalStateException;
-
- /**
- * obtain the list of all entries for a given connexion
- *
- * @param connexion filter connexion
- * @param entries entries to filter
- * @return list of all entries for a given connexion
- */
- List<VCSEntry> filter(VCSConnexion connexion, List<VCSEntry> entries);
-
- /**
- * obtain the list of all entries for a given location
- *
- * @param location filter location
- * @param entries entries to filter
- * @return list of all entries for a given connexion
- */
- List<VCSEntry> filter(VCSEntryLocation location, List<VCSEntry> entries);
-
- /**
- * obtain the list of all entries for a given state
- *
- * @param state filter state
- * @param entries entries to filter
- * @return list of all entries for a given connexion
- */
- List<VCSEntry> filter(VCSState state, List<VCSEntry> entries);
-
- /**
- * obtain the list of all entries for a given selection model
- *
- * @param selectionModel filter from selection model
- * @param entries entries to filter
- * @return list of all entries for a given connexion
- */
- List<VCSEntry> filter(ListSelectionModel selectionModel, List<VCSEntry> entries);
-
- /**
- * obtain the list of all entries for a given action
- *
- * @param action filter state
- * @param entries entries to filter
- * @return list of all entries for a given connexion
- */
- List<VCSEntry> filter(VCSAction action, List<VCSEntry> entries);
-}
Deleted: 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 19:16:23 UTC (rev 432)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntry.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -1,128 +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;
-
-import org.codelutin.vcs.type.VCSEntryLocation;
-import org.codelutin.vcs.type.VCSState;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.Serializable;
-
-/**
- * Contract of an entry in VCS (a file or a dir)
- *
- * @author chemit
- */
-public interface VCSEntry extends Serializable {
-
- /**
- * Populate the state of the entry, this method calls {@link #refresh(long)} method.
- *
- * @param timestamp gloabal timestamp to apply
- * @throws VCSException if anypb with vcs io
- */
- void populate(long timestamp) throws VCSException;
-
- /**
- * refresh state of the entry.
- *
- * @param timestamp global timestamp to apply
- * @throws IllegalStateException if entry was never populated
- * @throws VCSException if anypb with vcs io
- */
- void refresh(long timestamp) throws IllegalStateException, VCSException;
-
- /**
- * Obtain the relative path from root repository to the entry.
- * <p/>
- * Note: <b>We use the filesystem path separator, could not be the same on remote</b>
- *
- * @return the relativePath from local root repository to the entry
- */
- String getRelativeLocalPath();
-
- /**
- * Obtain the relative path from root repository to the entry.
- * <p/>
- * Note: <b>We use the '/' as path separator, could not be the same on local</b>
- *
- * @return the relativePath from remote root repository to the entry
- */
- String getRelativeRemotePath();
-
- /**
- * Obtain the projected entry on local working copy.
- * <p/>
- * Note : <b> the file could not exists.
- *
- * @return the local file represented by this entry
- */
- File getFile();
-
- /** @return connexion used */
- VCSConnexion getConnexion();
-
- /**
- * @return the location of entry
- * @throws IllegalStateException if entry was never populated
- * @see VCSEntryLocation
- */
- VCSEntryLocation getLocation() throws IllegalStateException;
-
- /**
- * @return the last state found for the entry
- * @throws IllegalStateException if entry was never populated
- */
- VCSState getState() throws IllegalStateException;
-
- /**
- * @return the timestamp of the last state synchronization for the entry
- * @throws IllegalStateException if entry was never populated
- */
- long getTimestamp() throws IllegalStateException;
-
- /**
- * @return the rev of entry
- * @throws IllegalStateException if entry was never populated
- */
- String getRev() throws IllegalStateException;
-
- /**
- * @return the changelog of entry from local aginst remote
- * @throws IllegalStateException if entry was never populated
- */
- BufferedReader getChangeLog() throws IllegalStateException;
-
- /**
- * @return the diff of entry from local aginst remote
- * @throws IllegalStateException if entry was never populated
- */
- BufferedReader getDiff() throws IllegalStateException;
-
- /**
- * @return the local entry content
- * @throws IllegalStateException if entry was never populated, or entry is a directory
- */
- BufferedReader getLocalContent() throws IllegalStateException;
-
- /**
- * @return the remote entry content
- * @throws IllegalStateException if entry was never populated, or entry is a directory
- */
- BufferedReader getRemoteContent() throws IllegalStateException;
-
- void setState(VCSState state);
-}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSException.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSException.java 2008-04-06 19:16:23 UTC (rev 432)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSException.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -1,51 +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;
-
-
-/**
- * A generic vcs exception.
- *
- * @author chemit
- */
-
-public class VCSException extends Exception {
-
- private static final long serialVersionUID = -2665066202505740998L;
-
- public VCSException() {
- super();
- }
-
- public VCSException(String message) {
- super(message);
- }
-
- public VCSException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public VCSException(Throwable cause) {
- super(cause);
- }
-
-}
-
-
Deleted: 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 19:16:23 UTC (rev 432)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSHandler.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -1,40 +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;
-
-/**
- * Contract of an VCS handler
- *
- * @author chemit
- */
-
-public interface VCSHandler<C extends VCSConnexion> extends VCSCommon {
-
- /**
- * Attach a connexion to handler.
- * <p/>
- * Note : <b>This method MUST be called before all.</b>
- *
- * @param connexion the connexion to attach
- */
- void setConnexion(C connexion);
-
-
-}
\ No newline at end of file
Deleted: 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 19:16:23 UTC (rev 432)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSProvider.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -1,50 +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;
-
-import org.codelutin.vcs.type.VCSConnexionMode;
-
-/**
- * The contract to be realized to provide vcs communication.
- * <p/>
- * Acts as a handler and connexion factory and manage a single handler instance
- *
- * @author chemit
- * @see VCSHandler
- * @see VCSConnexion
- */
-public interface VCSProvider<C extends VCSConnexion, H extends VCSHandler<C>> {
-
- /** @return the identifier of the vcs provider (eg SVN, CVS, MOCK) */
- String getName();
-
- /** @return the class of implementation of handler to use for this provider */
- Class<H> getHandlerImpl();
-
- /** @return the imclass of implementation of connexion to use for this provider */
- Class<C> getConnexionImpl();
-
- /**
- * Instanciate an new connexion for a given config, and init it.
- * <p/>
- * Note : <b>After this method connexion is init, but not opened.</b>
- *
- * @param mode the mode required
- * @param config the config to be used
- * @return the new connexion initialized <b>but not opened</b>.
- */
- C newConnection(VCSConnexionMode mode, VCSConnexionConfig config);
-
-}
Deleted: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSRevision.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSRevision.java 2008-04-06 19:16:23 UTC (rev 432)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSRevision.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -1,21 +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;
-
-/** @author chemit */
-public interface VCSRevision {
-
- String getValue();
-}
Deleted: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSRuntimeException.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSRuntimeException.java 2008-04-06 19:16:23 UTC (rev 432)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSRuntimeException.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -1,51 +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;
-
-
-/**
- * A generic runtime vcs exception.
- *
- * @author chemit
- */
-
-public class VCSRuntimeException extends RuntimeException {
-
- private static final long serialVersionUID = -2665066202505740998L;
-
- public VCSRuntimeException() {
- super();
- }
-
- public VCSRuntimeException(String message) {
- super(message);
- }
-
- public VCSRuntimeException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public VCSRuntimeException(Throwable cause) {
- super(cause);
- }
-
-}
-
-
Copied: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSCommon.java (from rev 430, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSCommon.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSCommon.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSCommon.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -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
Copied: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSConnexion.java (from rev 430, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexion.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSConnexion.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSConnexion.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -0,0 +1,117 @@
+/**
+ * # #% 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;
+
+import org.codelutin.vcs.type.VCSConnexionMode;
+import org.codelutin.vcs.event.VCSConnexionEventListener;
+
+import java.io.File;
+import java.net.URI;
+
+/**
+ * Contract to be realized for a connexion to a vcs.
+ * <p/>
+ * 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.type.VCSConnexionMode , VCSConnexionConfig)} instead.
+ *
+ * @author chemit
+ */
+public interface VCSConnexion<H extends VCSHandler> extends VCSCommon {
+
+ /** @return the handler */
+ H getHandler();
+
+ /**
+ * 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.
+ */
+ File getWorkingCopy() throws IllegalStateException;
+
+ /**
+ * @return the URI used to connect to vcs
+ * @throws IllegalStateException if {@link #init(VCSConnexionConfig)} was not invoked before.
+ */
+ URI getRemoteURI() throws IllegalStateException;
+
+ /**
+ * @return the mode of this connexion
+ * @throws IllegalStateException if {@link #init(VCSConnexionConfig)} was not invoked before.
+ */
+ VCSConnexionMode getMode() throws IllegalStateException;
+
+ /**
+ * @return the config of the connexion
+ * @throws IllegalStateException if {@link #init(VCSConnexionConfig)} was not invoked before.
+ */
+ VCSConnexionConfig getConfig() throws IllegalStateException;
+
+ /**
+ * test if connection is ok
+ *
+ * @throws VCSException if any problem
+ */
+ void testConnection() throws VCSException;
+
+ /**
+ * Close connexion.
+ *
+ * @throws IllegalStateException if {@link #init(VCSConnexionConfig)} was not invoked before.
+ */
+ void open() throws IllegalStateException;
+
+ /**
+ * Close connexion.
+ *
+ * @throws IllegalStateException if {@link #init(VCSConnexionConfig)} was not invoked before.
+ */
+ void close() throws IllegalStateException;
+
+ /**
+ * @return <code>true</code> if connexion is opened, <code>false</code> otherwise
+ * @throws IllegalStateException if {@link #init(VCSConnexionConfig)} was not invoked before.
+ */
+ boolean isOpen() throws IllegalStateException;
+
+ /**
+ * @return <code>true</code> if connexion is closed, <code>false</code> otherwise
+ * @throws IllegalStateException if {@link #init(VCSConnexionConfig)} was not invoked before.
+ */
+ boolean isClosed() throws IllegalStateException;
+
+ /**
+ * @return <code>true</code> if connexion has failed, <code>false</code> otherwise
+ * @throws IllegalStateException if {@link #init(VCSConnexionConfig)} was not invoked before.
+ */
+ boolean hasFailed() throws IllegalStateException;
+
+ /** @param l the listener to add */
+ void addVCSConnexionEventListener(VCSConnexionEventListener l);
+
+ /** @param l the listener to remove */
+ void removeVCSConnexionEventListener(VCSConnexionEventListener l);
+
+}
Copied: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSConnexionConfig.java (from rev 430, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionConfig.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSConnexionConfig.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSConnexionConfig.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -0,0 +1,90 @@
+/*
+* ##% 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;
+
+import org.codelutin.vcs.type.VCSTypeRepo;
+
+import java.io.File;
+
+/**
+ * Contract to be realized by a VCSConnexion configuration.
+ * <p/>
+ * This class has no logic, ans is a <code>POJO</code>.
+ *
+ * @author chemit
+ */
+public interface VCSConnexionConfig {
+
+ /** @return the type of vcs used */
+ String getType();
+
+ /** @return <code>true</code> if ssh connexion is used */
+ boolean isUseSshConnexion();
+
+ /** @return the url of hostname */
+ String getHostName();
+
+ /** @return location of the private ssh2 key file */
+ File getKeyFile();
+
+ /** @return the user connexion login */
+ String getUserName();
+
+ /** @return <code>true</code> if user ssh2 pair keys use a passphrase */
+ boolean isNoPassPhrase();
+
+ String getPassphrase();
+
+ /** @return the full location path of the remote container of module */
+ String getRemotePath();
+
+ /** @return the name of remote module */
+ String getRemoteDatabase();
+
+ /** @return the full url path to the remote repository (with module name include) */
+ String getRemoteDatabasePath();
+
+ File getLocalDatabasePath();
+
+ /** @return the type of reposotory used (head,tags,branches,...) */
+ VCSTypeRepo getTypeRepo();
+
+
+ void setHostName(String hostName);
+
+ void setKeyFile(File keyFile);
+
+ void setLocalDatabasePath(File localDatabasePath);
+
+ void setNoPassPhrase(boolean noPassPhrase);
+
+ void setPassPhrase(String passPhrase);
+
+ void setRemoteDatabase(String remoteDatabase);
+
+ void setRemotePath(String remotePath);
+
+ void setType(String type);
+
+ void setTypeRepo(VCSTypeRepo typeRepo);
+
+ void setUserName(String userName);
+
+ void setUseSshConnexion(boolean newValue);
+}
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java (from rev 430, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntries.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -0,0 +1,141 @@
+/**
+ * # #% 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;
+
+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;
+
+/**
+ * Contract of list of VCSEntry
+ *
+ * @author chemit
+ */
+public interface VCSEntries {
+
+ /**
+ * Discover and Populate with all local and remote entries.
+ *
+ * @param timestamp gloabal timestamp to apply
+ * @param connexion connexion used to populate
+ * @throws VCSException if any pb with vcs io
+ */
+ void populate(VCSConnexion connexion, long timestamp) throws VCSException;
+
+ /**
+ * Populate with no discovering for a given list of local relative paths for a given location type.
+ * <p/>
+ * Note : <b>We always used the filesystem path separator to encode paths.</b>
+ *
+ * @param relativeLocalPaths list of local relative path to populate
+ * @param location location to be used
+ * @param timestamp gloabal timestamp to apply
+ * @param connexion connexion used tro refresh
+ * @throws VCSException if any pb with vcs io
+ */
+ void populate(VCSConnexion connexion, List<String> relativeLocalPaths, VCSEntryLocation location, long timestamp) throws VCSException;
+
+ /**
+ * Populate from pre-computed entries. No discovering is done, nor vcs io operations.
+ *
+ * @param location given location to use
+ * @param states pre-computed states to populate
+ */
+ void populate(VCSEntryLocation location, VCSEntry[] states);
+
+ /**
+ * refresh state of the entry.
+ *
+ * @param entries entries to refresh
+ * @param timestamp global timestamp to apply
+ * @throws IllegalStateException if entry was never populated
+ */
+ void refresh(List<VCSEntry> entries, long timestamp) throws IllegalStateException;
+
+ /**
+ * obtain the array of all {@link VCSAction} found in the given entries
+ *
+ * @param entries entries to scan
+ * @return array of {@link VCSAction} found in entires
+ */
+ VCSAction[] getActions(List<VCSEntry> entries);
+
+ /**
+ * obtain the array of all {@link VCSState} found in the given entries
+ *
+ * @param entries entries to scan
+ * @return array of {@link VCSState found in entires
+ */
+ VCSState[] getStates(List<VCSEntry> entries);
+
+ /** clear the internal list of entries. */
+ void clear();
+
+ /**
+ * obtain the list of all entries.
+ *
+ * @return list of all entries
+ * @throws IllegalStateException if entry was never populated
+ */
+ List<VCSEntry> getEntries() throws IllegalStateException;
+
+ /**
+ * obtain the list of all entries for a given connexion
+ *
+ * @param connexion filter connexion
+ * @param entries entries to filter
+ * @return list of all entries for a given connexion
+ */
+ List<VCSEntry> filter(VCSConnexion connexion, List<VCSEntry> entries);
+
+ /**
+ * obtain the list of all entries for a given location
+ *
+ * @param location filter location
+ * @param entries entries to filter
+ * @return list of all entries for a given connexion
+ */
+ List<VCSEntry> filter(VCSEntryLocation location, List<VCSEntry> entries);
+
+ /**
+ * obtain the list of all entries for a given state
+ *
+ * @param state filter state
+ * @param entries entries to filter
+ * @return list of all entries for a given connexion
+ */
+ List<VCSEntry> filter(VCSState state, List<VCSEntry> entries);
+
+ /**
+ * obtain the list of all entries for a given selection model
+ *
+ * @param selectionModel filter from selection model
+ * @param entries entries to filter
+ * @return list of all entries for a given connexion
+ */
+ List<VCSEntry> filter(ListSelectionModel selectionModel, List<VCSEntry> entries);
+
+ /**
+ * obtain the list of all entries for a given action
+ *
+ * @param action filter state
+ * @param entries entries to filter
+ * @return list of all entries for a given connexion
+ */
+ List<VCSEntry> filter(VCSAction action, List<VCSEntry> entries);
+}
Copied: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntry.java (from rev 430, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntry.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntry.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntry.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -0,0 +1,128 @@
+/**
+ * # #% 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;
+
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.type.VCSState;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.Serializable;
+
+/**
+ * Contract of an entry in VCS (a file or a dir)
+ *
+ * @author chemit
+ */
+public interface VCSEntry extends Serializable {
+
+ /**
+ * Populate the state of the entry, this method calls {@link #refresh(long)} method.
+ *
+ * @param timestamp gloabal timestamp to apply
+ * @throws VCSException if anypb with vcs io
+ */
+ void populate(long timestamp) throws VCSException;
+
+ /**
+ * refresh state of the entry.
+ *
+ * @param timestamp global timestamp to apply
+ * @throws IllegalStateException if entry was never populated
+ * @throws VCSException if anypb with vcs io
+ */
+ void refresh(long timestamp) throws IllegalStateException, VCSException;
+
+ /**
+ * Obtain the relative path from root repository to the entry.
+ * <p/>
+ * Note: <b>We use the filesystem path separator, could not be the same on remote</b>
+ *
+ * @return the relativePath from local root repository to the entry
+ */
+ String getRelativeLocalPath();
+
+ /**
+ * Obtain the relative path from root repository to the entry.
+ * <p/>
+ * Note: <b>We use the '/' as path separator, could not be the same on local</b>
+ *
+ * @return the relativePath from remote root repository to the entry
+ */
+ String getRelativeRemotePath();
+
+ /**
+ * Obtain the projected entry on local working copy.
+ * <p/>
+ * Note : <b> the file could not exists.
+ *
+ * @return the local file represented by this entry
+ */
+ File getFile();
+
+ /** @return connexion used */
+ VCSConnexion getConnexion();
+
+ /**
+ * @return the location of entry
+ * @throws IllegalStateException if entry was never populated
+ * @see VCSEntryLocation
+ */
+ VCSEntryLocation getLocation() throws IllegalStateException;
+
+ /**
+ * @return the last state found for the entry
+ * @throws IllegalStateException if entry was never populated
+ */
+ VCSState getState() throws IllegalStateException;
+
+ /**
+ * @return the timestamp of the last state synchronization for the entry
+ * @throws IllegalStateException if entry was never populated
+ */
+ long getTimestamp() throws IllegalStateException;
+
+ /**
+ * @return the rev of entry
+ * @throws IllegalStateException if entry was never populated
+ */
+ String getRev() throws IllegalStateException;
+
+ /**
+ * @return the changelog of entry from local aginst remote
+ * @throws IllegalStateException if entry was never populated
+ */
+ BufferedReader getChangeLog() throws IllegalStateException;
+
+ /**
+ * @return the diff of entry from local aginst remote
+ * @throws IllegalStateException if entry was never populated
+ */
+ BufferedReader getDiff() throws IllegalStateException;
+
+ /**
+ * @return the local entry content
+ * @throws IllegalStateException if entry was never populated, or entry is a directory
+ */
+ BufferedReader getLocalContent() throws IllegalStateException;
+
+ /**
+ * @return the remote entry content
+ * @throws IllegalStateException if entry was never populated, or entry is a directory
+ */
+ BufferedReader getRemoteContent() throws IllegalStateException;
+
+ void setState(VCSState state);
+}
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSException.java (from rev 430, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSException.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSException.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSException.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -0,0 +1,51 @@
+/* *##%
+* 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;
+
+
+/**
+ * A generic vcs exception.
+ *
+ * @author chemit
+ */
+
+public class VCSException extends Exception {
+
+ private static final long serialVersionUID = -2665066202505740998L;
+
+ public VCSException() {
+ super();
+ }
+
+ public VCSException(String message) {
+ super(message);
+ }
+
+ public VCSException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public VCSException(Throwable cause) {
+ super(cause);
+ }
+
+}
+
+
Copied: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSHandler.java (from rev 430, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSHandler.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSHandler.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSHandler.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -0,0 +1,40 @@
+/* *##%
+* 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;
+
+/**
+ * Contract of an VCS handler
+ *
+ * @author chemit
+ */
+
+public interface VCSHandler<C extends VCSConnexion> extends VCSCommon {
+
+ /**
+ * Attach a connexion to handler.
+ * <p/>
+ * Note : <b>This method MUST be called before all.</b>
+ *
+ * @param connexion the connexion to attach
+ */
+ void setConnexion(C connexion);
+
+
+}
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSProvider.java (from rev 430, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSProvider.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSProvider.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSProvider.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -0,0 +1,50 @@
+/**
+ * # #% 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;
+
+import org.codelutin.vcs.type.VCSConnexionMode;
+
+/**
+ * The contract to be realized to provide vcs communication.
+ * <p/>
+ * Acts as a handler and connexion factory and manage a single handler instance
+ *
+ * @author chemit
+ * @see VCSHandler
+ * @see VCSConnexion
+ */
+public interface VCSProvider<C extends VCSConnexion, H extends VCSHandler<C>> {
+
+ /** @return the identifier of the vcs provider (eg SVN, CVS, MOCK) */
+ String getName();
+
+ /** @return the class of implementation of handler to use for this provider */
+ Class<H> getHandlerImpl();
+
+ /** @return the imclass of implementation of connexion to use for this provider */
+ Class<C> getConnexionImpl();
+
+ /**
+ * Instanciate an new connexion for a given config, and init it.
+ * <p/>
+ * Note : <b>After this method connexion is init, but not opened.</b>
+ *
+ * @param mode the mode required
+ * @param config the config to be used
+ * @return the new connexion initialized <b>but not opened</b>.
+ */
+ C newConnection(VCSConnexionMode mode, VCSConnexionConfig config);
+
+}
Copied: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSRevision.java (from rev 430, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSRevision.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSRevision.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSRevision.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -0,0 +1,21 @@
+/**
+ * # #% 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;
+
+/** @author chemit */
+public interface VCSRevision {
+
+ String getValue();
+}
Copied: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSRuntimeException.java (from rev 430, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSRuntimeException.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSRuntimeException.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSRuntimeException.java 2008-04-06 19:17:09 UTC (rev 433)
@@ -0,0 +1,51 @@
+/* *##%
+* 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;
+
+
+/**
+ * A generic runtime vcs exception.
+ *
+ * @author chemit
+ */
+
+public class VCSRuntimeException extends RuntimeException {
+
+ private static final long serialVersionUID = -2665066202505740998L;
+
+ public VCSRuntimeException() {
+ super();
+ }
+
+ public VCSRuntimeException(String message) {
+ super(message);
+ }
+
+ public VCSRuntimeException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public VCSRuntimeException(Throwable cause) {
+ super(cause);
+ }
+
+}
+
+
1
0
r432 - in trunk/lutinvcs: lutinvcs-api/src/main/java/org/codelutin/vcs lutinvcs-core/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 19:16:23 +0000 (Sun, 06 Apr 2008)
New Revision: 432
Added:
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/event/
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/type/
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/
Removed:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/
Log:
remove module api, now just the core-module :)
Copied: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/event (from rev 430, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event)
Copied: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/type (from rev 430, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type)
Copied: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util (from rev 430, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util)
1
0
r431 - in trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui: . handler
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 19:06:37 +0000 (Sun, 06 Apr 2008)
New Revision: 431
Removed:
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/VCSAbsractAction.java
Modified:
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java
Log:
clean code + suppress unused action
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java 2008-04-06 18:49:38 UTC (rev 430)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java 2008-04-06 19:06:37 UTC (rev 431)
@@ -15,15 +15,15 @@
package org.codelutin.vcs.ui;
import org.codelutin.vcs.type.VCSAction;
-import org.codelutin.vcs.ui.handler.VCSAbsractAction;
+import javax.swing.AbstractAction;
import javax.swing.JMenuItem;
import java.awt.event.ActionEvent;
/** @author chemit */
public abstract class AbstractVCSPopup extends javax.swing.JPopupMenu {
- protected VCSAbsractAction dispatchAction;
+ protected AbstractAction dispatchAction;
public abstract JMenuItem getRefresh();
@@ -37,12 +37,12 @@
public abstract JMenuItem getDelete();
- public void setDispatchAction(VCSAbsractAction action) {
+ public void setDispatchAction(javax.swing.AbstractAction action) {
this.dispatchAction = action;
}
protected void doAction(VCSAction action, JMenuItem item) {
- dispatchAction.setAction(action);
+ //dispatchAction.setAction(action);
ActionEvent e = new ActionEvent(item, 1, action.name());
dispatchAction.actionPerformed(e);
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java 2008-04-06 18:49:38 UTC (rev 430)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java 2008-04-06 19:06:37 UTC (rev 431)
@@ -52,7 +52,6 @@
public void doSelectLocation(VCSEntryLocation location) {
log.info(location);
getUi().getCardLayout().show(getUi().getPreview(), "tab" + location.name().toLowerCase());
-
}
}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java 2008-04-06 18:49:38 UTC (rev 430)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java 2008-04-06 19:06:37 UTC (rev 431)
@@ -16,9 +16,9 @@
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.ui.AbstractConfirmUI;
import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel;
import org.codelutin.vcs.ui.model.ConfirmUIModel;
-import org.codelutin.vcs.ui.AbstractConfirmUI;
import javax.swing.ListSelectionModel;
import java.beans.PropertyChangeEvent;
@@ -27,21 +27,6 @@
/** @author chemit */
public class ConfirmUIHandler extends org.codelutin.vcs.ui.handler.AbstractUIHandler<ConfirmUIModel, AbstractConfirmUI> {
-
- public ConfirmUIHandler() {
- super();
- //this.ui = new JConfirmUI(this);
- }
-
- /*public void setUi(AbstractConfirmUI ui) {
- this.ui = ui;
- }*/
-
- /*public ConfirmUIModel getModel() {
- return getUi().getModel();
- }*/
-
-
public Class<AbstractConfirmUI> getUiClass() {
return AbstractConfirmUI.class;
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java 2008-04-06 18:49:38 UTC (rev 430)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java 2008-04-06 19:06:37 UTC (rev 431)
@@ -17,32 +17,15 @@
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
-import org.codelutin.vcs.ui.model.DiffUIModel;
import org.codelutin.vcs.ui.AbstractDiffUI;
+import org.codelutin.vcs.ui.model.DiffUIModel;
import java.beans.PropertyChangeEvent;
/** @author chemit */
public class DiffUIHandler extends org.codelutin.vcs.ui.handler.AbstractTabUIHandler<DiffUIModel, AbstractDiffUI> {
- //protected AbstractDiffUI ui;
- public DiffUIHandler() {
- //this.ui = new JDiffUI(this);
- }
-
- /*public AbstractDiffUI getUi() {
- return ui;
- }*/
-
- /*public void setUi(AbstractDiffUI ui) {
- this.ui = ui;
- }
-
- public DiffUIModel getModel() {
- return ui.getModel();
- }*/
-
public Class<AbstractDiffUI> getUiClass() {
return AbstractDiffUI.class;
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java 2008-04-06 18:49:38 UTC (rev 430)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java 2008-04-06 19:06:37 UTC (rev 431)
@@ -12,6 +12,7 @@
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
+import javax.swing.AbstractAction;
import java.awt.event.ActionEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
@@ -21,12 +22,6 @@
/** @author chemit */
public class SynchUIHandler extends org.codelutin.vcs.ui.handler.AbstractTabUIHandler<SynchUIModel, AbstractSynchUI> {
- //protected AbstractSynchUI ui;
-
- public SynchUIHandler() {
- //this.ui = new JSynchUI(this);
- }
-
public Class<AbstractSynchUI> getUiClass() {
return AbstractSynchUI.class;
}
@@ -35,26 +30,6 @@
return SynchUIModel.class;
}
- /*public void setUi(AbstractSynchUI ui) {
- this.ui = ui;
- }
-
- public AbstractSynchUI getUi() {
- return ui;
- }*/
-
- /*public SynchUIModel getModel() {
- return ui.getModel();
- }*/
-
- /*public void doAllAction(VCSAction action) {
- doAction(action, false);
- }
-
- public void doSelectAction(VCSAction action) {
- doAction(action, true);
- }*/
-
@Override
public void doSelectLocation(VCSEntryLocation location) {
@@ -112,12 +87,14 @@
table.addMouseListener(new ListMouseListener(getUi(), fileStatesModel, location));
AbstractVCSPopup popup = getUi().getPopup(location);
- popup.setDispatchAction(new VCSAbsractAction() {
+ popup.setDispatchAction(new AbstractAction() {
+
private static final long serialVersionUID = 8622118724992019898L;
public void actionPerformed(ActionEvent e) {
- doAction(action, false);
+ doAction(VCSAction.valueOf(e.getActionCommand()), true);
}
+
});
}
Deleted: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/VCSAbsractAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/VCSAbsractAction.java 2008-04-06 18:49:38 UTC (rev 430)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/VCSAbsractAction.java 2008-04-06 19:06:37 UTC (rev 431)
@@ -1,39 +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.ui.handler;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.codelutin.vcs.type.VCSAction;
-
-import javax.swing.AbstractAction;
-
-/** @author chemit */
-public abstract class VCSAbsractAction extends AbstractAction {
-
- protected static Log log = LogFactory.getLog(VCSAbsractAction.class);
-
- protected VCSAction action;
-
- private static final long serialVersionUID = 1074145285171920255L;
-
- public VCSAbsractAction() {
- }
-
- public void setAction(VCSAction action) {
- this.action = action;
- }
-
-}
1
0
r430 - trunk/lutinvcs/lutinvcs-ui-jaxx/src/test/resources
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 18:49:38 +0000 (Sun, 06 Apr 2008)
New Revision: 430
Removed:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/test/resources/log4j.properties
Log:
create lutinvcs-all module (will be also used to make global tests)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/test/resources/log4j.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/test/resources/log4j.properties 2008-04-06 18:36:31 UTC (rev 429)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/test/resources/log4j.properties 2008-04-06 18:49:38 UTC (rev 430)
@@ -1,9 +0,0 @@
-# Global logging configuration
-log4j.rootLogger=ERROR, stdout
-# Console output...
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) %M - %m%n
-#log4j.appender.stdout.layout.ConversionPattern=%%c=%c %%C=%C %%d=%d %%F=%F %%l=%l %%L=%L %%m=%m %%M=%M %%p=%p %%r=%r %%t=%t %%x=%x %%X=%X
-# package level
-log4j.logger.org.codelutin=INFO
1
0
r429 - trunk/lutinvcs/lutinvcs-all/src/test/resources
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 18:36:31 +0000 (Sun, 06 Apr 2008)
New Revision: 429
Added:
trunk/lutinvcs/lutinvcs-all/src/test/resources/log4j.properties
Log:
create lutinvcs-all module (will be also used to make global tests)
Copied: trunk/lutinvcs/lutinvcs-all/src/test/resources/log4j.properties (from rev 427, trunk/lutinvcs/lutinvcs-ui-common/src/test/resources/log4j.properties)
===================================================================
--- trunk/lutinvcs/lutinvcs-all/src/test/resources/log4j.properties (rev 0)
+++ trunk/lutinvcs/lutinvcs-all/src/test/resources/log4j.properties 2008-04-06 18:36:31 UTC (rev 429)
@@ -0,0 +1,9 @@
+# Global logging configuration
+log4j.rootLogger=ERROR, stdout
+# Console output...
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) %M - %m%n
+#log4j.appender.stdout.layout.ConversionPattern=%%c=%c %%C=%C %%d=%d %%F=%F %%l=%l %%L=%L %%m=%m %%M=%M %%p=%p %%r=%r %%t=%t %%x=%x %%X=%X
+# package level
+log4j.logger.org.codelutin=INFO
1
0
r428 - trunk/lutinvcs/lutinvcs-ui-jaxx/src/test/java
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 18:35:42 +0000 (Sun, 06 Apr 2008)
New Revision: 428
Removed:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/test/java/org/
Log:
create lutinvcs-all module (will be also used to make global tests)
1
0
r427 - in trunk/lutinvcs: lutinvcs-all/src/test/java/org/codelutin/vcs/ui lutinvcs-ui-jaxx/src/test/java/org/codelutin/vcs/ui
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 18:35:04 +0000 (Sun, 06 Apr 2008)
New Revision: 427
Added:
trunk/lutinvcs/lutinvcs-all/src/test/java/org/codelutin/vcs/ui/UITest.java
Removed:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/test/java/org/codelutin/vcs/ui/UITest.java
Log:
create lutinvcs-all module (will be also used to make global tests)
Copied: trunk/lutinvcs/lutinvcs-all/src/test/java/org/codelutin/vcs/ui/UITest.java (from rev 423, trunk/lutinvcs/lutinvcs-ui-jaxx/src/test/java/org/codelutin/vcs/ui/UITest.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-all/src/test/java/org/codelutin/vcs/ui/UITest.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-all/src/test/java/org/codelutin/vcs/ui/UITest.java 2008-04-06 18:35:04 UTC (rev 427)
@@ -0,0 +1,95 @@
+/**
+ * # #% 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.ui;
+
+import org.codelutin.i18n.I18n;
+import org.codelutin.vcs.VCSConnexion;
+import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.VCSFactory;
+import org.codelutin.vcs.type.VCSConnexionMode;
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.type.VCSState;
+import org.codelutin.vcs.ui.model.SynchUIModel;
+import org.codelutin.vcs.util.VCSConnexionConfigImpl;
+import org.codelutin.vcs.util.VCSEntryImpl;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/** @author chemit */
+public class UITest {
+
+ /** The r. */
+ static java.util.Random r = new java.util.Random();
+
+ public static void main(String[] args) {
+
+ I18n.init();
+
+ VCSConnexion connexion = initVCS(new File(new File("").getAbsolutePath()));
+
+ try {
+ connexion.open();
+
+ AbstractSynchUI ui = VCSUIFactory.newSynchUI();
+
+ fillSynchModel(connexion, ui.getModel(), 20, "trunk", "local/", "remote/");
+
+ ui.setVisible(true);
+
+ } finally {
+ connexion.close();
+ }
+ }
+
+ public static VCSConnexion initVCS(File root) {
+ VCSConnexionConfigImpl config = new VCSConnexionConfigImpl();
+ config.setType("MOCK");
+ config.setLocalDatabasePath(root);
+ VCSConnexion connexion = VCSFactory.newConnexion(VCSConnexionMode.ANONYMOUS, config);
+ connexion.init(config);
+ return connexion;
+ }
+
+ protected static void fillSynchModel(VCSConnexion handler, SynchUIModel model, int max, String prefix, String localPRefix, String remotePrefix) {
+ List<VCSEntry> datas = generateListFileStates(handler, max, prefix, localPRefix, remotePrefix);
+ model.populate(VCSEntryLocation.UNKNOW, datas.toArray(new VCSEntry[datas.size()]));
+ }
+
+ protected static List<VCSEntry> generateListFileStates(VCSConnexion handler, int max, String prefix, String localPRefix, String remotePrefix) {
+ List<VCSEntry> datas = generateLocalFileStates(handler, max, new File(handler.getConfig().getLocalDatabasePath(), prefix), localPRefix);
+ datas.addAll(generateRemoteFileStates(handler, max, new File(handler.getConfig().getLocalDatabasePath(), prefix), remotePrefix));
+ return datas;
+ }
+
+ protected static List<VCSEntry> generateLocalFileStates(VCSConnexion handler, int max, File root, String localPRefix) {
+ return generateFileStates(handler, root, max, localPRefix, VCSState.MODIFIED, VCSState.UNVERSIONNED, VCSState.OUT_OF_DATE_AND_MODIFIED, VCSState.REMOVED);
+ }
+
+ protected static List<VCSEntry> generateRemoteFileStates(VCSConnexion handler, int max, File root, String remotePRefix) {
+ return generateFileStates(handler, root, max, remotePRefix, VCSState.MISSING, VCSState.OUT_OF_DATE, VCSState.OUT_OF_DATE_AND_MODIFIED);
+ }
+
+ protected static List<VCSEntry> generateFileStates(VCSConnexion handler, File root, int max, String prefix, VCSState... states) {
+ List<VCSEntry> datas = new ArrayList<VCSEntry>();
+ for (int i = 0, nbFiles = 1 + r.nextInt(max), size = states.length; i < nbFiles; i++) {
+ VCSEntry state = new VCSEntryImpl(handler, root.getName() + File.separator + prefix + "file" + i);
+ state.setState(states[r.nextInt(size)]);
+ datas.add(state);
+ }
+ return datas;
+ }
+}
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/test/java/org/codelutin/vcs/ui/UITest.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/test/java/org/codelutin/vcs/ui/UITest.java 2008-04-06 18:34:25 UTC (rev 426)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/test/java/org/codelutin/vcs/ui/UITest.java 2008-04-06 18:35:04 UTC (rev 427)
@@ -1,95 +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.ui;
-
-import org.codelutin.i18n.I18n;
-import org.codelutin.vcs.VCSConnexion;
-import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSFactory;
-import org.codelutin.vcs.type.VCSConnexionMode;
-import org.codelutin.vcs.type.VCSEntryLocation;
-import org.codelutin.vcs.type.VCSState;
-import org.codelutin.vcs.ui.model.SynchUIModel;
-import org.codelutin.vcs.util.VCSConnexionConfigImpl;
-import org.codelutin.vcs.util.VCSEntryImpl;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-/** @author chemit */
-public class UITest {
-
- /** The r. */
- static java.util.Random r = new java.util.Random();
-
- public static void main(String[] args) {
-
- I18n.init();
-
- VCSConnexion connexion = initVCS(new File(new File("").getAbsolutePath()));
-
- try {
- connexion.open();
-
- AbstractSynchUI ui = VCSUIFactory.newSynchUI();
-
- fillSynchModel(connexion, ui.getModel(), 20, "trunk", "local/", "remote/");
-
- ui.setVisible(true);
-
- } finally {
- connexion.close();
- }
- }
-
- public static VCSConnexion initVCS(File root) {
- VCSConnexionConfigImpl config = new VCSConnexionConfigImpl();
- config.setType("MOCK");
- config.setLocalDatabasePath(root);
- VCSConnexion connexion = VCSFactory.newConnexion(VCSConnexionMode.ANONYMOUS, config);
- connexion.init(config);
- return connexion;
- }
-
- protected static void fillSynchModel(VCSConnexion handler, SynchUIModel model, int max, String prefix, String localPRefix, String remotePrefix) {
- List<VCSEntry> datas = generateListFileStates(handler, max, prefix, localPRefix, remotePrefix);
- model.populate(VCSEntryLocation.UNKNOW, datas.toArray(new VCSEntry[datas.size()]));
- }
-
- protected static List<VCSEntry> generateListFileStates(VCSConnexion handler, int max, String prefix, String localPRefix, String remotePrefix) {
- List<VCSEntry> datas = generateLocalFileStates(handler, max, new File(handler.getConfig().getLocalDatabasePath(), prefix), localPRefix);
- datas.addAll(generateRemoteFileStates(handler, max, new File(handler.getConfig().getLocalDatabasePath(), prefix), remotePrefix));
- return datas;
- }
-
- protected static List<VCSEntry> generateLocalFileStates(VCSConnexion handler, int max, File root, String localPRefix) {
- return generateFileStates(handler, root, max, localPRefix, VCSState.MODIFIED, VCSState.UNVERSIONNED, VCSState.OUT_OF_DATE_AND_MODIFIED, VCSState.REMOVED);
- }
-
- protected static List<VCSEntry> generateRemoteFileStates(VCSConnexion handler, int max, File root, String remotePRefix) {
- return generateFileStates(handler, root, max, remotePRefix, VCSState.MISSING, VCSState.OUT_OF_DATE, VCSState.OUT_OF_DATE_AND_MODIFIED);
- }
-
- protected static List<VCSEntry> generateFileStates(VCSConnexion handler, File root, int max, String prefix, VCSState... states) {
- List<VCSEntry> datas = new ArrayList<VCSEntry>();
- for (int i = 0, nbFiles = 1 + r.nextInt(max), size = states.length; i < nbFiles; i++) {
- VCSEntry state = new VCSEntryImpl(handler, root.getName() + File.separator + prefix + "file" + i);
- state.setState(states[r.nextInt(size)]);
- datas.add(state);
- }
- return datas;
- }
-}
1
0
Author: tchemit
Date: 2008-04-06 18:34:25 +0000 (Sun, 06 Apr 2008)
New Revision: 426
Modified:
trunk/lutinvcs/pom.xml
Log:
create lutinvcs-all module (will be also used to make global tests)
Modified: trunk/lutinvcs/pom.xml
===================================================================
--- trunk/lutinvcs/pom.xml 2008-04-06 18:34:20 UTC (rev 425)
+++ trunk/lutinvcs/pom.xml 2008-04-06 18:34:25 UTC (rev 426)
@@ -26,7 +26,8 @@
<module>lutinvcs-provider-svn</module>
<module>lutinvcs-ui-common</module>
<module>lutinvcs-ui-jaxx</module>
- <module>lutinvcs-ui</module>
+ <!--module>lutinvcs-ui</module-->
+ <module>lutinvcs-all</module>
</modules>
<!--dependencies>
@@ -244,6 +245,11 @@
<artifactId>lutinvcs-provider-svn</artifactId>
<version>${current.version}</version>
</dependency>
+ <dependency>
+ <groupId>lutinlib.vcs</groupId>
+ <artifactId>lutinvcs-all</artifactId>
+ <version>${current.version}</version>
+ </dependency>
<!--dependency>
<groupId>lutinlib.vcs</groupId>
<artifactId>lutinvcs-site</artifactId>
1
0
r425 - in trunk/lutinvcs/lutinvcs-all/src/test/java: . org org/codelutin 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 18:34:20 +0000 (Sun, 06 Apr 2008)
New Revision: 425
Added:
trunk/lutinvcs/lutinvcs-all/src/test/java/org/
trunk/lutinvcs/lutinvcs-all/src/test/java/org/codelutin/
trunk/lutinvcs/lutinvcs-all/src/test/java/org/codelutin/vcs/
trunk/lutinvcs/lutinvcs-all/src/test/java/org/codelutin/vcs/ui/
Log:
create lutinvcs-all module (will be also used to make global tests)
1
0
06 Apr '08
Author: tchemit
Date: 2008-04-06 18:31:52 +0000 (Sun, 06 Apr 2008)
New Revision: 424
Added:
trunk/lutinvcs/lutinvcs-all/
trunk/lutinvcs/lutinvcs-all/pom.xml
trunk/lutinvcs/lutinvcs-all/src/
Removed:
trunk/lutinvcs/lutinvcs-all/pom.xml
trunk/lutinvcs/lutinvcs-all/src/
trunk/lutinvcs/lutinvcs-ui/
Log:
create lutinvcs-all module (will be also used to make global tests)
Copied: trunk/lutinvcs/lutinvcs-all (from rev 421, trunk/lutinvcs/lutinvcs-ui)
Deleted: trunk/lutinvcs/lutinvcs-all/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-ui/pom.xml 2008-04-06 18:26:19 UTC (rev 421)
+++ trunk/lutinvcs/lutinvcs-all/pom.xml 2008-04-06 18:31:52 UTC (rev 424)
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs</artifactId>
- <version>0.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>lutinvcs-ui</artifactId>
- <name>Lutinvcs ui</name>
-
- <packaging>jar</packaging>
- <version>0.1-SNAPSHOT</version>
- <description>Librairie d'ui vcs</description>
-
- <properties>
- <!--Main class in JAR -->
- <maven.jar.main.class>org.codelutin.vcs.ui.UITest</maven.jar.main.class>
- </properties>
-
- <build>
- <plugins>
- <plugin>
- <groupId>lutinplugin</groupId>
- <artifactId>maven-i18n-plugin</artifactId>
- <executions>
- <execution>
- <phase>process-classes</phase>
- <goals>
- <goal>parserJava</goal>
- <goal>gen</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <!--Librairies-->
- <dependencies>
- <dependency>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs-core</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs-ui-jaxx</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs-provider-mock</artifactId>
- <scope>compile</scope>
- </dependency>
- <!--Jaxx-->
- <dependency>
- <groupId>lutinlib</groupId>
- <artifactId>jaxx</artifactId>
- <scope>compile</scope>
- </dependency>
- </dependencies>
-
-</project>
Copied: trunk/lutinvcs/lutinvcs-all/pom.xml (from rev 423, trunk/lutinvcs/lutinvcs-ui/pom.xml)
===================================================================
--- trunk/lutinvcs/lutinvcs-all/pom.xml (rev 0)
+++ trunk/lutinvcs/lutinvcs-all/pom.xml 2008-04-06 18:31:52 UTC (rev 424)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>lutinlib.vcs</groupId>
+ <artifactId>lutinvcs</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>lutinvcs-all</artifactId>
+ <name>Lutinvcs all</name>
+
+ <packaging>jar</packaging>
+ <version>0.1-SNAPSHOT</version>
+ <description>Lutinvcs all modules</description>
+
+ <build>
+ <!--plugins>
+ <plugin>
+ <groupId>lutinplugin</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>parserJava</goal>
+ <goal>gen</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins-->
+ </build>
+
+ <!--Librairies-->
+ <dependencies>
+ <dependency>
+ <groupId>lutinlib.vcs</groupId>
+ <artifactId>lutinvcs-core</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>lutinlib.vcs</groupId>
+ <artifactId>lutinvcs-provider-mock</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>lutinlib.vcs</groupId>
+ <artifactId>lutinvcs-provider-svn</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>lutinlib.vcs</groupId>
+ <artifactId>lutinvcs-provider-cvs</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>lutinlib.vcs</groupId>
+ <artifactId>lutinvcs-ui-jaxx</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+
+</project>
Copied: trunk/lutinvcs/lutinvcs-all/src (from rev 423, trunk/lutinvcs/lutinvcs-ui/src)
1
0