[Buix-commits] r234 - in trunk/lutinvcs: . doc lutinvcs-api lutinvcs-api/src lutinvcs-api/src/main lutinvcs-api/src/main/java lutinvcs-api/src/main/java/org lutinvcs-api/src/main/java/org/codelutin lutinvcs-api/src/main/java/org/codelutin/vcs lutinvcs-api/src/main/resources lutinvcs-api/src/main/resources/META-INF lutinvcs-api/src/main/resources/META-INF/services lutinvcs-api/src/main/resources/i18n lutinvcs-api/src/resources lutinvcs-api/src/resources/i18n lutinvcs-api/src/site lutinvcs-api/src/site/fr lut
Author: tchemit Date: 2008-03-31 17:02:25 +0000 (Mon, 31 Mar 2008) New Revision: 234 Added: trunk/lutinvcs/.cvsignore trunk/lutinvcs/LICENSE.txt trunk/lutinvcs/changelog trunk/lutinvcs/doc/ trunk/lutinvcs/doc/LutinVcs-api.rst trunk/lutinvcs/doc/LutinVcs-ui.rst trunk/lutinvcs/doc/LutinVcs.rst trunk/lutinvcs/doc/Todo.rst trunk/lutinvcs/doc/index.rst trunk/lutinvcs/lutinvcs-api/ trunk/lutinvcs/lutinvcs-api/.cvsignore trunk/lutinvcs/lutinvcs-api/LICENSE.txt trunk/lutinvcs/lutinvcs-api/changelog trunk/lutinvcs/lutinvcs-api/pom.xml trunk/lutinvcs/lutinvcs-api/src/ trunk/lutinvcs/lutinvcs-api/src/main/ trunk/lutinvcs/lutinvcs-api/src/main/java/ trunk/lutinvcs/lutinvcs-api/src/main/java/org/ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/ConnectionState.java trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSAction.java trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConfig.java trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionMode.java trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSException.java trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSFileState.java trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSHandler.java trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSHandlerProvider.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 trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSState.java trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSStatus.java trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSType.java trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSTypeRepo.java trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSUIAction.java trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/package.html trunk/lutinvcs/lutinvcs-api/src/main/resources/ trunk/lutinvcs/lutinvcs-api/src/main/resources/META-INF/ trunk/lutinvcs/lutinvcs-api/src/main/resources/META-INF/services/ trunk/lutinvcs/lutinvcs-api/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory trunk/lutinvcs/lutinvcs-api/src/main/resources/i18n/ trunk/lutinvcs/lutinvcs-api/src/main/resources/i18n/lutinvcs-api-en_GB.properties trunk/lutinvcs/lutinvcs-api/src/main/resources/i18n/lutinvcs-api-fr_FR.properties trunk/lutinvcs/lutinvcs-api/src/resources/ trunk/lutinvcs/lutinvcs-api/src/resources/i18n/ trunk/lutinvcs/lutinvcs-api/src/resources/i18n/lutinvcs-api-en_GB.properties trunk/lutinvcs/lutinvcs-api/src/resources/i18n/lutinvcs-api-fr_FR.properties trunk/lutinvcs/lutinvcs-api/src/site/ trunk/lutinvcs/lutinvcs-api/src/site/fr/ trunk/lutinvcs/lutinvcs-api/src/site/fr/rst/ trunk/lutinvcs/lutinvcs-api/src/site/fr/rst/devel/ trunk/lutinvcs/lutinvcs-api/src/site/fr/rst/devel/index.rst trunk/lutinvcs/lutinvcs-api/src/site/fr/rst/index.rst trunk/lutinvcs/lutinvcs-api/src/site/fr/rst/todo.rst trunk/lutinvcs/lutinvcs-api/src/site/site_fr.xml trunk/lutinvcs/lutinvcs-api/src/test/ trunk/lutinvcs/lutinvcs-api/src/test/log4j.properties trunk/lutinvcs/lutinvcs-core/ trunk/lutinvcs/lutinvcs-core/.cvsignore trunk/lutinvcs/lutinvcs-core/LICENSE.txt trunk/lutinvcs/lutinvcs-core/changelog trunk/lutinvcs/lutinvcs-core/pom.xml trunk/lutinvcs/lutinvcs-core/src/ trunk/lutinvcs/lutinvcs-core/src/main/ trunk/lutinvcs/lutinvcs-core/src/main/java/ trunk/lutinvcs/lutinvcs-core/src/main/java/org/ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/AbstractVCSHandler.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFileStateImpl.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFileStateManager.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSHandlerFactory.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSHelper.java trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/package.html trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSFileStateTableModel.java trunk/lutinvcs/lutinvcs-core/src/main/resources/ trunk/lutinvcs/lutinvcs-core/src/main/resources/META-INF/ trunk/lutinvcs/lutinvcs-core/src/main/resources/META-INF/services/ trunk/lutinvcs/lutinvcs-core/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/ trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties trunk/lutinvcs/lutinvcs-core/src/site/ trunk/lutinvcs/lutinvcs-core/src/site/fr/ trunk/lutinvcs/lutinvcs-core/src/site/fr/rst/ trunk/lutinvcs/lutinvcs-core/src/site/fr/rst/devel/ trunk/lutinvcs/lutinvcs-core/src/site/fr/rst/devel/index.rst trunk/lutinvcs/lutinvcs-core/src/site/fr/rst/index.rst trunk/lutinvcs/lutinvcs-core/src/site/fr/rst/todo.rst trunk/lutinvcs/lutinvcs-core/src/site/site_fr.xml trunk/lutinvcs/lutinvcs-core/src/test/ trunk/lutinvcs/lutinvcs-core/src/test/java/ trunk/lutinvcs/lutinvcs-core/src/test/java/org/ trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/ trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/ trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/MethodTest.java trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/RepositoryStateTest.java trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSFileStateManagerTest.java trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSHandlerTest.java trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSInitTest.java trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSLocalData.java trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSLocalDataContext.java trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSStateTest.java trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSTest.java trunk/lutinvcs/lutinvcs-core/src/test/resources/ trunk/lutinvcs/lutinvcs-core/src/test/resources/log4j.properties trunk/lutinvcs/lutinvcs-provider-cvs/ trunk/lutinvcs/lutinvcs-provider-cvs/.cvsignore trunk/lutinvcs/lutinvcs-provider-cvs/LICENSE.txt trunk/lutinvcs/lutinvcs-provider-cvs/changelog trunk/lutinvcs/lutinvcs-provider-cvs/pom.xml trunk/lutinvcs/lutinvcs-provider-cvs/src/ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/CVSHandlerProvider.java trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/BasicListener.java trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSCommandResult.java trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSHandler.java trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSHelper.java trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/DirectoryCVSFilter.java trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/SinkHostKeyVerification.java trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/Ssh2Connexion.java trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/META-INF/ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/META-INF/services/ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/META-INF/services/org.codelutin.vcs.VCSHandlerProvider trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/i18n/ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/i18n/lutinvcs-provider-cvs-en_GB.properties trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/i18n/lutinvcs-provider-cvs-fr_FR.properties trunk/lutinvcs/lutinvcs-provider-cvs/src/site/ trunk/lutinvcs/lutinvcs-provider-cvs/src/site/fr/ trunk/lutinvcs/lutinvcs-provider-cvs/src/site/fr/rst/ trunk/lutinvcs/lutinvcs-provider-cvs/src/site/fr/rst/devel/ trunk/lutinvcs/lutinvcs-provider-cvs/src/site/fr/rst/devel/index.rst trunk/lutinvcs/lutinvcs-provider-cvs/src/site/fr/rst/index.rst trunk/lutinvcs/lutinvcs-provider-cvs/src/site/fr/rst/todo.rst trunk/lutinvcs/lutinvcs-provider-cvs/src/site/site_fr.xml trunk/lutinvcs/lutinvcs-provider-cvs/src/test/ trunk/lutinvcs/lutinvcs-provider-cvs/src/test/java/ trunk/lutinvcs/lutinvcs-provider-cvs/src/test/java/org/ trunk/lutinvcs/lutinvcs-provider-cvs/src/test/java/org/codelutin/ trunk/lutinvcs/lutinvcs-provider-cvs/src/test/java/org/codelutin/vcs/ trunk/lutinvcs/lutinvcs-provider-cvs/src/test/java/org/codelutin/vcs/impl/ trunk/lutinvcs/lutinvcs-provider-cvs/src/test/java/org/codelutin/vcs/impl/cvs/ trunk/lutinvcs/lutinvcs-provider-cvs/src/test/java/org/codelutin/vcs/impl/cvs/CVSHandlerTest.java trunk/lutinvcs/lutinvcs-provider-cvs/src/test/java/org/codelutin/vcs/impl/cvs/CVSHelperTest.java trunk/lutinvcs/lutinvcs-provider-cvs/src/test/java/org/codelutin/vcs/impl/cvs/SshConnexionTest.java trunk/lutinvcs/lutinvcs-provider-cvs/src/test/resources/ trunk/lutinvcs/lutinvcs-provider-cvs/src/test/resources/.isis-config-3_cvs trunk/lutinvcs/lutinvcs-provider-cvs/src/test/resources/isis-database-3_cvs.zip trunk/lutinvcs/lutinvcs-provider-cvs/src/test/resources/log4j.properties trunk/lutinvcs/lutinvcs-provider-svn/ trunk/lutinvcs/lutinvcs-provider-svn/.cvsignore trunk/lutinvcs/lutinvcs-provider-svn/LICENSE.txt trunk/lutinvcs/lutinvcs-provider-svn/changelog trunk/lutinvcs/lutinvcs-provider-svn/pom.xml trunk/lutinvcs/lutinvcs-provider-svn/src/ trunk/lutinvcs/lutinvcs-provider-svn/src/main/ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNHandlerProvider.java trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/VCSRevisionImpl.java trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHandler.java trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHelper.java trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/ trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/META-INF/ trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/META-INF/services/ trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/META-INF/services/org.codelutin.vcs.VCSHandlerProvider trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/i18n/ trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/i18n/lutinvcs-provider-svn-en_GB.properties trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/i18n/lutinvcs-provider-svn-fr_FR.properties trunk/lutinvcs/lutinvcs-provider-svn/src/site/ trunk/lutinvcs/lutinvcs-provider-svn/src/site/fr/ trunk/lutinvcs/lutinvcs-provider-svn/src/site/fr/rst/ trunk/lutinvcs/lutinvcs-provider-svn/src/site/fr/rst/devel/ trunk/lutinvcs/lutinvcs-provider-svn/src/site/fr/rst/devel/index.rst trunk/lutinvcs/lutinvcs-provider-svn/src/site/fr/rst/index.rst trunk/lutinvcs/lutinvcs-provider-svn/src/site/fr/rst/todo.rst trunk/lutinvcs/lutinvcs-provider-svn/src/site/site_fr.xml trunk/lutinvcs/lutinvcs-provider-svn/src/test/ trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/ trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/ trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/ trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/ trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/ trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/ trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/FindTypeRepoTest.java trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/SVNHandlerTest.java trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/SVNLogTest.java trunk/lutinvcs/lutinvcs-provider-svn/src/test/resources/ trunk/lutinvcs/lutinvcs-provider-svn/src/test/resources/log4j.properties trunk/lutinvcs/lutinvcs-ui/ trunk/lutinvcs/lutinvcs-ui/.cvsignore trunk/lutinvcs/lutinvcs-ui/LICENSE.txt trunk/lutinvcs/lutinvcs-ui/changelog trunk/lutinvcs/lutinvcs-ui/pom.xml trunk/lutinvcs/lutinvcs-ui/src/ trunk/lutinvcs/lutinvcs-ui/src/main/ trunk/lutinvcs/lutinvcs-ui/src/main/java/ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/VCSRepositoryState.java trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/AbstractTableModel.java trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/FieldAccess.java trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/FieldAccessManager.java trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/FieldModelUtil.java trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/FileStateTableModel.java trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSUpdateDialog.java trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/package.html trunk/lutinvcs/lutinvcs-ui/src/main/resources/ trunk/lutinvcs/lutinvcs-ui/src/main/resources/META-INF/ trunk/lutinvcs/lutinvcs-ui/src/main/resources/META-INF/services/ trunk/lutinvcs/lutinvcs-ui/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory trunk/lutinvcs/lutinvcs-ui/src/main/resources/i18n/ trunk/lutinvcs/lutinvcs-ui/src/main/resources/i18n/lutinvcs-ui-en_GB.properties trunk/lutinvcs/lutinvcs-ui/src/main/resources/i18n/lutinvcs-ui-fr_FR.properties trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/ trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/AddRemove_C32.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/advanced.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/autoRefresh.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/autorefresh-icon.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/clearFilter.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/commit.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/compileSingle.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/conflicts-badge.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/cut.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/diff-next.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/diff-prev.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/diff.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/diff_file_16.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/envelope_small.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/export.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/filter.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/find_next.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/find_previous.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/find_selection.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/generalOptions.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/import-elements.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/local_vs_local.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/locally_mod.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/loop.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/modified-badge.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/newFile24.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/password_field_32.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/paste.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/recent_messages.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/recent_msgs.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/refresh.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/remote_vs_local.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/remote_vs_remote.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/rollback.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/save.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/save24.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/search_types.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/search_types_disabled.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/server.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/update.png trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/versioning-view.png trunk/lutinvcs/lutinvcs-ui/src/main/uimodel/ trunk/lutinvcs/lutinvcs-ui/src/main/uimodel/org/ trunk/lutinvcs/lutinvcs-ui/src/main/uimodel/org/codelutin/ trunk/lutinvcs/lutinvcs-ui/src/main/uimodel/org/codelutin/vcs/ trunk/lutinvcs/lutinvcs-ui/src/main/uimodel/org/codelutin/vcs/ui/ trunk/lutinvcs/lutinvcs-ui/src/main/uimodel/org/codelutin/vcs/ui/VCSUpdateDialog.jaxx trunk/lutinvcs/lutinvcs-ui/src/main/uimodel/org/codelutin/vcs/ui/common.css trunk/lutinvcs/lutinvcs-ui/src/site/ trunk/lutinvcs/lutinvcs-ui/src/site/fr/ trunk/lutinvcs/lutinvcs-ui/src/site/fr/rst/ trunk/lutinvcs/lutinvcs-ui/src/site/fr/rst/devel/ trunk/lutinvcs/lutinvcs-ui/src/site/fr/rst/devel/index.rst trunk/lutinvcs/lutinvcs-ui/src/site/fr/rst/index.rst trunk/lutinvcs/lutinvcs-ui/src/site/fr/rst/todo.rst trunk/lutinvcs/lutinvcs-ui/src/site/site_fr.xml trunk/lutinvcs/lutinvcs-ui/src/test/ trunk/lutinvcs/lutinvcs-ui/src/test/java/ trunk/lutinvcs/lutinvcs-ui/src/test/java/org/ trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/ trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/ trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java trunk/lutinvcs/lutinvcs-ui/src/test/resources/ trunk/lutinvcs/lutinvcs-ui/src/test/resources/log4j.properties trunk/lutinvcs/lutinvcs.ipr trunk/lutinvcs/lutinvcs.iws trunk/lutinvcs/pom.xml trunk/lutinvcs/src/ trunk/lutinvcs/src/site/ trunk/lutinvcs/src/site/fr/ trunk/lutinvcs/src/site/fr/rst/ trunk/lutinvcs/src/site/fr/rst/devel/ trunk/lutinvcs/src/site/fr/rst/devel/index.rst trunk/lutinvcs/src/site/fr/rst/index.rst trunk/lutinvcs/src/site/fr/rst/todo.rst trunk/lutinvcs/src/site/site_fr.xml trunk/lutinvcs/src/xmi/ Log: initial import Added: trunk/lutinvcs/.cvsignore =================================================================== --- trunk/lutinvcs/.cvsignore (rev 0) +++ trunk/lutinvcs/.cvsignore 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,7 @@ +target +velocity.log +maven.log +.eclipse +.classpath +lutinutil.iml +lutinutil.ipr Added: trunk/lutinvcs/LICENSE.txt =================================================================== --- trunk/lutinvcs/LICENSE.txt (rev 0) +++ trunk/lutinvcs/LICENSE.txt 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,280 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS Added: trunk/lutinvcs/changelog =================================================================== --- trunk/lutinvcs/changelog (rev 0) +++ trunk/lutinvcs/changelog 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,3 @@ +ver-0-1 chemit 20080330 + + * premier version apres split depuis lutinutil et isisfish Added: trunk/lutinvcs/doc/LutinVcs-api.rst =================================================================== --- trunk/lutinvcs/doc/LutinVcs-api.rst (rev 0) +++ trunk/lutinvcs/doc/LutinVcs-api.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,17 @@ +=========================== +Documentation - LutinVcsApi +=========================== + +:Authors: Tony CHEMIT +:Contact: chemit@codelutin.com +:Revision: $Revision: 1.0 $ +:Date: $Date: 2008-03-30 10:27:19 $ + +.. sectnum:: + +.. contents:: + + + +TODO +==== Added: trunk/lutinvcs/doc/LutinVcs-ui.rst =================================================================== --- trunk/lutinvcs/doc/LutinVcs-ui.rst (rev 0) +++ trunk/lutinvcs/doc/LutinVcs-ui.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,17 @@ +========================== +Documentation - LutinVcsUi +========================== + +:Authors: Tony CHEMIT +:Contact: chemit@codelutin.com +:Revision: $Revision: 1.0 $ +:Date: $Date: 2008-03-30 10:27:19 $ + +.. sectnum:: + +.. contents:: + + + +TODO +==== Added: trunk/lutinvcs/doc/LutinVcs.rst =================================================================== --- trunk/lutinvcs/doc/LutinVcs.rst (rev 0) +++ trunk/lutinvcs/doc/LutinVcs.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,18 @@ +======================== +Documentation - LutinVcs +======================== + +:Authors: Tony CHEMIT +:Contact: chemit@codelutin.com +:Revision: $Revision: 1.0 $ +:Date: $Date: 2008-03-30 10:27:19 $ + +.. sectnum:: + +.. contents:: + + + + +TODO +==== Added: trunk/lutinvcs/doc/Todo.rst =================================================================== Added: trunk/lutinvcs/doc/index.rst =================================================================== --- trunk/lutinvcs/doc/index.rst (rev 0) +++ trunk/lutinvcs/doc/index.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,46 @@ +LutinUtil +========= + +.. contents:: + + +Pr�sentation +------------ + +Ensemble de classe Java permettant de simplifier le d�veloppement en +factorisant des besoins que l'on retrouve dans tous les d�veloppements. +On y trouve des fonctions de travail sur les cha�nes de caract�res, des +fonctions de parsage des arguements de la ligne de commande, des fonctions +permettant tr�s simplement de rechercher une resource (images, fichier de +propri�t�s, ...), ... + +Librairie Util +-------------- + +Librairie regroupant les utilitaires classiques sur les fichiers, les tableaux, +les collections, les maps, les cha�nes de caract�res, ... De plus elle int�gre +un parser des arguments et des options pour les lignes de commande. + +Librairie LutinLog +------------------ + +Librairie permettant de mettre en place facilement des logs dans les applications. +Elle se base sur commons-logging de cette fa�on toutes les applications existantes +utilisant commons-logging sont compatible avec LutinLog. LutinLog ajout les +fonctionnalit�s suivantes, logger des informations par rapport un utilisateur, +de suivre l'avancement des t�ches, faciliter l'int�gration dans une interface +graphique, ... + +Librairie i18n +-------------- + +Librairie permettant de rendre les programmes Java multilangue de fa�on +simple. Il utilise la m�me philosophie que gettext. C'est � dire que chaque +cha�ne de caract�res devant �tre traduite sont tagge avec I18n._("..."). +Ensuite il suffit d'extraire ces cha?nes pour les mettres dans un fichier de +propri�t�, et d'indiquer quel fichier de propr�?t� charger au d�marrage de +l'application selon la langue souhait�e. + + +**Veuillez consulter la JavaDoc pour de plus ample d�tails sur les diff�rentes +librairies.** Added: trunk/lutinvcs/lutinvcs-api/.cvsignore =================================================================== --- trunk/lutinvcs/lutinvcs-api/.cvsignore (rev 0) +++ trunk/lutinvcs/lutinvcs-api/.cvsignore 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,6 @@ +target +target/* +velocity.log +maven.log +.eclipse +.classpath Added: trunk/lutinvcs/lutinvcs-api/LICENSE.txt =================================================================== --- trunk/lutinvcs/lutinvcs-api/LICENSE.txt (rev 0) +++ trunk/lutinvcs/lutinvcs-api/LICENSE.txt 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,280 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS Added: trunk/lutinvcs/lutinvcs-api/changelog =================================================================== --- trunk/lutinvcs/lutinvcs-api/changelog (rev 0) +++ trunk/lutinvcs/lutinvcs-api/changelog 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,57 @@ +ver-0-26 poussin 2007???? + * bug in concat(Object [] ...), better array type now work + * add unaccent in StringUtil + +ver-0-25 poussin 20070425 + * add StringUtil.toArrayXXX(String ... s) methodes + * use generic + +ver-0-24 poussin + * ArgumentsParser have 1 as repetitionMax by default + * ArgumentsParser use jdk 1.5 syntaxe (..., <>) + +ver-0-23 poussin 20061004 + * move i18n in lutinutil + * add method Resource.getConfigProperties(String, Properties) to chains + properties + +ver-0-22 poussin 20060913 + * use Generics in CategorisedListenerSet + * add org.codelutin.log package (LutinLog, ...) + * remove org.codelutin.util.Log + +ver-0-21 poussin 20060907 + + * Add TransformedList + * Add FileUtil.getTempFile(String):File + * add FileUtil.getFile():File that prompt user + * add FileUtil.getDirectory(): String that prompt user + * add FileUtil.copyRecursively(File, File, String ... patternFilter) + * add ZipUtil class to compress/uncompress zip file + * Transparente*Reference accept null object + +ver-0-17 thimel 20050610 + + * Ajout de BoundedList et BoundedListOutOfBoundsException + +ver-0-16 poussin 20050526 + + * Ajout de la methode getConfigProperties dans Resource + +ver-0-9 poussin 20040728 + + * Ajout de methode isJar, isZip, dans Resource + +ver-0-3 poussin 20040405 + + * utilisation de maven pour la gestion du projet + * Ajout de ExceptionUtil + +ver-0-2 poussin 20031021 + + * ajout du parser d'argument, ArgumentsParser + * ajout de StringUtil + +ver-0-1 + + * premier version contient seulement Resource Added: trunk/lutinvcs/lutinvcs-api/pom.xml =================================================================== --- trunk/lutinvcs/lutinvcs-api/pom.xml (rev 0) +++ trunk/lutinvcs/lutinvcs-api/pom.xml 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,40 @@ +<?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-api</artifactId> + <name>Lutinvcs api</name> + + <packaging>jar</packaging> + <version>0.1-SNAPSHOT</version> + <description>Lutin vcs library api</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></dependencies> +</project> Added: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/ConnectionState.java =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/ConnectionState.java (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/ConnectionState.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,35 @@ +/* +* \#\#% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin, +* Tony Chemit +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* \#\#% */ +package org.codelutin.vcs; + +/** + * Une enumeration pour definir l'�tat du connexion � un serveur vcs. + * + * @author chemit + */ +public enum ConnectionState { + /** lorsque la connexion n'a pas encore initialis�e */ + UNDEFINED, + /** lorsque la connexion est ok, mais que l'on est pas connect� */ + OFF_LINE, + /** lorsque la connexion est �tablie avec succes */ + ON_LINE, + /** lorsque la connexion a tent�e de s'initialiser sans succes */ + ERROR +} Added: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSAction.java =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSAction.java (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSAction.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,98 @@ +/* ##% +* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin, +* Benjamin Poussin, Tony Chemit +* +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*##%*/ +package org.codelutin.vcs; + +import static org.codelutin.i18n.I18n._; +import static org.codelutin.i18n.I18n.n_; + +/** + * a VCSAction represents an action that can be realized on a file in working + * copy or on remote repository. + * <p/> + * Each <code>VCSAction</code> has 4 properties : + * <ul> + * <li>libelle : i18n to be used for this action</li> + * <li>visible : flag to say if action should be visible in ui</li> + * <li>backup : flag to say if this action need backup</li> + * <li>write : flag to say if this action need write access to repository</li> + * </ul> + * + * @author chemit + */ +@org.codelutin.i18n.I18nable +public enum VCSAction { + + /** to add an unversionned file on repository */ + ADD(n_("lutinvcs.action.add"), true, false, true, true), + /** to delete locally and from repository */ + DELETE(n_("lutinvcs.action.delete"), true, true, true, true), + /** to get another version from repository */ + UPDATE(n_("lutinvcs.action.update"), true, true, false, false), + /** to get a clean copy from repository */ + OVERWRITE_AND_UPDATE(n_("lutinvcs.action.overwriteAndUpdate"), true, true, false, false), + /** commit a modification to repository */ + COMMIT(n_("lutinvcs.action.commit"), true, false, true, true), + /** to rollback to working base revision */ + REVERT(n_("lutinvcs.action.revert"), true, true, false, false), + /** to acquire a file from repository */ + CHECKOUT(n_("lutinvcs.action.checkout"), true, false, false, false), + /** to obtain the changelog of a file */ + CHANGELOG(n_("lutinvcs.action.changeLog"), false, false, false, false), + /** to obtain diif */ + DIFF(n_("lutinvcs.action.diff"), false, false, false, false); + + /** libelle of the action */ + private final String libelle; + /** flag to say if action should be visible in ui */ + private final boolean visible; + /** flag to say if this action need backup */ + private final boolean backup; + /** flag to say if this action need write access to repository */ + private final boolean write; + private boolean commit; + + VCSAction(String libelle, boolean visible, boolean backup, boolean commit, boolean write) { + this.libelle = libelle; + this.visible = visible; + this.backup = backup; + this.commit = commit; + this.write = write; + } + + public String getLibelle() { + return _(libelle); + } + + public boolean isVisible() { + return visible; + } + + public boolean isBackup() { + return backup; + } + + public boolean isWrite() { + return write; + } + + public boolean isCommit() { + return commit; + } +} \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConfig.java =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConfig.java (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConfig.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,97 @@ +/* +* ##% 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 java.io.File; + +/** + * Contract to be realised by a VCS config used in VCSHandler + * + * @author chemit + */ +public interface VCSConfig { + + /** + * find out if a connection to remote vcs servsder can be etablished. + * <p/> + * Note : The method is safe and will not throw any exception. + * + * @return <code>true</code> if connection to remote vcs server can be + * etablished. + */ + boolean canConnect(); + + /** @return <code>true</code> if handler is connected to remote vcs server */ + boolean isConnected(); + + /** @return the current connexion state */ + ConnectionState getConnectionState(); + + /** @return the type of vcs used */ + VCSType 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(); + + /** @return <code>true</code> if no connexion is etablish at current time */ + boolean isOffline(); + + /** @return <code>true</code> if remote repository is read-only */ + + boolean isReadOnly(); + + /** @return <code>true</code> if vcs handler is finely init */ + + boolean isInit(); + + /** method to validate vcs configuration. */ + void validate(); + + void setUseSshConnexion(boolean useSshConnexion); + + File getSource(); +} Added: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionMode.java =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionMode.java (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionMode.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,25 @@ +/** + * # #% Copyright (C) 2008 Code Lutin, Tony Chemit + * This program is free software; you + * can redistribute it and/or modify it under the terms of the GNU General + * Public License as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. This program is + * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU General Public License for more details. You + * should have received a copy of the GNU General Public License along with this + * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place + * - Suite 330, Boston, MA 02111-1307, USA. + * # #% + */ +package org.codelutin.vcs; + +/** + * L'ensemble des typs de connexion VCS connues + * + * @author chemit + */ +public enum VCSConnexionMode { + ANONYMOUS, + SSH +} Added: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSException.java =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSException.java (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSException.java 2008-03-31 17:02:25 UTC (rev 234) @@ -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); + } + +} + + Added: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSFileState.java =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSFileState.java (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSFileState.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,60 @@ +/** + * # #% 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 java.io.File; +import java.io.Serializable; + +/** @author chemit */ +public interface VCSFileState extends Serializable { + + boolean existLocally(); + + String getLocalPath(); + + String getModuleName(); + + String getModuleRelativeFileName(); + + String[] getFileNamePath(); + + String getRemotePath(); + + VCSState getState(); + + long getTimestamp(); + + File getFile(); + + String getChangeLog(); + + Long getRev(); + + VCSAction getAction(); + + void resetState(); + + boolean wasSynch(); + + boolean isLocallySynch(); + + void doSynch(VCSHandler handler, long timestamp); + + void doSynch(VCSHandler handler, long timestamp, boolean ifFileChanged); + + void setChangeLog(String changeLog); + + void setAction(VCSAction action); +} Added: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSHandler.java =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSHandler.java (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSHandler.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,318 @@ +/* *##% +* 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 java.io.File; +import java.io.FileFilter; +import java.io.FilenameFilter; +import java.io.IOException; +import java.util.Collection; +import java.util.List; + +/** + * Contract of an VCS handler + * + * @author chemit + */ + +public interface VCSHandler { + + /** @return the location to local working copy */ + File getLocalDatabasePath(); + + /** + * init working copy, says if it is the first we use it it, we will checkout + * the databaseDirectory directory + * + * @throws VCSException if any exception while init + */ + void initWorkingCopy() throws VCSException; + + /** delete the local working copy with all his files */ + void deleteWorkingCopy(); + + /** @return the complete remote url to acces repository */ + String getRemoteUrl(); + + /** @return the config used by this handler */ + VCSConfig getConfig(); + + /** + * @return a + * <code>FilenameFilter<code> to detect all files and directories in a vcs working copy that + * must be handled by vcs + */ + FilenameFilter getVersionnableFilenameFilter(); + + /** + * @return a + * <code>FileFilter<code> to detect all files and directories in a vcs working copy that + * must be handled by vcs + */ + FileFilter getVersionnableFileFilter(); + + /** + * @return name of directory used by vcs to store in working copy, a data's + * directory configuration (e.g CVS for cvs and .svn for svn) + */ + String getConfLocalDirname(); + + /** + * @return name of the file used by vcs to store in working copy + * configuration directory entries of data's directory (e.g Entries + * for cvs and entries for svn) + */ + String getConfLocalEntriesFilename(); + + VCSState getState(File fileState, Collection tmp) throws VCSException; + + VCSState getState(File file, Collection tmp, boolean noremote) throws VCSException; + + /** + * @param file file to test + * @return <code>true</code> if <code>file</code> is on remote + * repository, <code>false</code> otherwise. + */ + boolean isOnRemote(File file); + + /** + * @param file file to test + * @return <code>true</code> if file is uptodate,<code>false</code> + * otherwise. + * @throws VCSException if any exception while operation + */ + boolean isUpToDate(File file) throws VCSException; + + /** + * @param file file to test + * @return <code>true</code> if file is handled by VCS,<code>false</code> + * otherwise. + */ + boolean isVersionnableFile(File file); + + /** + * add on remote repository somes directories + * + * @param commitMessage commit message + * @param dirNames names of the directories to create on remote repository (could + * used multi-level directories) + * @throws VCSException if any exception while operation + */ + void makeRemoteDir(String commitMessage, String... dirNames) + throws VCSException; + + /** + * delete on remote repository somes directories + * + * @param commitMessage commit message + * @param dirNames names of the directories to delete on remote repository (could + * used multi-level directories) + * @throws VCSException if any exception while operation + */ + void deleteRemoteDir(String commitMessage, String... dirNames) + throws VCSException; + + /** + * add a list of files into repository + * + * @param files files to add + * @param msg message for VCS commit, if <code>null</code> then no commit + * is performed + * @return revision of the operation + * @throws VCSException if any exception while operation + */ + long add(List<File> files, String msg) throws VCSException; + + // void add(File file, String msg) throws VCSException; + + /** + * delete a list of files from repository + * + * @param files files to delete + * @param msg message for VCS commit, if <code>null</code> then no commit + * is performed + * @throws VCSException if any exception while operation + */ + void delete(List<File> files, String msg) throws VCSException; + + /** + * revert a list of files from repository + * + * @param files files to revert + * @throws VCSException if any exception while operation + */ + void revert(List<File> files) throws VCSException; + + /** + * commit a list of files into repository + * + * @param files files to commit + * @param msg message for VCS commit + * @return revision of the operation + * @throws VCSException if any exception while operation + */ + long commit(List<File> files, String msg) throws VCSException; + + /** + * update a file to repository to a certain revision + * + * @param file file to update + * @param revision object representing a revision for the current VCS + * @throws VCSException if any exception while operation + */ + void update(File file, Object revision) throws VCSException; + + /** + * update a file to repository + * + * @param file file to update + * @throws VCSException if any exception while operation + */ + void update(File file) throws VCSException; + + /** + * checkout a module from repository to a local file + * + * @param destDir local file where to checkout + * @param module module's name to checkout + * @param recurse flag to say to recurse checkout or not. + * @throws VCSException if any exception while operation + */ + void checkout(File destDir, String module, boolean recurse) + throws VCSException; + + void checkoutFile(File destDir, String module) throws VCSException; + + long checkoutOnlyTheDirectory(File root, Object revision) throws VCSException; + + /** + * TODO This is not the good place : VCS != Storage + * + * @param directory directory to treate + * @return TODO + * @throws VCSException TODO + */ + List<String> getRemoteStorageNames(File directory) throws VCSException; + + /** + * TODO This is not the good place : VCS != Storage + * + * @param directory directory to treate + * @return TODO + */ + List<String> getLocalStorageNames(File directory); + + /** + * @param f local file to treate + * @return current local revision of a file + * @throws VCSException TODO + */ + Object getRevision(File f) throws VCSException; + + /** + * Obtain the list of log entries for the file + * + * @param startRevision TODO + * @param endRevision TODO + * @param file file to treate + * @return list of log entries for this file between two revisions + * @throws VCSException if any exception while grabbing infos + */ + List getLog(Object startRevision, Object endRevision, File file) + throws VCSException; + + /** + * obtain the content of a file for a specific revision + * + * @param file file to obtain + * @param revision revision treated + * @return the content of the file on repository for the specific revision + * passed as arguement. + * @throws VCSException if any exception while operation + * @throws java.io.IOException TODO + */ + String getFileContent(File file, Object revision) throws VCSException, IOException; + + /** + * Build the changelog for <code>file</code> from current revision of this + * local file against head repository head version. For each revision + * between current revision and head revision of this file, we give the + * following informations : + * <ul> + * <li>revision number</li> + * <li>author</li> + * <li>date</li> + * <li>commit message</li> + * </ul> + * + * @param file file to treate + * @return a string representation of change log for the local file to the + * head ? + * @throws VCSException if any exception while building changelog + */ + String getChangeLog(File file) throws VCSException; + + /** + * Generate in the ouputstream the diff between the current revision of the + * local file against headest revision on repository. <br> + * If file is uptodate, then does nothing. + * + * @param file the file to treate + * @return the diff + * @throws VCSException inf any exception while building diff, such as : + * <ul> + * <li>unversionned file</li> + * <li>unexistant file locally</li> + * <li>locally modified file ?</li> + * <li>...</li> + * </ul> + * @throws java.io.IOException if io problem with streams + */ + String getDiff(File file) throws VCSException, IOException; + + /** + * Generate in the ouputstream the diff between the current revision of the + * local file against another revision (<code>againstRevision</code>) on + * repository. <br> + * If file is uptodate, then does nothing. + * + * @param file the file to treate + * @param againstRevision the against revision to use + * @return the diff + * @throws VCSException inf any exception while building diff, such as : + * <ul> + * <li>unversionned file</li> + * <li>unexistant file locally</li> + * <li>locally modified file ?</li> + * <li>...</li> + * </ul> + * @throws java.io.IOException if problem with streams + */ + String getDiff(File file, Object againstRevision) throws VCSException, IOException; + + /** + * test if connection is ok + * + * @throws VCSException if any problem + */ + void testConnection() throws VCSException; + + boolean hasProtocoleChanged() throws VCSException; +} \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSHandlerProvider.java =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSHandlerProvider.java (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSHandlerProvider.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,35 @@ +/** + * # #% 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; + +/** + * Provider de VCSHandler + * + * @author chemit + */ +public interface VCSHandlerProvider<H extends VCSHandler> { + + /** @return the name defining the vcs provider (eg SVN, CVS) */ + String getName(); + + /** + * return a new VCSHandler instance for given config. + * + * @param config svn handler config + * @return the new instance + */ + H newInstance(VCSConfig config); + +} Added: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSRevision.java =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSRevision.java (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSRevision.java 2008-03-31 17:02:25 UTC (rev 234) @@ -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(); +} Added: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSRuntimeException.java =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSRuntimeException.java (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSRuntimeException.java 2008-03-31 17:02:25 UTC (rev 234) @@ -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); + } + +} + + Added: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSState.java =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSState.java (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSState.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,161 @@ +package org.codelutin.vcs; + +import static org.codelutin.i18n.I18n._; +import static org.codelutin.i18n.I18n.n_; +import static org.codelutin.vcs.VCSAction.ADD; +import static org.codelutin.vcs.VCSAction.CHANGELOG; +import static org.codelutin.vcs.VCSAction.COMMIT; +import static org.codelutin.vcs.VCSAction.DELETE; +import static org.codelutin.vcs.VCSAction.DIFF; +import static org.codelutin.vcs.VCSAction.OVERWRITE_AND_UPDATE; +import static org.codelutin.vcs.VCSAction.REVERT; +import static org.codelutin.vcs.VCSAction.UPDATE; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** + * This constants represents all states for a file. + * Should contains all static data concerning file state (libelle, actions, + * icon link, color,...). + * We associate for each state, all VCSActions authorized for this state. + */ +@org.codelutin.i18n.I18nable +public enum VCSState { + + /** + * when a local file matches the latest remote copy. + * <br/> + * The only action for this state is to delete the file, nothing else. + */ + UP_TO_DATE("uptodate", n_("lutinvcs.state.uptodate"), DELETE), + + /** + * when a local file matches a remote copy but not the latest one. + * <br/> + * This state owns 3 actions : + * <ul> + * <li>{@link VCSAction#UPDATE}</li> + * <li>{@link VCSAction#DIFF}</li> + * <li>{@link VCSAction#CHANGELOG}</li> + * </ul> + */ + OUT_OF_DATE("outofdate", n_("lutinvcs.state.outofdate"), + UPDATE, DIFF, CHANGELOG), + + /** + * when a local file does not matches his remote latest copy, but is based + * on. + * This state owns 4 actions : + * <ul> + * <li>{@link VCSAction#COMMIT}</li> + * <li>{@link VCSAction#REVERT}</li> + * <li>{@link VCSAction#OVERWRITE_AND_UPDATE}</li> + * <li>{@link VCSAction#DIFF}</li> + * </ul> + */ + MODIFIED("modified", n_("lutinvcs.state.modified"), + COMMIT, OVERWRITE_AND_UPDATE, REVERT, DIFF), + + /** + * when a local file does not match the working version remote copy and + * there is also new yougest version on remote : this is the worse case + * (conflict). + * This state owns 4 actions : + * <ul> + * <li>{@link VCSAction#REVERT}</li> + * <li>{@link VCSAction#OVERWRITE_AND_UPDATE}</li> + * <li>{@link VCSAction#DIFF}</li> + * <li>{@link VCSAction#CHANGELOG}</li> + * </ul> + */ + OUT_OF_DATE_AND_MODIFIED("outofdateAndModified", + n_("lutinvcs.state.outofdateAndModified"), + OVERWRITE_AND_UPDATE, REVERT, DIFF, CHANGELOG), + + /** + * when a local file does not exist on remote repository. + * * This state owns 1 action : + * <ul> + * <li>{@link VCSAction#ADD}</li> + * </ul> + */ + UNVERSIONNED("unversionned", n_("lutinvcs.state.unversionned"), ADD), + + /** + * when a file exists on remote repository but not locally. + * * This state owns 1 action : + * <ul> + * <li>{@link VCSAction#UPDATE}</li> + * </ul> + */ + MISSING("missing", n_("lutinvcs.state.missing"), UPDATE), + + /** + * when a file is unversionned or missing : this special and durty state + * correspond for exemple when you want to add a file under a no checked + * directory... + * <br/> + * <b> This state needs special add and update operation to create unchecked + * directories).</b> + * This state owns 2 action : + * <ul> + * <li>{@link VCSAction#ADD}</li> + * <li>{@link VCSAction#UPDATE}</li> + * <p/> + * </ul> + */ + UNVERSIONNED_OR_MISSING("unversionnedOrMissing", + n_("lutinvcs.state.unversionnedOrMissing"), ADD, UPDATE), + + /** to deal with other cases (...) */ + UNKNOWN("unknown", n_("lutinvcs.state.unknown")); + + /** libelle to be used */ + private final String libelle; + /** key of the state */ + private final String key; + + /** VCSAction associated with this state */ + private final List<VCSAction> actions; + + VCSState(String key, String libelle, VCSAction... actions) { + this.libelle = libelle; + this.actions = Collections.unmodifiableList(Arrays.asList(actions)); + this.key = key; + } + + public String libelle() { + return _(libelle); + } + + public List<VCSAction> getActions() { + return actions; + } + + public String getKey() { + return key; + } + + public boolean authorizeAction(VCSAction... actions) { + java.util.List<VCSAction> acts = java.util.Arrays.asList(actions); + for (VCSAction vcsAction : this.actions) { + if (acts.contains(vcsAction)) { + return true; + } + } + return false; + } + + /** + * @param key key of required state + * @return the <code>VCSState</code> with <code>key</code> as key value, + * or <code>null</code> if no state found. + */ + public static VCSState valueOfKey(String key) { + for (VCSState state : VCSState.values()) + if (state.key.equals(key)) return state; + return null; + } +} \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSStatus.java =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSStatus.java (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSStatus.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,32 @@ +/* *##% +* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin, +* Benjamin Poussin, Tony Chemit +* +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*##%*/ +package org.codelutin.vcs; + +public enum VCSStatus { + NORMAL, + ADDED, + MODIFIED, + DELETED, + UNVERSIONED, + MISSING, + IGNORED, + CONFLICTED, + NONE +} Added: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSType.java =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSType.java (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSType.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,31 @@ +/* *##% +* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin, +* Benjamin Poussin, Tony Chemit +* +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*##%*/ +package org.codelutin.vcs; + +/** + * This type-safe class representing a type of vcs (SVN,CVS,...) + * + * @author chemit + */ +public enum VCSType { + + CVS, SVN + +} Added: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSTypeRepo.java =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSTypeRepo.java (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSTypeRepo.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,55 @@ +/* *##% +* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin, +* Benjamin Poussin, Tony Chemit +* +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*##%*/ +package org.codelutin.vcs; + +/** + * type of repository to used, if no typeRepo (for CVS, use {@link #NONE} + * + * @author chemit + */ +public enum VCSTypeRepo { + /** head repo : is writable */ + HEAD("trunk", false), + /** tag repo : readonly */ + TAG("tags", true), + /** branch repo : should be writable ? */ + BRANCH("branches", false), + /** no type of repo : readonly */ + NONE(null, true); + + /** the path of the type of repo */ + final String path; + + /** flag to say this type of repo is readonly or not. */ + final boolean readonly; + + VCSTypeRepo(String path, boolean readOnly) { + this.path = path; + this.readonly = readOnly; + } + + public String getPath() { + return path; + } + + public boolean isReadonly() { + return readonly; + } +} Added: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSUIAction.java =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSUIAction.java (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSUIAction.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,23 @@ +package org.codelutin.vcs; + +import javax.swing.JDialog; +import java.util.List; + +/** + * a VCSUIAction represents an action to realize on a file in working copy + * or on remote repository with an possible ui interaction. + * <p/> + * This is the highest api level for vcs using + * <p/> + * The method {@link #doAction(JDialog, org.codelutin.vcs.VCSHandler , List)} fired the action + * on a list of states + */ +public interface VCSUIAction { + /** + * @param dialog the dialog where action was asked + * @param handler vcshandler to use + * @param states list of VCSFileState to treate + * @throws VCSException if any exception while operation + */ + void doAction(JDialog dialog, VCSHandler handler, List<VCSFileState> states) throws VCSException; +} Added: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/package.html =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/package.html (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/package.html 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,11 @@ +<html> +<body> +<h1>Lutin vcs</h1> +Ensemble de l'api de base pour g�rer des Versionning Concurrent System (aka +<code>vcs</code>) tel que CVS ou SVN. +<br/> +On retrouve ici des interfaces, des classes g�n�riques et les objets li�s aux vcs. +<br/> +Auncune impl�mentation n'est fournit actuellement ici. +</body> +</html> \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-api/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1 @@ +org.codelutin.util.LutinLogFactory \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-api/src/main/resources/i18n/lutinvcs-api-en_GB.properties =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/resources/i18n/lutinvcs-api-en_GB.properties (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/resources/i18n/lutinvcs-api-en_GB.properties 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,17 @@ +lutinvcs.action.add=add +lutinvcs.action.changeLog=changeLog +lutinvcs.action.checkout=checkout +lutinvcs.action.commit=commit +lutinvcs.action.delete=delete +lutinvcs.action.diff=diff +lutinvcs.action.overwriteAndUpdate=overwriteAndUpdate +lutinvcs.action.revert=revert +lutinvcs.action.update=update +lutinvcs.state.missing=missing +lutinvcs.state.modified=modified +lutinvcs.state.outofdate=outofdate +lutinvcs.state.outofdateAndModified=outofdateAndModified +lutinvcs.state.unknown=unknown +lutinvcs.state.unversionned=unversionned +lutinvcs.state.unversionnedOrMissing=unversionnedOrMissing +lutinvcs.state.uptodate=uptodate Added: trunk/lutinvcs/lutinvcs-api/src/main/resources/i18n/lutinvcs-api-fr_FR.properties =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/main/resources/i18n/lutinvcs-api-fr_FR.properties (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/main/resources/i18n/lutinvcs-api-fr_FR.properties 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,17 @@ +lutinvcs.action.add=Add +lutinvcs.action.changeLog=journal des changements +lutinvcs.action.checkout=R\u00E9cup\u00E9rer +lutinvcs.action.commit=Commiter +lutinvcs.action.delete=Supprimer +lutinvcs.action.diff=voir les diff\u00E9rences +lutinvcs.action.overwriteAndUpdate=Update +lutinvcs.action.revert=Rollback +lutinvcs.action.update=Update +lutinvcs.state.missing=fichier non pr\u00E9sent localement +lutinvcs.state.modified=fichier modifi\u00E9 +lutinvcs.state.outofdate=fichier obsol\u00E8te +lutinvcs.state.outofdateAndModified=fichier modifi\u00E9 et obsol\u00E8te +lutinvcs.state.unknown=fichier d'\u00E9tat inconnu +lutinvcs.state.unversionned=fichier non versionn\u00E9 +lutinvcs.state.unversionnedOrMissing=fichier non versionn\u00E9 ou non pr\u00E9sent localement +lutinvcs.state.uptodate=fichier \u00E0 jour Added: trunk/lutinvcs/lutinvcs-api/src/resources/i18n/lutinvcs-api-en_GB.properties =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/resources/i18n/lutinvcs-api-en_GB.properties (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/resources/i18n/lutinvcs-api-en_GB.properties 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,17 @@ +lutinvcs.action.add=lutinvcs.action.add +lutinvcs.action.changeLog=lutinvcs.action.changeLog +lutinvcs.action.checkout=lutinvcs.action.checkout +lutinvcs.action.commit=lutinvcs.action.commit +lutinvcs.action.delete=lutinvcs.action.delete +lutinvcs.action.diff=lutinvcs.action.diff +lutinvcs.action.overwriteAndUpdate=lutinvcs.action.overwriteAndUpdate +lutinvcs.action.revert=lutinvcs.action.revert +lutinvcs.action.update=lutinvcs.action.update +lutinvcs.state.missing=lutinvcs.state.missing +lutinvcs.state.modified=lutinvcs.state.modified +lutinvcs.state.outofdate=lutinvcs.state.outofdate +lutinvcs.state.outofdateAndModified=lutinvcs.state.outofdateAndModified +lutinvcs.state.unknown=lutinvcs.state.unknown +lutinvcs.state.unversionned=lutinvcs.state.unversionned +lutinvcs.state.unversionnedOrMissing=lutinvcs.state.unversionnedOrMissing +lutinvcs.state.uptodate=lutinvcs.state.uptodate Added: trunk/lutinvcs/lutinvcs-api/src/resources/i18n/lutinvcs-api-fr_FR.properties =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/resources/i18n/lutinvcs-api-fr_FR.properties (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/resources/i18n/lutinvcs-api-fr_FR.properties 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,17 @@ +lutinvcs.action.add= +lutinvcs.action.changeLog= +lutinvcs.action.checkout= +lutinvcs.action.commit= +lutinvcs.action.delete= +lutinvcs.action.diff= +lutinvcs.action.overwriteAndUpdate= +lutinvcs.action.revert= +lutinvcs.action.update= +lutinvcs.state.missing= +lutinvcs.state.modified= +lutinvcs.state.outofdate= +lutinvcs.state.outofdateAndModified= +lutinvcs.state.unknown= +lutinvcs.state.unversionned= +lutinvcs.state.unversionnedOrMissing= +lutinvcs.state.uptodate= Added: trunk/lutinvcs/lutinvcs-api/src/site/fr/rst/devel/index.rst =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/site/fr/rst/devel/index.rst (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/site/fr/rst/devel/index.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,5 @@ +================== +Lutin vcs api dev +================== + +TODO Added: trunk/lutinvcs/lutinvcs-api/src/site/fr/rst/index.rst =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/site/fr/rst/index.rst (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/site/fr/rst/index.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,5 @@ +============= +Lutin vcs api +============= + +TODO \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-api/src/site/fr/rst/todo.rst =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/site/fr/rst/todo.rst (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/site/fr/rst/todo.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,4 @@ +===================== +Lutinvcs - api - TODO +===================== + Added: trunk/lutinvcs/lutinvcs-api/src/site/site_fr.xml =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/site/site_fr.xml (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/site/site_fr.xml 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<project name="simexplorer-si"> + + <skin> + <groupId>lutinlib</groupId> + <artifactId>lutin-site-skin</artifactId> + <version>0.1</version> + </skin> + + <bannerLeft> + <name>Système d'information - SimExplorer</name> + </bannerLeft> + + <bannerRight> + <src> + http://www.codelutin.com/images/lutinorange-codelutin.png + </src> + <href>http://www.codelutin.com</href> + </bannerRight> + + <poweredBy> + <logo href="http://docutils.sourceforge.net/rst.html" + img="/images/restructuredtext-logo.png" name="reStructuredText"/> + </poweredBy> + + <body> + <menu name="Common Links" inherit="top" /> + <menu ref="parent" /> + <menu ref="reports" /> + + <menu name="Liens"> + <item href="http://java.sun.com/j2se" + name="Le site Java de Sun"> + </item> + </menu> + </body> +</project> Added: trunk/lutinvcs/lutinvcs-api/src/test/log4j.properties =================================================================== --- trunk/lutinvcs/lutinvcs-api/src/test/log4j.properties (rev 0) +++ trunk/lutinvcs/lutinvcs-api/src/test/log4j.properties 2008-03-31 17:02:25 UTC (rev 234) @@ -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 Added: trunk/lutinvcs/lutinvcs-core/.cvsignore =================================================================== --- trunk/lutinvcs/lutinvcs-core/.cvsignore (rev 0) +++ trunk/lutinvcs/lutinvcs-core/.cvsignore 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,7 @@ +target +velocity.log +maven.log +.eclipse +.classpath +lutinutil.iml +lutinutil.ipr Added: trunk/lutinvcs/lutinvcs-core/LICENSE.txt =================================================================== --- trunk/lutinvcs/lutinvcs-core/LICENSE.txt (rev 0) +++ trunk/lutinvcs/lutinvcs-core/LICENSE.txt 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,280 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS Added: trunk/lutinvcs/lutinvcs-core/changelog =================================================================== --- trunk/lutinvcs/lutinvcs-core/changelog (rev 0) +++ trunk/lutinvcs/lutinvcs-core/changelog 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,57 @@ +ver-0-26 poussin 2007???? + * bug in concat(Object [] ...), better array type now work + * add unaccent in StringUtil + +ver-0-25 poussin 20070425 + * add StringUtil.toArrayXXX(String ... s) methodes + * use generic + +ver-0-24 poussin + * ArgumentsParser have 1 as repetitionMax by default + * ArgumentsParser use jdk 1.5 syntaxe (..., <>) + +ver-0-23 poussin 20061004 + * move i18n in lutinutil + * add method Resource.getConfigProperties(String, Properties) to chains + properties + +ver-0-22 poussin 20060913 + * use Generics in CategorisedListenerSet + * add org.codelutin.log package (LutinLog, ...) + * remove org.codelutin.util.Log + +ver-0-21 poussin 20060907 + + * Add TransformedList + * Add FileUtil.getTempFile(String):File + * add FileUtil.getFile():File that prompt user + * add FileUtil.getDirectory(): String that prompt user + * add FileUtil.copyRecursively(File, File, String ... patternFilter) + * add ZipUtil class to compress/uncompress zip file + * Transparente*Reference accept null object + +ver-0-17 thimel 20050610 + + * Ajout de BoundedList et BoundedListOutOfBoundsException + +ver-0-16 poussin 20050526 + + * Ajout de la methode getConfigProperties dans Resource + +ver-0-9 poussin 20040728 + + * Ajout de methode isJar, isZip, dans Resource + +ver-0-3 poussin 20040405 + + * utilisation de maven pour la gestion du projet + * Ajout de ExceptionUtil + +ver-0-2 poussin 20031021 + + * ajout du parser d'argument, ArgumentsParser + * ajout de StringUtil + +ver-0-1 + + * premier version contient seulement Resource Added: trunk/lutinvcs/lutinvcs-core/pom.xml =================================================================== --- trunk/lutinvcs/lutinvcs-core/pom.xml (rev 0) +++ trunk/lutinvcs/lutinvcs-core/pom.xml 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,46 @@ +<?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-core</artifactId> + <name>Lutinvcs core</name> + + <packaging>jar</packaging> + <version>0.1-SNAPSHOT</version> + <description>Lutin vcs library core</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-api</artifactId> + <scope>compile</scope> + </dependency> + </dependencies> +</project> Added: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/AbstractVCSHandler.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/AbstractVCSHandler.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/AbstractVCSHandler.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,134 @@ +/* *##% +* 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.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.codelutin.util.FileUtil; + +import java.io.File; +import java.io.FileFilter; +import java.io.FilenameFilter; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * abstract VCSHandler base with usefull methods that does not need vcs specific code. + * + * @author chemit + */ +public abstract class AbstractVCSHandler implements VCSHandler { + + /** to use log facility, just put in your code: log.info(\"...\"); */ + static protected final Log log = LogFactory.getLog(AbstractVCSHandler.class); + + /** + * FilenameFilter to detect all files in a vcs working copy all files and directories that must be handled by vcs + * + * @see org.codelutin.vcs.VCSHandler#getVersionnableFilenameFilter() + */ + protected final FilenameFilter versionnableFilenameFilter; + protected final FileFilter versionnableFileFilter; + protected final String confLocalDirName; + protected final String confLocalEntriesFilename; + protected final VCSConfig config; + + protected AbstractVCSHandler(VCSConfig config, final String vCSConfLocalDirName, String vCSConfLocalEntriesFilename) { + this.config = config; + this.confLocalDirName = vCSConfLocalDirName; + this.confLocalEntriesFilename = vCSConfLocalEntriesFilename; + this.versionnableFilenameFilter = new FilenameFilter() { + public boolean accept(File dir, String name) { + return !vCSConfLocalDirName.equals(name) && !"CVS".equals(name); + } + }; + this.versionnableFileFilter = new FileFilter() { + public boolean accept(File dir) { + return dir.isFile() || (!vCSConfLocalDirName.equals(dir.getName()) && !"CVS".equals(dir.getName())); + } + }; + } + + public VCSConfig getConfig() { + return config; + } + + public File getLocalDatabasePath() { + return config.getLocalDatabasePath(); + } + + public void deleteWorkingCopy() { + if (getLocalDatabasePath().exists()) { + FileUtil.deleteRecursively(getLocalDatabasePath()); + getLocalDatabasePath().delete(); + } + } + + public FilenameFilter getVersionnableFilenameFilter() { + return versionnableFilenameFilter; + } + + public FileFilter getVersionnableFileFilter() { + return versionnableFileFilter; + } + + public String getConfLocalDirname() { + return confLocalDirName; + } + + public String getConfLocalEntriesFilename() { + return confLocalEntriesFilename; + } + + public boolean isVersionnableFile(File file) { + assertFileExists(file, "file is empty or non existant"); + return !confLocalDirName.equalsIgnoreCase(file.getName()); + } + + public List<String> getLocalStorageNames(File directory) { + List<String> result = new ArrayList<String>(); + if (directory.exists()) { + getFiles0(directory, result, ""); + } + Collections.sort(result); + return result; + } + + protected void getFiles0(File directory, List<String> result, String prefix) { + //TODO put the hardcored value in a property!!! + if (directory.getName().equals("data")) return; + final String[] strings = directory.list(versionnableFilenameFilter); + boolean first = prefix.equals(""); + final String newPrefix = (first ? "" : prefix + File.separator); + + for (String filename : strings) { + final File dir = new File(directory, filename); + if (dir.isDirectory()) + getFiles0(dir, result, newPrefix + dir.getName()); + else result.add(newPrefix + dir.getName()); + } + } + + protected void assertFileExists(File file, String msg) { + if (file == null || !file.exists()) + throw new VCSRuntimeException(msg + " (file passed : [" + file + "])"); + } +} Added: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFileStateImpl.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFileStateImpl.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFileStateImpl.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,258 @@ +package org.codelutin.vcs; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.io.File; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Collection; + +/** + * This class represents the vcs state of a file in a working copy or on remote + * repository. + * <br/> + * For a defined file in a working copy, we only use a instance of the + * class, {@link VCSFileStateManager} is responsible of instanciate thoses + * objects and store them in a cache. + * <br/> + * use method {@link #doSynch(VCSHandler,long)} to doSynch whatever + * local file state. + * use method {@link #doSynch(VCSHandler,long,boolean)} to doSynch only + * if local file state changed (with true value) + * + * @see VCSState + * @see VCSFileStateManager + */ +public class VCSFileStateImpl implements VCSFileState, Serializable { + + /** to use log facility, just put in your code: log.info(\"...\"); */ + static protected final Log log = LogFactory.getLog(VCSFileStateImpl.class); + + /** + * working copy file to deal with (could not exists in file only exists + * on remote repository) + */ + protected File file; + /** a optional module name (if defined, will change getModuleRelativeFileName behavior) */ + protected String moduleName; + /** + * relative path on local file system (use File.separator) to root of local + * working copy + */ + protected String localPath; + /** + * relative path on remote repository (use '/' (should be Remote.separator) + * to root of this repository + */ + protected String remotePath; + /** timestamp of last doSynch or -1 if no doSynch was previously done */ + protected long timestamp; + /** state of the file */ + protected VCSState state; + /** + * index used to identify uniquely each instance (hashcode of + * file.getAbsolutePath()) + */ + protected int key; + /** revision of this file, or null if unversionned */ + protected Long rev; + /** changeLog of the file */ + protected String changeLog; + /** diff of the file */ + protected String diff; + /** action to be programmed for this state */ + protected VCSAction action; + + private static final long serialVersionUID = -815443990862836772L; + + /** + * protected access restriction : you should not instanciate directly + * this class, but use {@link VCSFileStateManager} to do it. + * + * @param handler the vcs handler used with this working copy + * @param file file to be handled + */ + protected VCSFileStateImpl(VCSHandler handler, File file) { + this.file = file; + this.key = file.getAbsolutePath().hashCode(); + String path = file.getAbsolutePath(); + String rootPath = handler.getLocalDatabasePath().getAbsolutePath(); + + if (!path.startsWith(rootPath)) { + throw new VCSRuntimeException("could not create a VCSFileState " + + "for a file not in the root working copy registered in " + + "vcsHandler, but was : [" + file + " ::" + + handler.getLocalDatabasePath() + " ]"); + } + this.localPath = path.substring(rootPath.length() + 1); + // by default moduleName is the first dir of localpath (if any) + int index = this.localPath.indexOf(File.separator); + if (index == -1) { + // this is a module directory + this.moduleName = this.localPath; + this.localPath = ""; + } else { + this.moduleName = this.localPath.substring(0, index); + } + + resetState(); + } + + public boolean existLocally() { + return file.exists(); + } + + public String getLocalPath() { + return localPath; + } + + public String getModuleName() { + return moduleName; + } + + public String getModuleRelativeFileName() { + return "".equals(moduleName) ? getLocalPath() : + "".equals(localPath) ? "" : localPath.substring(moduleName.length() + 1); + } + + public String[] getFileNamePath() { + // TODO Should use File.separator + return getModuleRelativeFileName().split(File.separator); + } + + public String getRemotePath() { + if (remotePath == null) + remotePath = VCSHelper.convertToRemoteName(localPath); + return remotePath; + } + + public VCSState getState() { + return state; + } + + public long getTimestamp() { + return timestamp; + } + + public File getFile() { + return file; + } + + public String getChangeLog() { + return changeLog; + } + + public Long getRev() { + return rev; + } + + public VCSAction getAction() { + return action; + } + + /** + * reset synch for this instance : after this invocation, + * the method {@link #wasSynch()} will return <code>true</code> to means + * that no synch info are available. + */ + public void resetState() { + state = null; + timestamp = -1; + } + + /** + * @return <code>true</code> if there at least one invocation of + * {@link #doSynch(VCSHandler,long)} or + * {@link #doSynch(VCSHandler,long,boolean)} + * was made and no invocation of {@link #resetState()} + * was made after. + */ + public boolean wasSynch() { + return state != null && timestamp != -1; + } + + /** + * @return <code>true</code> if this instance <code>wasSynch</code> and + * the file was not modified since last synch. + */ + public boolean isLocallySynch() { + return wasSynch() && timestamp <= file.lastModified(); + } + + /** + * doSynch this instance with remote repository and put a new timestamp + * the one passed as parameter. + * + * @param handler vcs handler to use + * @param timestamp the new synch timestamp + */ + public void doSynch(VCSHandler handler, long timestamp) { + doSynch(handler, timestamp, false); + } + + /** + * doSynch this instance with remote repository and put a new timestamp + * the one passed as parameter. + * Do not doSynch if <code>ifFileChanged</code> is <code>true</code> + * and file was not modify since last synch. + * + * @param handler vcs handler to use + * @param timestamp the new synch timestamp + * @param ifFileChanged if <code>true</code> will doSynch only if file + * was locally modified after last doSynch + */ + public void doSynch(VCSHandler handler, long timestamp, + boolean ifFileChanged) { + //TODO should deal with possibility of file existed but no more... + boolean needSynch = !wasSynch() || + !ifFileChanged || timestamp <= file.lastModified(); + + try { + if (needSynch) { + this.timestamp = timestamp; + Collection tmp = new ArrayList(); + this.state = handler.getState(file, tmp); + if (!tmp.isEmpty()) this.rev = (Long) tmp.iterator().next(); + log.info(" new synch " + this); + } + } catch (VCSException e) { + log.warn("could not acquire state for " + this + " : " + e.getMessage()); + resetState(); + } + } + + @Override + public boolean equals(Object o) { + return this == o || !(o == null || getClass() != o.getClass()) && + localPath.equals(((VCSFileStateImpl) o).localPath); + } + + @Override + public int hashCode() { + return localPath.hashCode(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(localPath).append('(').append(key).append(')'). + append('|').append(state).append('|').append(timestamp); + return sb.toString(); + } + + @Override + public VCSFileStateImpl clone() throws CloneNotSupportedException { + return (VCSFileStateImpl) super.clone(); + } + + + public void setChangeLog(String changeLog) { + this.changeLog = changeLog; + } + + public void setAction(VCSAction action) { + this.action = action; + } +} + Added: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFileStateManager.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFileStateManager.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFileStateManager.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,276 @@ +/* ##% +* 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.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.io.File; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.TreeMap; + +/** + * Classe responsable de la gestion des {@link VCSFileStateImpl}. + * <p/> + * Elle permet leur instanciation, et g�re un cache de ces objets, la politique + * �tant de n'instancier qu'une seule fois et ensuite d'utiliser les methodes de + * synchronisations. + * <br/> + * TODO Doc + * {@link #doSynch()} + * {@link #getState(long,File)} ()} + * {@link #doAdd(VCSHandler,File)} + * {@link #doDelete(File)} + * {@link #doClear()} + * {@link #doReset()} + * + * @author chemit + */ +public class VCSFileStateManager { + + protected static VCSHandler getVCSHanler() { + return VCSHandlerFactory.getHandler(); + } + + static public List<VCSFileState> doScan(VCSHandler handler, File root, boolean changeLog, + VCSState... states) throws VCSException { + // TODO on devrait changer l'algorithme, pour ne recuperer + // TODO que ce qui est reellement est necessaire + + // recupereration des fichier locaux + List<String> localFileNames = handler.getLocalStorageNames(root); + + // recuperation des fichiers distants + List<String> remoteFileNames = handler.getRemoteStorageNames(root); + + // recuperation des fichiers uniquement presents sur le repository distant + List<String> newRemoteName = new ArrayList<String>(remoteFileNames); + newRemoteName.removeAll(localFileNames); + + List<VCSFileState> vcsstates = new ArrayList<VCSFileState>(); + + long timestamp = System.nanoTime(); + + for (String filePath : localFileNames) { + File f = new File(root, filePath); + vcsstates.add(getState(timestamp, f)); + } + + for (String filePath : newRemoteName) { + File f = new File(root, filePath); + vcsstates.add(getState(timestamp, f)); + } + + final List<VCSFileState> result = filter(vcsstates, states); + if (changeLog) { + // compute all change log for selected files + for (VCSFileState vcsFileState : result) + vcsFileState.setChangeLog(handler.getChangeLog(vcsFileState.getFile())); + } + return result; + } + + // ///////////////////////////////////////////////////////////////////////// + // / methodes getState(XXX) pour obtenir des etats du cache (avec creation + // / si besoin est) + // ///////////////////////////////////////////////////////////////////////// + + static public VCSFileState getState(long timestamp, File f) { + return getState(getVCSHanler(), timestamp, f); + } + + static public VCSFileState getState(boolean synch, File f) { + return getState(getVCSHanler(), synch, f); + } + + static public VCSFileState getState(VCSHandler handler, boolean synch, + File f) { + VCSFileState result; + synchronized (cache) { + final int key = getKey(f); + result = cache.get(key); + if (result == null) { + result = doAdd(handler, f); + } + if (synch) { + result.doSynch(handler, System.nanoTime()); + } + } + return result; + } + + static public VCSFileState getState(VCSHandler handler, long timestamp, File f) { + VCSFileState result; + synchronized (cache) { + final int key = getKey(f); + result = cache.get(key); + if (result == null) { + result = doAdd(handler, f); + } + result.doSynch(handler, timestamp); + } + return result; + } + + static public VCSFileState[] getState(VCSHandler handler, boolean synch, + Collection<File> f) { + VCSFileState[] result = new VCSFileState[f.size()]; + + int index = 0; + for (File file : f) { + result[index] = getState(handler, synch, file); + index++; + } + return result; + } + + // ///////////////////////////////////////////////////////////////////////// + // / methodes doSynch(XXX) pour synchroniser les �tats du cache + // ///////////////////////////////////////////////////////////////////////// + + static public void doSynch() { + doSynch(getVCSHanler(), false, System.nanoTime()); + } + + static public void doSynch(VCSHandler handler, boolean ifFileChanged, + long timestamp) { + synchronized (cache) { + for (Integer hashcode : cache.keySet()) { + cache.get(hashcode).doSynch(handler, timestamp, ifFileChanged); + } + } + } + + static public void doSynch(VCSHandler handler, Collection<File> files) { + doSynch(handler, false, System.nanoTime(), files); + } + + static public void doSynch(VCSHandler handler, boolean ifFileChanged, + long timestamp, Collection<File> files) { + synchronized (cache) { + for (File file : files) { + VCSFileState vcsFileState = cache.get(getKey(file)); + if (vcsFileState == null) + vcsFileState = doAdd(getVCSHanler(), file); + vcsFileState.doSynch(handler, timestamp, ifFileChanged); + } + } + } + + // ///////////////////////////////////////////////////////////////////////// + // methodes protected doAdd(XXX) pour ajouter directement des etats au cache + // ///////////////////////////////////////////////////////////////////////// + + static protected VCSFileState doAdd(VCSHandler handler, File f) { + VCSFileState result; + synchronized (cache) { + final int key = getKey(f); + cache.put(key, result = new VCSFileStateImpl(handler, f)); + log.debug("[cache size:" + cache.size() + "] : " + result); + } + return result; + } + + // //////////////////////////////////////////////////////////////////////// + // methodes doDelete(XXX) pour supprimer des etats du cache + // //////////////////////////////////////////////////////////////////////// + + static public void doDelete(File file) { + synchronized (cache) { + cache.remove(getKey(file)); + } + } + + // ///////////////////////////////////////////////////////////////////////// + // / clean cache methods + // ///////////////////////////////////////////////////////////////////////// + + static public void doReset() { + synchronized (cache) { + for (Integer hashcode : cache.keySet()) { + cache.get(hashcode).resetState(); + } + } + } + + static public void doClear() { + synchronized (cache) { + cache.clear(); + } + } + + protected VCSFileStateManager() { + } + + static private int getKey(File file) { + return file.getAbsolutePath().hashCode(); + } + + /** to use log facility, just put in your code: log.info(\"...\"); */ + static protected final Log log = LogFactory + .getLog(VCSFileStateManager.class); + + /** cache of VCSFileState, keys are relativePath.hashCode of each entry */ + static final protected java.util.Map<Integer, VCSFileState> cache = new TreeMap<Integer, VCSFileState>(); + + // ///////////////////////////////////////////////////////////////////////// + // / utils methods (filter and explode from VCSAction and VCSState) + // ///////////////////////////////////////////////////////////////////////// + @SuppressWarnings({"unchecked"}) + static public List<VCSFileState>[] explode(List<VCSFileState> source, + VCSState... wanted) { + if (wanted.length == 0) + wanted = VCSState.values(); + int nbState = wanted.length; + List<VCSFileState>[] result = new List[nbState]; + for (int i = 0; i < nbState; i++) { + result[i] = new ArrayList<VCSFileState>(); + } + List<VCSState> states = java.util.Arrays.asList(wanted); + VCSState state; + int index; + for (VCSFileState fileState : source) { + state = fileState.getState(); + if ((index = states.indexOf(state)) > -1) { + result[index].add(fileState); + } + } + return result; + } + + static public List<VCSFileState> filter(List<VCSFileState> source, + VCSState... wanted) { + List<VCSFileState> result = new ArrayList<VCSFileState>(); + List<VCSState> states = java.util.Arrays.asList(wanted); + + if (wanted.length == 0) { + return result; + } + for (VCSFileState fileState : source) { + VCSState currentState = fileState.getState(); + if (states.contains(currentState)) { + result.add(fileState); + } + } + return result; + } +} Added: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSHandlerFactory.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSHandlerFactory.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSHandlerFactory.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,136 @@ +/* *##% +* 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.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import static org.codelutin.i18n.I18n._; +import org.codelutin.util.StringUtil; + +import java.util.ServiceLoader; + +/** + * TODO + * + * @author chemit + * @see VCSConfig + * @see VCSHandler + */ +@org.codelutin.i18n.I18nable +public class VCSHandlerFactory { + + static protected final Log log = LogFactory.getLog(VCSHandlerFactory.class); + + static private VCSHandlerFactory instance; + + /** current config to use */ + private VCSConfig config; + + /** current vcs handler to use */ + private VCSHandler handler; + + /** providers availables */ + private ServiceLoader<VCSHandlerProvider> providers; + + public static VCSHandlerFactory getInstance() { + if (instance == null) { + instance = new VCSHandlerFactory(); + } + return instance; + } + + public static VCSConfig getConfig() { + VCSHandlerFactory factory = getInstance(); + factory.assertConfigIsNotNull(factory.config); + return factory.config; + } + + public static void setConfig(VCSConfig value) { + getInstance().config = value; + } + + public static VCSHandler getHandler() { + final VCSHandlerFactory factory = getInstance(); + if (factory.handler == null) { + synchronized (factory) { + factory.handler = newHandler(getConfig()); + } + } + return factory.handler; + } + + /** + * instanciate a new handler, using a previously instanciate handler config. + * <p/> + * the method will produce a runtime exception if config is null and not init. + * + * @param config config to use + * @return the new handler instance + */ + public static VCSHandler newHandler(VCSConfig config) { + VCSHandlerFactory factory = getInstance(); + + factory.assertConfigIsInit(config); + VCSHandlerProvider<?> provider = factory.getProvider(config); + if (provider == null) { + throw new IllegalArgumentException("could not find a provider for type " + config.getType()); + } + return provider.newInstance(getConfig()); + } + + private VCSHandlerFactory() { + long t0 = System.nanoTime(); + providers = ServiceLoader.load(VCSHandlerProvider.class); + int nb = 0; + for (VCSHandlerProvider provider : providers) { + nb++; + } + log.info("found " + nb + " provider(s) " + providers.toString() + " in " + StringUtil.convertTime(t0, System.nanoTime())); + for (VCSHandlerProvider provider : providers) { + log.info(provider.getName() + " [" + provider + ']'); + } + } + + private VCSHandlerProvider getProvider(VCSConfig config) { + + String type = config.getType().name(); + + for (VCSHandlerProvider provider : providers) { + if (type.equals(provider.getName())) { + return provider; + } + } + return null; + } + + private void assertConfigIsNotNull(VCSConfig vcsConfig) { + if (vcsConfig == null) { + throw new VCSRuntimeException(_("lutinvcs.error.init.no.config", VCSHandlerFactory.class.getName())); + } + } + + private void assertConfigIsInit(VCSConfig config) { + assertConfigIsNotNull(config); + if (!config.isInit()) { + throw new VCSRuntimeException(_("lutinvcs.error.init.config", config)); + } + } + +} \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSHelper.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSHelper.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSHelper.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,216 @@ +/* *##% +* 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.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import static org.codelutin.i18n.I18n._; + +import java.io.File; +import java.util.EnumSet; + +@org.codelutin.i18n.I18nable +public class VCSHelper { + + private static final String LOCAL_SEP = File.separator; + private static final String LOCAL_SEP_PATTERN = "\\".equals(LOCAL_SEP) ? + LOCAL_SEP + LOCAL_SEP : LOCAL_SEP; + private static final String REMOTE_SEP = "/"; + private static final String REMOTE_SEP_PATTERN = "/"; + + + /** to use log facility, just put in your code: log.info(\"...\"); */ + static private Log log = LogFactory.getLog(VCSHelper.class); + + public static boolean isFileInWorkingCopy(File parent, String name, VCSHandler handler, boolean underVCS) { + if (parent == null || name == null) + throw new RuntimeException(VCSHelper.class.getName() + + "#isFileInWorkingCopy can not be invoked with some " + + "null parameter but was. [" + parent + "," + name + "," + + handler + "]"); + return isFileInWorkingCopy(new File(parent, name), handler, underVCS); + } + + public static boolean isFileInWorkingCopy(File file, VCSHandler handler, boolean underVCS) { + if (file == null || handler == null) + throw new RuntimeException(VCSHelper.class.getName() + + "#isFileInWorkingCopy can not be invoked with some " + + "null parameter but was. [" + file + "," + handler + "]"); + String rootPath = VCSHandlerFactory.getConfig().getLocalDatabasePath().getAbsolutePath(); + String localPath = file.getAbsolutePath(); + if (localPath.startsWith(rootPath) && !underVCS) { + return true; + } + final File realDir = file.isDirectory() ? file : file.getParentFile(); + return isFileInCheckedDir(realDir, handler); + } + + public static boolean isFileInCheckedDir(File file, VCSHandler handler) { + if (file == null || handler == null) + throw new RuntimeException(VCSHelper.class.getName() + + "#isFileInCheckedDir can not be invoked with some " + + "null parameter but was. [" + file + "," + handler + "]"); + final File realDir = file.isDirectory() ? file : file.getParentFile(); + return (new File(realDir, handler.getConfLocalDirname()).exists()); + + } + + public static void assertFileInWC(File file, VCSHandler handler) { + if (!isFileInWorkingCopy(file, handler, false)) + throw new VCSRuntimeException("the file [" + file + + "] is not in the working copy [" + + handler.getLocalDatabasePath() + "]"); + } + + public static String getRemoteRelativePath(File f, VCSHandler handler) { + if (!isFileInWorkingCopy(f, handler, false)) return null; + //System.out.println("file on vcs working copy : "+f); + String rootPath = handler.getConfig().getLocalDatabasePath().getAbsolutePath(); + String localPath = f.getAbsolutePath(); + if (!localPath.startsWith(rootPath)) return null; + localPath = localPath.substring(rootPath.length() + 1); + return convertToRemoteName(localPath); + } + + public static String getLocalRelativePath(String remoteRelativePath, VCSHandler handler) { + String localPath = convertToLocalName(remoteRelativePath); + final File file = new File(handler.getConfig().getLocalDatabasePath(), localPath); + if (!isFileInWorkingCopy(file, handler, false)) return null; + return localPath; + } + + public static String convertToRemoteName(String txt) { + return txt.replaceAll(LOCAL_SEP_PATTERN, REMOTE_SEP); + } + + public static String convertToLocalName(String txt) { + return txt.replaceAll(REMOTE_SEP_PATTERN, LOCAL_SEP); + } + + public static void doCheckoutDir(VCSHandler handler, File... dirs) { + for (File dir : dirs) { + try { + if (!dir.exists() || !isFileInWorkingCopy(dir, handler, true)) { + handler.checkoutOnlyTheDirectory(dir, null); + } + } catch (Exception eee) { + log.warn(_("lutinvcs.error.checkout.dir", dir), eee); + break; + } + } + } + + /** + * @param typeRepo the type of repo to used + * @param remotePath the unclean remote path to use + * @return the remote path from the old one according to given type repo + */ + public static String getRemotePath(VCSTypeRepo typeRepo, String remotePath) { + String result = cleanRemotePath(remotePath); + switch (typeRepo) { + case BRANCH: + case TAG: + result = remotePath + '/' + typeRepo.getPath(); + break; + case HEAD: + result = remotePath; + break; + } + return result; + } + + /** + * @param typeRepo the type of repo to use + * @param version the version to use + * @return the remoteDatabase according to type of repo and version + */ + public static String getRemoteDatabase(VCSTypeRepo typeRepo, String version) { + String result = null; + switch (typeRepo) { + case BRANCH: + case TAG: + result = version; + break; + case HEAD: + result = VCSTypeRepo.HEAD.getPath(); + break; + } + return result; + } + + /** + * to clean a remote path from typeRepo suffix. + * <p/> + * For example, having a url svn://XXX/trunk then remove /trunk. + * <p/> + * Or if having svn://XXX/branches/YYY then remove /branches/YYY + * Or if having svn://XXX/tags/YYY then remove /tags/YYY + * + * @param remotePath the remote path to clean + * @return the cleaned remote path + */ + public static String cleanRemotePath(String remotePath) { + int pos = remotePath.indexOf(VCSTypeRepo.BRANCH.getPath()); + if (pos > -1) { + // found a branch + remotePath = remotePath.substring(0, pos - 1); + } else { + pos = remotePath.indexOf(VCSTypeRepo.HEAD.getPath()); + if (pos > -1) { + // found a branch + remotePath = remotePath.substring(0, pos - 1); + } else { + pos = remotePath.indexOf(VCSTypeRepo.TAG.getPath()); + if (pos > -1) { + // found a tag + remotePath = remotePath.substring(0, pos - 1); + } else { + // remote path was clean + } + } + } + return remotePath; + } + + + /** + * Obtain the set of permitted vcs actions. + * + * @return the EnumSet of authorized action according to current vcs config + */ + public static EnumSet<VCSAction> getAuthorizedActions() { + boolean canWrite = hasWriteAccess(); + EnumSet<VCSAction> result = EnumSet.noneOf(VCSAction.class); + for (VCSAction vcsAction : VCSAction.values()) { + if (!vcsAction.isWrite() || canWrite) { + result.add(vcsAction); + } + } + return result; + } + + public static boolean isConnected() { + return VCSHandlerFactory.getConfig().isConnected(); + } + + public static boolean hasWriteAccess() { + return !VCSHandlerFactory.getConfig().isReadOnly(); + } +} \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/package.html =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/package.html (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/package.html 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,11 @@ +<html> +<body> +<h1>Lutin vcs</h1> +Ensemble de l'api de base pour g�rer des Versionning Concurrent System (aka +<code>vcs</code>) tel que CVS ou SVN. +<br/> +On retrouve ici des interfaces, des classes g�n�riques et les objets li�s aux vcs. +<br/> +Auncune impl�mentation n'est fournit actuellement ici. +</body> +</html> \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSFileStateTableModel.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSFileStateTableModel.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSFileStateTableModel.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,200 @@ +/* +* ##% 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.ui; + +import static org.codelutin.i18n.I18n._; +import static org.codelutin.i18n.I18n.n_; +import org.codelutin.vcs.VCSAction; +import org.codelutin.vcs.VCSFileState; +import org.codelutin.vcs.VCSState; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; + +/** Simple Table model to display list of VCSFileState */ +@org.codelutin.i18n.I18nable +public class VCSFileStateTableModel extends javax.swing.table.AbstractTableModel { + + private final String[] colomnNames = new String[]{ + n_("lutinvcs.module"), + n_("lutinvcs.file"), + n_("lutinvcs.status") + }; + + protected List<VCSFileState> data; + + private static final long serialVersionUID = 4697917831388337369L; + + protected VCSFileStateTableModel() { + super(); + } + + public VCSFileStateTableModel(List<VCSFileState> data) throws RuntimeException { + super(); + setData(data); + } + + public List<VCSFileState> getData() { + return data; + } + + public int getColumnCount() { + return colomnNames.length; + } + + public int getRowCount() { + return data == null ? 0 : data.size(); + } + + @Override + public Class<?> getColumnClass(int columnIndex) { + return String.class; + } + + @Override + public String getColumnName(int columnIndex) { + return _(colomnNames[columnIndex]); + } + + @Override + public boolean isCellEditable(int rowIndex, int columnIndex) { + return false; + } + + @Override + public void setValueAt(Object aValue, int rowIndex, int columnIndex) { + // read only data + } + + public Object getValueAt(int rowIndex, int columnIndex) { + if (isEmpty()) return null; + VCSFileState item = data.get(rowIndex); + Object result = null; + if (columnIndex == 0) { + // get module + result = item.getModuleName(); + } else if (columnIndex == 1) { + // get file + result = item.getFile().getName(); + } else if (columnIndex == 2) { + // get status + result = item.getState(); + } + return result; + } + + public void setData(List<VCSFileState> states) { + if (data != null) { + data.clear(); + data.addAll(states); + } else { + data = new ArrayList<VCSFileState>(states); + } + fireTableDataChanged(); + } + + public void addData(VCSFileState... states) { + if (data != null) { + data.addAll(Arrays.asList(states)); + } else { + data = new ArrayList<VCSFileState>(Arrays.asList(states)); + } + fireTableDataChanged(); + } + + public void removeData(VCSFileState... states) { + if (isEmpty()) { + return; + } + data.removeAll(Arrays.asList(states)); + fireTableDataChanged(); + } + + private boolean isEmpty() { + return data == null || data.isEmpty(); + } + + public void clear() { + if (isEmpty()) { + return; + } + data.clear(); + fireTableDataChanged(); + } + + public VCSFileState[] getData(VCSAction action) { + if (isEmpty()) { + return new VCSFileState[0]; + } + List<VCSFileState> list = new ArrayList<VCSFileState>(data); + for (Iterator<VCSFileState> it = list.iterator(); it.hasNext();) { + VCSFileState fileState = it.next(); + List<VCSAction> actions = fileState.getState().getActions(); + if (!actions.contains(action)) { + it.remove(); + } + } + return list.toArray(new VCSFileState[list.size()]); + } + + public VCSFileState[] getData(VCSState action) { + if (isEmpty()) { + return new VCSFileState[0]; + } + List<VCSFileState> list = new ArrayList<VCSFileState>(data); + for (Iterator<VCSFileState> it = list.iterator(); it.hasNext();) { + VCSFileState fileState = it.next(); + if (!action.equals(fileState.getState())) { + it.remove(); + } + } + return list.toArray(new VCSFileState[list.size()]); + } + + public VCSState[] getStates() { + if (isEmpty()) { + return new VCSState[0]; + } + List<VCSState> result = new ArrayList<VCSState>(); + for (VCSFileState vcsFileState : data) { + VCSState state = vcsFileState.getState(); + if (state != null && !result.contains(state)) { + result.add(state); + } + } + return result.toArray(new VCSState[result.size()]); + } + + public VCSAction[] getActions() { + if (isEmpty()) { + return new VCSAction[0]; + } + List<VCSAction> result = new ArrayList<VCSAction>(); + for (VCSFileState vcsFileState : data) { + VCSAction action = vcsFileState.getAction(); + if (action != null && !result.contains(action)) { + result.add(action); + } + } + return result.toArray(new VCSAction[result.size()]); + } +} \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-core/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1 @@ +org.codelutin.util.LutinLogFactory \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,6 @@ +lutinvcs.error.checkout.dir=Can''t checkout dir {0} +lutinvcs.error.init.config=config is not init, you should invoke on the config validate(true) method to validate it and finish his init {0} +lutinvcs.error.init.no.config=should invoke {0}\#init(VCSType,Properties) before required instance. +lutinvcs.file=File +lutinvcs.module=Module +lutinvcs.status=Status Added: trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,6 @@ +lutinvcs.error.checkout.dir=Can''t checkout dir {0} +lutinvcs.error.init.config=config is not init, you should invoke on the config validate(true) method to validate it and finish his init {0} +lutinvcs.error.init.no.config=should invoke {0}\#init(VCSType,Properties) before required instance. +lutinvcs.file=Fichier +lutinvcs.module=Module +lutinvcs.status=Status Added: trunk/lutinvcs/lutinvcs-core/src/site/fr/rst/devel/index.rst =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/site/fr/rst/devel/index.rst (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/site/fr/rst/devel/index.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,5 @@ +=================== +Lutin vcs core dev +=================== + +TODO Added: trunk/lutinvcs/lutinvcs-core/src/site/fr/rst/index.rst =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/site/fr/rst/index.rst (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/site/fr/rst/index.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,5 @@ +============== +Lutin vcs core +============== + +TODO \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-core/src/site/fr/rst/todo.rst =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/site/fr/rst/todo.rst (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/site/fr/rst/todo.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,4 @@ +====================== +Lutinvcs - core - TODO +====================== + Added: trunk/lutinvcs/lutinvcs-core/src/site/site_fr.xml =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/site/site_fr.xml (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/site/site_fr.xml 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<project name="simexplorer-si"> + + <skin> + <groupId>lutinlib</groupId> + <artifactId>lutin-site-skin</artifactId> + <version>0.1</version> + </skin> + + <bannerLeft> + <name>Système d'information - SimExplorer</name> + </bannerLeft> + + <bannerRight> + <src> + http://www.codelutin.com/images/lutinorange-codelutin.png + </src> + <href>http://www.codelutin.com</href> + </bannerRight> + + <poweredBy> + <logo href="http://docutils.sourceforge.net/rst.html" + img="/images/restructuredtext-logo.png" name="reStructuredText"/> + </poweredBy> + + <body> + <menu name="Common Links" inherit="top" /> + <menu ref="parent" /> + <menu ref="reports" /> + + <menu name="Liens"> + <item href="http://java.sun.com/j2se" + name="Le site Java de Sun"> + </item> + </menu> + </body> +</project> Added: trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/MethodTest.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/MethodTest.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/MethodTest.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,19 @@ +/** + * # #% 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 MethodTest { +} Added: trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/RepositoryStateTest.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/RepositoryStateTest.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/RepositoryStateTest.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,68 @@ +package org.codelutin.vcs; + +import static org.codelutin.vcs.VCSType.SVN; + +import java.io.File; +import java.util.List; + +public class RepositoryStateTest extends VCSTest { + static protected int start, last; + + static protected int[] interval; + + static protected VCSLocalDataContext context; + + protected void setUpVars() { + vcsType = SVN; + resetConfiguration = true; + } + + @Override + protected void initConfig() throws Exception { + super.initConfig(); + context = new VCSLocalDataContext(getLocalDatabaseFile()); + initVCS(); + } + + protected void tearDownVars() throws Exception { + resetConfiguration = null; + vcsType = null; + disposeVCS(); + } + + // ///////////////////////////////////////////////////////////////////////// + // / Demarrage du scenario + // ///////////////////////////////////////////////////////////////////////// + + static List<File> list, list2; + + static VCSState state; + + static long rev1, rev2, rev3; + + @MethodTest + public final void testObtainFileState() { + //fail("Not yet implemented"); // TODO + } + + // ///////////////////////////////////////////////////////////////////////// + // / Methodes utiles + // ///////////////////////////////////////////////////////////////////////// + + protected void setCommand(VCSState stateToTest, String command) { + setCommand(start, last, stateToTest, command); + } + + protected void setCommand(int pStart, int pLast, VCSState stateToTest, + String command) { + state = stateToTest; + if (!(pStart == start && pLast == last)) { + start = pStart; + last = pLast; + interval = context.getIndex(pStart, pLast); + } + log.info("[state:" + state + "] [" + command + "] on interval [" + + start + "," + last + "]"); + } + +} Added: trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSFileStateManagerTest.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSFileStateManagerTest.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSFileStateManagerTest.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,251 @@ +package org.codelutin.vcs; + +import static org.codelutin.vcs.VCSLocalData.FILE; +import static org.codelutin.vcs.VCSState.MISSING; +import static org.codelutin.vcs.VCSState.MODIFIED; +import static org.codelutin.vcs.VCSState.OUT_OF_DATE; +import static org.codelutin.vcs.VCSState.OUT_OF_DATE_AND_MODIFIED; +import static org.codelutin.vcs.VCSState.UNKNOWN; +import static org.codelutin.vcs.VCSState.UNVERSIONNED; +import static org.codelutin.vcs.VCSState.UP_TO_DATE; + +import java.io.File; +import static java.io.File.separator; +import java.util.ArrayList; +import static java.util.Arrays.asList; +import java.util.List; + +/** + * VCSFileStateManager Tester. + * + * @author <Authors name> + * @version 1.0 + * @since <pre>10/14/2007</pre> + */ +public class VCSFileStateManagerTest extends VCSTest { + + static protected int start, last; + static protected int[] interval; + + static protected VCSHandler svnhandler; + static protected VCSLocalDataContext context; + + protected void setUpVars() { + vcsType = VCSType.SVN; + resetConfiguration = true; + } + + @Override + protected void initConfig() throws Exception { + super.initConfig(); + context = new VCSLocalDataContext(getLocalDatabaseFile()); + + initVCS(); + + } + + protected void tearDownVars() throws Exception { + resetConfiguration = null; + vcsType = null; + disposeVCS(); + } + + /////////////////////////////////////////////////////////////////////////// + /// Demarrage du scenario + /////////////////////////////////////////////////////////////////////////// + + static List<File> list, list2; + static List<VCSFileState> listS, list2S; + static VCSState state; + static long rev1, rev2, rev3; + + @MethodTest + public void testUnknowState() throws Exception { + + // get n files unexisiting files and assert state is unknown + setCommand(0, 2, UNKNOWN, ""); + + list = context.getFile(VCSLocalData.FILE, interval); + + listS = new ArrayList<VCSFileState>(); + for (File file : list) + listS.add(VCSFileStateManager.getState(handler, false, file)); + list2S = asList(VCSFileStateManager.getState(handler, false, list)); + assertEquals(listS, list2S); + + assertFileState(list, listS, null, false); + + assertFileState(list, listS, state, true); + + listS = new ArrayList<VCSFileState>(); + for (File file : list) + listS.add(VCSFileStateManager.getState(handler, true, file)); + + assertFileState(list, asList( + VCSFileStateManager.getState(handler, true, list)), state, true); + + list2 = context.getFile(VCSLocalData.FILE, "subdir" + separator, + interval); + + assertFileState(list2, list2S, state, true); + + } + + @MethodTest + public void testUnversionnedState() throws Exception { + + // create n files and assert that state is unversionned + setCommand(UNVERSIONNED, ""); + + list = context.create(VCSLocalData.FILE, interval); + assertFileState(list, listS, state, true); + + list2 = context.create(VCSLocalData.FILE, "subdir" + separator, + interval); + assertFileState(list2, list2S, state, true); + } + + @MethodTest + public void testUpToDateState() throws Exception { + + // add n files and assert to state is up to date + + setCommand(UP_TO_DATE, ""); + + //list = context.getFile(VCSLocalData.FILE, interval); + + rev1 = handler.add(list, FILE.getCommitMessage("add", this)); + + assertFileState(list, listS, state, true); + } + + @MethodTest + public void testMissingState() throws Exception { + + // delete locally 5 file and assert to state is missing + + setCommand(MISSING, ""); + + //list = context.getFile(VCSLocalData.FILE, interval); + + context.delete(VCSLocalData.FILE, interval); + + assertFileState(list, listS, state, true); + + for (File file : list) handler.update(file); + + assertFileState(list, listS, UP_TO_DATE, true); + + } + + + @MethodTest + public void testModifiedState() throws Exception { + + // modify 5 file and assert to state is modified + + setCommand(MODIFIED, ""); + + //list = context.getFile(VCSLocalData.FILE, interval); + + for (File file : list) modifyFile(file, 10, 'a'); + + listS = asList(VCSFileStateManager.getState(handler, true, list)); + assertFileState(list, listS, state, true); + + handler.revert(list); + listS = asList(VCSFileStateManager.getState(handler, true, list)); + assertFileState(list, listS, UP_TO_DATE, true); + } + + + @MethodTest + public void testOutOfDateState() throws Exception { + + // commit n files, revert to first version and assert to state is + // out to date + + setCommand(OUT_OF_DATE, ""); + + //list = context.getFile(VCSLocalData.FILE, interval); + + for (File file : list) modifyFile(file, 10, 'a'); + listS = asList(VCSFileStateManager.getState(handler, true, list)); + assertFileState(list, listS, MODIFIED, true); + + /*rev2 = handler.commit(list, FILE.getCommitMessage("commit one", this)); + + final SVNRevision revision = SVNRevision.create(rev1); + + for (File file : list) handler.update(file, revision); + + //listS = asList(VCSFileStateManager.getFileState(true, handler, list)); + assertFileState(list, listS, state, true); + + context.delete(VCSLocalData.FILE, interval); + + //listS = asList(VCSFileStateManager.getFileState(true, handler, list)); + assertFileState(list, listS, MISSING, true); + + for (File file : list) handler.update(file, revision); + + //listS = asList(VCSFileStateManager.getFileState(true, handler, list)); + assertFileState(list, listS, state, true); + */ + + } + + @MethodTest + public void testOutOfDateAndModifiedState() throws Exception { + + // modified n files, revert to first version and assert to state is out + // to date + + setCommand(OUT_OF_DATE_AND_MODIFIED, ""); + + //list = context.getFile(VCSLocalData.FILE, interval); + + for (File file : list) modifyFile(file, 20, 'b'); + + //listS = asList(VCSFileStateManager.getFileState(true, handler, list)); + assertFileState(list, listS, state, true); + + //final SVNRevision revision = SVNRevision.create(rev1); + + handler.revert(list); + + //listS = asList(VCSFileStateManager.getFileState(true, handler, list)); + assertFileState(list, listS, OUT_OF_DATE, true); + + for (File file : list) modifyFile(file, 15, 'c'); + + //listS = asList(VCSFileStateManager.getFileState(true, handler, list)); + assertFileState(list, listS, state, true); + + handler.revert(list); + + //listS = asList(VCSFileStateManager.getFileState(true, handler, list)); + assertFileState(list, listS, OUT_OF_DATE, true); + } + + /////////////////////////////////////////////////////////////////////////// + /// Methodes utiles + /////////////////////////////////////////////////////////////////////////// + + protected void setCommand(VCSState stateToTest, String command) { + setCommand(start, last, stateToTest, command); + } + + protected void setCommand(int pStart, int pLast, VCSState stateToTest, + String command) { + state = stateToTest; + if (!(pStart == start && pLast == last)) { + start = pStart; + last = pLast; + interval = context.getIndex(pStart, pLast); + } + + log.info("[state:" + state + "] [" + command + "] on interval [" + start + "," + last + "]"); + } + +} Added: trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSHandlerTest.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSHandlerTest.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSHandlerTest.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,582 @@ +package org.codelutin.vcs; + + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +/** + * This junit test class tests all methods of the implementation of a VCSHandler <code>XXX</code> (says CVS, or SVN) + * The VCSType used is junit_<code>XXX</code> + * The remote database is name is isis-fish-vcs-test_junit + * The local database name is isis-fish-vcs-test_junit_<code>XXX</code> + */ +public abstract class VCSHandlerTest extends VCSTest { + + //static protected final String patternFile = "_file_{0}.txt"; + //static protected final String patternDirectory = "_directory_{0}.txt"; + + private static int start, last; + private static int[] interval; + + static protected VCSLocalDataContext context; + + protected void setUpVars() { + resetConfiguration = true; + } + + @Override + protected void initConfig() throws Exception { + super.initConfig(); + context = new VCSLocalDataContext(getLocalDatabaseFile()); + } + + protected void tearDownVars() { + resetConfiguration = null; + vcsType = null; + } + + //TODO Should test configuration ? + + /////////////////////////////////////////////////////////////////////////////////////////// + /// Tests des cas limites + /////////////////////////////////////////////////////////////////////////////////////////// + + @MethodTest + public void testAddWithNullFileList() throws Exception { + try { + handler.add(null, VCSLocalData.FILE.getCommitMessage("add", this)); + fail(); + } catch (VCSRuntimeException e) { + assertTrue(true); + } + } + + @MethodTest + public void testAddUnExistantFiles() throws Exception { + // try to add non existing file + + List<File> files = context.getFile(VCSLocalData.FILE, 0, 1); + + long rev = handler.add(files, VCSLocalData.FILE.getCommitMessage("add unexistant ", this)); + assertEquals(rev, -1); + + } + + + @MethodTest + public void testAddUnExistantFilesWithNoCommit() throws Exception { + try { + handler.add(null, null); + fail(); + } catch (VCSRuntimeException e) { + assertTrue(true); + } + } + + @MethodTest + public void testDeleteNullFileList() throws Exception { + try { + handler.delete(null, ""); + fail(); + } catch (VCSRuntimeException e) { + assertTrue(true); + } + } + + @MethodTest + public void testDeleteNullFileListWithNocommit() throws Exception { + try { + handler.delete(null, null); + fail(); + } catch (VCSRuntimeException e) { + assertTrue(true); + } + } + + /////////////////////////////////////////////////////////////////////////////////////////// + /// Preparation repository et working copy + /////////////////////////////////////////////////////////////////////////////////////////// + + @MethodTest + public void testCreateRemoteDatabaseDirectory() throws Exception { + + // assert remote database does not exists + try { + handler.deleteRemoteDir(VCSLocalData.DIRECTORY.getCommitMessage("deldir remote", this), ""); + } catch (VCSException e) { + // this is ok for this time :) + // we just wants to be sure the remote database directory does not exists any longer + } + + // create remote directory + handler.makeRemoteDir(VCSLocalData.DIRECTORY.getCommitMessage("mkdir remote", this), ""); + + // assert remote directory exist now + + } + + @MethodTest + public void testCheckoutDatabaseDirectory() throws Exception { + + handler.deleteWorkingCopy(); + + // assert local directory not exists + assertFalse(getLocalDatabaseFile().exists()); + + handler.initWorkingCopy(); + + // assert directory exists and contains vcs configuration directory in this file + assertTrue(getLocalDatabaseFile().exists()); + + assertTrue(new File(getLocalDatabaseFile(), handler.getConfLocalDirname()).exists()); + + } + + /////////////////////////////////////////////////////////////////////////////////////////// + /// Demarrage du scenario + /////////////////////////////////////////////////////////////////////////////////////////// + + static List<File> list; + + @MethodTest + public void testAddFiles() throws Exception { + setCommand(0, 4, "add with commit"); + list = context.create(VCSLocalData.FILE, interval); + assertState(list, VCSState.UNVERSIONNED); + + handler.add(list, VCSLocalData.FILE.getCommitMessage("add", this)); + + assertState(list, VCSState.UP_TO_DATE); + + } + + @MethodTest + public void testAddDirectories() throws Exception { + setCommand(0, 4, "add with commit"); + list = context.create(VCSLocalData.DIRECTORY, interval); + assertState(list, VCSState.UNVERSIONNED); + + + handler.add(list, VCSLocalData.DIRECTORY.getCommitMessage("add", this)); + + assertState(list, VCSState.UP_TO_DATE); + } + + @MethodTest + public void testAddFilesWithNoCommit() throws Exception { + setCommand(5, 9, "add with no commit"); + list = context.create(VCSLocalData.FILE, interval); + assertState(list, VCSState.UNVERSIONNED); + + handler.add(list, null); + + assertState(list, VCSState.UNKNOWN); + } + + @MethodTest + public void testAddDirectoriesWithNoCommit() throws Exception { + list = context.create(VCSLocalData.DIRECTORY, interval); + assertState(list, VCSState.UNVERSIONNED); + + handler.add(list, null); + + assertState(list, VCSState.UNKNOWN); + } + + @MethodTest + public void testCommitAddFiles() throws Exception { + setCommand(5, 9, "commit unadded"); + list = context.getFile(VCSLocalData.FILE, interval); + assertState(list, VCSState.UNKNOWN); + + handler.commit(list, VCSLocalData.FILE.getCommitMessage("commit unadded", this)); + + assertState(list, VCSState.UP_TO_DATE); + } + + @MethodTest + public void testCommitAddDirectories() throws Exception { + list = context.getFile(VCSLocalData.DIRECTORY, interval); + assertState(list, VCSState.UNKNOWN); + + handler.commit(list, VCSLocalData.DIRECTORY.getCommitMessage("commit unadded", this)); + + assertState(list, VCSState.UP_TO_DATE); + } + + @MethodTest + public void testDeleteFiles() throws Exception { + setCommand(7, 9, "delete with commit"); + list = context.getFile(VCSLocalData.FILE, interval); + assertState(list, VCSState.UP_TO_DATE); + + handler.delete(list, VCSLocalData.FILE.getCommitMessage("delete", this)); + + assertState(list, VCSState.UNKNOWN); + } + + @MethodTest + public void testDeleteDirectories() throws Exception { + list = context.getFile(VCSLocalData.DIRECTORY, interval); + assertState(list, VCSState.UP_TO_DATE); + + handler.delete(list, VCSLocalData.DIRECTORY.getCommitMessage("delete", this)); + + assertState(list, VCSState.UNKNOWN); + } + + @MethodTest + public void testDeleteFilesWithNocommit() throws Exception { + setCommand(4, 6, "delete with no commit"); + list = context.getFile(VCSLocalData.FILE, interval); + assertState(list, VCSState.UP_TO_DATE); + + handler.delete(list, null); + + assertState(list, VCSState.UNKNOWN); + } + + + @MethodTest + public void testDeleteDirectoriesWithNocommit() throws Exception { + list = context.getFile(VCSLocalData.DIRECTORY, interval); + assertState(list, VCSState.UP_TO_DATE); + + handler.delete(list, null); + + assertState(list, VCSState.UNKNOWN); + + } + + @MethodTest + public void testCommitDeleteFiles() throws Exception { + setCommand(4, 6, "commit undeleted"); + list = context.getFile(VCSLocalData.FILE, interval); + assertState(list, VCSState.UNKNOWN); + + handler.commit(list, VCSLocalData.FILE.getCommitMessage("commit undeleted", this)); + + // when commit a deleted file, we do not delete locally file + // => so this is a unversioned file + assertState(list, VCSState.UNVERSIONNED); + + // we delete files by hand... + context.delete(VCSLocalData.FILE, interval); + + } + + @MethodTest + public void testCommitDeleteDirectories() throws Exception { + list = context.getFile(VCSLocalData.DIRECTORY, interval); + assertState(list, VCSState.UNKNOWN); + + handler.commit(list, VCSLocalData.DIRECTORY.getCommitMessage("commit undeleted", + this)); + + // when commit a deleted directory, direcotry is deleted !!! Find why ? + assertState(list, VCSState.UNKNOWN); + } + + @MethodTest + public void testGetLocalStorageNames() throws Exception { + + // at this point of the scenario, we only have a [0-3] + // (files/directories) left on local and remote + setCommand(0, 3, "getLocalStorageNames"); + + List<String> excepted = new ArrayList<String>(); + + list = context.getFile(VCSLocalData.FILE, interval); + //list.addAll(context.getFile(VCSLocalData.DIRECTORY, interval)); + for (File f : list) if (f.isFile()) excepted.add(f.getName()); + + List<String> list2 = + handler.getLocalStorageNames(getLocalDatabaseFile()); + + assertEquals(excepted.size(), list2.size()); + + for (String filename : excepted) { + assertTrue("should have found a " + filename + + " file in result but we do not! ", + list2.contains(filename)); + } + + } + + @MethodTest + public void testGetRemoteStorageNames() throws Exception { + + // at this point of the scenario, we only have a [0-3] + // (files/directories) left on local and remote + setCommand(0, 3, "getRemoteStorageNames"); + + list = context.getFile(VCSLocalData.FILE, interval); + //list.addAll(context.getFile(VCSLocalData.DIRECTORY, interval)); + + List<String> list2 = + handler.getRemoteStorageNames(getLocalDatabaseFile()); + + assertEquals(list.size(), list2.size()); + + // we can not know the style of encoded remote name ? + //for (File f : list) assertTrue(list2.contains(f)); + } + + @MethodTest + public void testIsOnRemote() throws Exception { + + // at this point of the scenario, we only have a [0-3] + // (files/directories) left on local and remote + setCommand(0, 3, "isOnRemote"); + + list = context.getFile(VCSLocalData.FILE, interval); + list.addAll(context.getFile(VCSLocalData.DIRECTORY, interval)); + + for (File f : list) assertTrue(handler.isOnRemote(f)); + + assertFalse(handler.isOnRemote(new File(getLocalDatabaseFile(), + "nonExistingFile"))); + + } + + @MethodTest + public void testRevert() throws Exception { + + // at this point of the scenario, we only have a [0-3] + // (files/directories) left on local and remote + setCommand(0, 3, "revert"); + + //TODO we only test on file (I don't think you can have + // a modified directory ? should be check...) + list = context.getFile(VCSLocalData.FILE, interval); + + assertState(list, VCSState.UP_TO_DATE); + + handler.revert(list); + + // revert on a normal file should have no effect + assertState(list, VCSState.UP_TO_DATE); + + for (File f : list) { + // we know that file is 0, change it to 10 (with 10 a for example) + modifyFile(f, 10); + } + assertState(list, VCSState.MODIFIED); + + handler.revert(list); + + // we came back to file with size = 0 + + assertState(list, VCSState.UP_TO_DATE); + for (File f : list) assertEquals(f.length(), 0); + + // a non existing file can not be revert of course.... + File file = new File(getLocalDatabaseFile(), "nonExistingFile"); + try { + handler.revert(this.getOneFileAsList(file)); + fail(); + } catch (VCSException e) { + assertTrue(true); + } + + // now file exists, but still can not revert it since it is not + // versionned + file.createNewFile(); + try { + handler.revert(this.getOneFileAsList(file)); + fail(); + } catch (VCSException e) { + assertTrue(true); + } finally { + file.delete(); + } + } + + @MethodTest + public void testUpdate() throws Exception { + + // at this point of the scenario, we only have a [0-3] (files/directories) left on local and remote + setCommand(0, 3, "update"); + + //TODO we only test on file (I don't think you can have a modified directory ? should be check...) + list = context.getFile(VCSLocalData.FILE, interval); + + assertState(list, VCSState.UP_TO_DATE); + + File f = list.get(0); + + handler.update(f); + + // update a non remoted modfied file should have no effect + assertState(list, VCSState.UP_TO_DATE); + + // we know that file is 0, change it to 10 (with 10 a for example) + modifyFile(f, 20); + + // file is modified now + assertState(f, VCSState.MODIFIED); + + // we can not update a modifed file + try { + handler.update(f); + fail(); + } catch (VCSException e) { + assertTrue(true); + } + + Object fileRevision = handler.getRevision(f); + + // delete file + VCSLocalData.FILE.delete(f); + + // update it from remote vcs + handler.update(f); + + // back to normal after update + assertState(f, VCSState.UP_TO_DATE); + + assertEquals(fileRevision, handler.getRevision(f)); + + // a non existing file can not be revert of course.... + File file = new File(getLocalDatabaseFile(), "nonExistingFile"); + try { + handler.revert(this.getOneFileAsList(file)); + fail(); + } catch (VCSException e) { + assertTrue(true); + } + + // now file exists, but still can not revert it since it is not versionned + file.createNewFile(); + try { + handler.revert(this.getOneFileAsList(file)); + fail(); + } catch (VCSException e) { + assertTrue(true); + } finally { + file.delete(); + } + + } + + + @MethodTest + public void testIsUpToDate() throws Exception { + + // at this point of the scenario, we only have a [0-3] (files/directories) left on local and remote + setCommand(0, 3, "isUpToDate"); + + list = context.getFile(VCSLocalData.FILE, interval); + + assertTrue(list.size() > 0); + + assertState(list, VCSState.UP_TO_DATE); + + for (File f : list) assertTrue(handler.isUpToDate(f)); + + File f = list.get(0); + + Object oldRev = handler.getRevision(f); + + // modify file : so file is no more upTodate + modifyFile(f, 30); + + assertFalse(handler.isUpToDate(f)); + + // commit file + handler.commit(getOneFileAsList(f), VCSLocalData.FILE.getCommitMessage("commit for test", this)); + + assertTrue(handler.isUpToDate(f)); + + // delete file from local working copy, so file is no more upToDate + VCSLocalData.FILE.delete(f); + + assertFalse(handler.isUpToDate(f)); + + // go back to previous version + handler.update(f, oldRev); + + // now local file is out up to date : older revision than on remote repository + assertFalse(handler.isUpToDate(f)); + + // delete file from remote repository, so file is no more upToDate + try { + handler.delete(getOneFileAsList(f), VCSLocalData.FILE.getCommitMessage("delete", this)); + // we can not delete a non updated file + fail(); + } catch (VCSException e) { + assertTrue(true); + handler.revert(getOneFileAsList(f)); + } + + // go back to head + handler.update(f); + + assertTrue(handler.isUpToDate(f)); + + handler.delete(getOneFileAsList(f), VCSLocalData.FILE.getCommitMessage("delete", this)); + + assertFalse(handler.isUpToDate(f)); + + // read file : file is uptodate + + f.createNewFile(); + + handler.add(getOneFileAsList(f), VCSLocalData.FILE.getCommitMessage("readd", this)); + + assertTrue(handler.isUpToDate(f)); + + // a non existing file can not be up to date of course... + File file = new File(getLocalDatabaseFile(), "nonExistingFile"); + assertFalse(handler.isUpToDate(file)); + + // now file exists, but still not up to date + file.createNewFile(); + try { + assertFalse(handler.isUpToDate(file)); + } finally { + file.delete(); + } + } + + /////////////////////////////////////////////////////////////////////////////////////////// + /// Suppression du repository et working copy + /////////////////////////////////////////////////////////////////////////////////////////// + + @MethodTest + public void testDeleteRemoteDir() throws Exception { + + // delete remote directory + handler.deleteRemoteDir(VCSLocalData.DIRECTORY.getCommitMessage("deldir remote", this), ""); + + // assert remote directory doe not exist any more + + } + + @MethodTest + public void testDeleteWorkingCopy() throws Exception { + + handler.deleteWorkingCopy(); + + // assert local directory does not exists any longer + assertFalse(getLocalDatabaseFile().exists()); + + } + + /////////////////////////////////////////////////////////////////////////////////////////// + /// M�thodes utiles + /////////////////////////////////////////////////////////////////////////////////////////// + + protected void setCommand(int start, int last, String command) { + if (!(start == VCSHandlerTest.start && last == VCSHandlerTest.last)) { + VCSHandlerTest.start = start; + VCSHandlerTest.last = last; + VCSHandlerTest.interval = context.getIndex(start, last); + } + + log.info("[" + command + "] on interval [" + VCSHandlerTest.start + "," + VCSHandlerTest.last + "]"); + } + + +} \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSInitTest.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSInitTest.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSInitTest.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,134 @@ +/* *##% +* 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 junit.framework.TestCase; +import org.codelutin.i18n.I18n; + + +/** + * Test vcs properties at init time. TODO Redo it with new init proccess + * + * @author chemit + * @version 1.0 + * @since <pre>12/09/2007</pre> + */ +public class VCSInitTest extends TestCase { + + static { + // init i18n + I18n.init(); + } + + public void testFirstLaunchWithCVS() throws Exception { +// init = new OldVCSInit( +// VCSType.CVS, +// new VersionNumber(1,1,0), +// null +// ); +// assertTrue(init.oldVCSProperties.isEmpty()); +// assertFalse(init.oldVCSProperties.isFull()); +// assertFalse(init.newVCSProperties.isEmpty()); +// assertFalse(init.newVCSProperties.isFull()); +// assertTrue(init.newVCSProperties.isSafe()); +// +// assertFalse(init.isTypeChanged()); +// assertFalse(init.needMigration()); +// assertEquals(init.newVCSProperties.getProperty(VCS_TYPE_REPO), VCSTypeRepo.NONE); + } + + public void testFirstLaunchWithSVN_onHEAD() throws Exception { +// init = new OldVCSInit( +// VCSType.SVN, +// new VersionNumber(1,1,0), +// null +// ); +// assertTrue(init.oldVCSProperties.isEmpty()); +// assertFalse(init.oldVCSProperties.isFull()); +// assertFalse(init.newVCSProperties.isEmpty()); +// assertFalse(init.newVCSProperties.isFull()); +// assertTrue(init.newVCSProperties.isSafe()); +// +// assertFalse(init.isTypeChanged()); +// assertFalse(init.needMigration()); +// assertEquals(init.newVCSProperties.getProperty(VCS_TYPE_REPO), VCSTypeRepo.HEAD); + } + + public void testFirstLaunchWithSVN_onTAG() throws Exception { +// init = new OldVCSInit( +// VCSType.SVN, +// new VersionNumber(3,0,19), +// null +// ); +// assertTrue(init.oldVCSProperties.isEmpty()); +// assertFalse(init.oldVCSProperties.isFull()); +// assertFalse(init.newVCSProperties.isEmpty()); +// assertFalse(init.newVCSProperties.isFull()); +// assertTrue(init.newVCSProperties.isSafe()); +// +// assertFalse(init.isTypeChanged()); +// assertFalse(init.needMigration()); +// assertEquals(VCSTypeRepo.TAG,init.newVCSProperties.getProperty(VCS_TYPE_REPO)); + } + + public void testPreviousWasCVSNewIsCVS() throws Exception { +// URI uri = getClass().getResource("/.isis-config-3_cvs").toURI(); +// init = new OldVCSInit( +// VCSType.CVS, +// new VersionNumber(1,1,0), +// uri +// ); +// assertFalse(init.oldVCSProperties.isEmpty()); +// assertFalse(init.oldVCSProperties.isFull()); +// assertFalse(init.newVCSProperties.isEmpty()); +// assertFalse(init.newVCSProperties.isFull()); +// assertTrue(init.newVCSProperties.isSafe()); +// +// assertFalse(init.isTypeChanged()); +// assertFalse(init.needMigration()); +// assertEquals(VCSTypeRepo.NONE,init.newVCSProperties.getProperty(VCS_TYPE_REPO)); + } + + public void testPreviousWasCVSNewIsSVN() throws Exception { +// URI uri = getClass().getResource("/.isis-config-3_cvs").toURI(); +// init = new OldVCSInit( +// VCSType.SVN, +// new VersionNumber(1,1,0), +// uri +// ); +// assertFalse(init.oldVCSProperties.isEmpty()); +// assertFalse(init.oldVCSProperties.isFull()); +// assertFalse(init.newVCSProperties.isEmpty()); +// assertFalse(init.newVCSProperties.isFull()); +// assertTrue(init.newVCSProperties.isSafe()); +// +// assertTrue(init.isTypeChanged()); +// assertTrue(init.needMigration()); +// assertEquals(VCSTypeRepo.HEAD,init.newVCSProperties.getProperty(VCS_TYPE_REPO)); + } + + public void testPreviousWasSVNNewIsTAG() throws Exception { + //TODO + } + + public void testPreviousWasSVNNewIsHEAD() throws Exception { + //TODO + } +} Added: trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSLocalData.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSLocalData.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSLocalData.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,113 @@ +package org.codelutin.vcs; + +import junit.framework.TestCase; + +import org.codelutin.util.FileUtil; + +import java.io.File; +import java.io.IOException; +import static java.text.MessageFormat.format; + +/** + * Util for our local files and directories with a pattern for name, + * when VCSHandlerTest operation (exist, create, delete). + * + * @see VCSHandlerTest + */ +public enum VCSLocalData { + + DIRECTORY("_directory_{0}", "{0} directory by test {1}#{2} at {3}") { + + boolean delete(File f) throws IOException { + return FileUtil.deleteRecursively(f) && f.delete(); + } + boolean create(File f) throws IOException { + return f.mkdirs(); + } + }, + + FILE("_file_{0}.txt", "{0} file by test {1}#{2} at {3}") { + + boolean delete(File f) throws IOException { + return f.delete(); + } + boolean create(File f) throws IOException { + if (!f.getParentFile().exists()) f.getParentFile().mkdirs(); + return f.createNewFile(); + } + }; + + abstract boolean create(File f) throws IOException; + + abstract boolean delete(File f) throws IOException; + + private String pattern; + + private String commitPattern; + + VCSLocalData(String pattern, String commitPattern) { + this.commitPattern = commitPattern; + this.pattern = pattern; + } + + public boolean exists(File root, int... index) { + for (int i : index) + if (!getFile(root, i).exists()) return false; + return true; + } + + public File getFile(File root, int index) { + return new File(root, format(pattern, index)); + } + + public File[] getFile(File root, int... index) { + File[] result = new File[index.length]; + for (int i1 = 0; i1 < index.length; i1++) { + int i = index[i1]; + result[i1] = getFile(root, i); + } + return result; + } + + public void create(File root, int... index) throws IOException { + for (int anIndex : index) create(getFile(root, anIndex)); + + } + + public void create(File root, String prefix, int... index) throws IOException { + for (int anIndex : index) create(getFile(root, prefix, anIndex)); + + } + + private File getFile(File root, String prefix, int anIndex) { + return new File(root, prefix + format(pattern, anIndex)); + } + + public String getFilename(String prefix, int anIndex) { + return prefix + format(pattern, anIndex); + } + + public boolean delete(File root, int index) throws IOException { + final File file = getFile(root, index); + return delete(file); + } + + public boolean delete(File root, int... index) throws IOException { + for (int i : index) + if (!delete(root, i)) return false; + return true; + } + + public String getCommitMessage(String command, TestCase test) { + return format(commitPattern, command, test.getClass(), test.getName(), new java.util.Date()); + } + + public File[] getFile(File root, String prefix, int[] index) { + File[] result = new File[index.length]; + for (int i1 = 0; i1 < index.length; i1++) { + int i = index[i1]; + result[i1] = getFile(root, prefix, i); + } + return result; + } +} Added: trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSLocalDataContext.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSLocalDataContext.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSLocalDataContext.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,60 @@ +package org.codelutin.vcs; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class VCSLocalDataContext { + + File root; + private List<File> result; + + + public VCSLocalDataContext(File root) { + this.root = root; + } + + public boolean exist(VCSLocalData type, int... index) { + return type.exists(root, index); + } + + public List<File> getFile(VCSLocalData type, int... index) { + final File[] files = type.getFile(root, index); + if (result == null) result = new ArrayList<File>(); + else result.clear(); + result.addAll(Arrays.asList(files)); + List<File> res = new ArrayList<File>(); + res.addAll(result); + return res; + } + + public List<File> create(VCSLocalData type, int... index) throws IOException { + type.create(root, index); + return getFile(type, index); + } + + public List<File> create(VCSLocalData type, String prefix, int... index) throws IOException { + type.create(root, prefix, index); + return getFile(type, prefix, index); + } + + public List<File> getFile(VCSLocalData type, String prefix, int[] index) { + final File[] files = type.getFile(root, prefix, index); + List<File> res = new ArrayList<File>(); + res.addAll(Arrays.asList(files)); + return res; + } + + public void delete(VCSLocalData type, int... index) throws IOException { + type.delete(root, index); + } + + public int[] getIndex(int first, int last) { + final int size = last - first; + int[] result = new int[size + 1]; + for (int i = 0; i <= size; i++) result[i] = i + first; + return result; + } +} Added: trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSStateTest.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSStateTest.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSStateTest.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,234 @@ +package org.codelutin.vcs; + +import junit.framework.Assert; +import org.codelutin.util.FileUtil; +import static org.codelutin.vcs.VCSState.UNVERSIONNED_OR_MISSING; +import static org.codelutin.vcs.VCSType.SVN; + +import java.io.File; +import static java.io.File.separator; +import java.util.ArrayList; +import java.util.List; + +public class VCSStateTest extends VCSTest { + static protected int start, last; + + static protected int[] interval; + + static protected VCSLocalDataContext context; + + protected void setUpVars() { + VCSTest.vcsType = SVN; + VCSTest.resetConfiguration = true; + } + + @Override + protected void initConfig() throws Exception { + super.initConfig(); + context = new VCSLocalDataContext(getLocalDatabaseFile()); + + initVCS(); + } + + protected void tearDownVars() throws Exception { + VCSTest.resetConfiguration = null; + VCSTest.vcsType = null; + disposeVCS(); + } + + // ///////////////////////////////////////////////////////////////////////// + // / Demarrage du scenario + // ///////////////////////////////////////////////////////////////////////// + + static List<File> list, list2; + + static VCSState state; + + static long rev1, rev2, rev3; + + @MethodTest + public void testRemotePathFromLocalFile() throws Exception { + + // get n files unexisiting files and assert state is unknown + setCommand(0, 2, VCSState.UNKNOWN, "conversion from local file to " + + "remote module path"); + + list = context.getFile(VCSLocalData.FILE, interval); + + for (int i = 0; i < list.size(); i++) { + Assert.assertEquals(VCSHelper.getRemoteRelativePath(list.get(i), VCSTest.handler), + VCSLocalData.FILE.getFilename("", i)); + } + + list2 = context.create(VCSLocalData.FILE, "subdir" + separator, interval); + for (int i = 0; i < list2.size(); i++) { + String expected = VCSHelper.getRemoteRelativePath(list2.get(i), + VCSTest.handler); + String actual = VCSHelper.convertToRemoteName(VCSLocalData.FILE + .getFilename("subdir" + File.separator, i)); + System.out.println("excepted " + expected + " actual " + actual); + Assert.assertEquals(expected, VCSHelper.convertToRemoteName(actual)); + } + FileUtil.deleteRecursively(new File(VCSHandlerFactory.getConfig().getLocalDatabasePath(), "subdir")); + } + + @MethodTest + public void testUnknowState() throws Exception { + + // get n files unexisiting files and assert state is unknown + setCommand(0, 2, VCSState.UNKNOWN, ""); + + list = context.getFile(VCSLocalData.FILE, interval); + VCSTest.assertState(list, state); + + list2 = context.getFile(VCSLocalData.FILE, "subdir" + separator, interval); + VCSTest.assertState(list2, state); + } + + @MethodTest + public void testUnversionnedState() throws Exception { + + // create n files and assert that state is unversionned + setCommand(VCSState.UNVERSIONNED, ""); + + context.create(VCSLocalData.FILE, interval); + VCSTest.assertState(list, state); + } + + @MethodTest + public void testUnversionnedOrMissingState() throws Exception { + + // create n files and assert that state is unversionned + setCommand(VCSState.UNVERSIONNED_OR_MISSING, ""); + + context.create(VCSLocalData.FILE, "subdir" + separator, interval); + VCSTest.assertState(list2, UNVERSIONNED_OR_MISSING); + } + + @MethodTest + public void testUpToDateState() throws Exception { + + // add n files and assert to state is up to date + + setCommand(VCSState.UP_TO_DATE, ""); + + rev1 = VCSTest.handler.add(new ArrayList<File>(list), + VCSLocalData.FILE.getCommitMessage("add", this)); + + VCSTest.assertState(list, state); + + } + + @MethodTest + public void testMissingState() throws Exception { + + // delete locally 5 file and assert to state is missing + + setCommand(VCSState.MISSING, ""); + + context.delete(VCSLocalData.FILE, interval); + VCSTest.assertState(list, state); + + update(list); + VCSTest.assertState(list, VCSState.UP_TO_DATE); + final File subdir = new File(VCSTest.databaseDirectory, "subdir"); + context.create(VCSLocalData.FILE, "subdir" + separator, interval); + VCSTest.handler.add(getOneFileAsList(subdir), VCSLocalData.FILE.getCommitMessage( + "add sub files", this)); + + VCSTest.handler.add(list2, VCSLocalData.FILE.getCommitMessage("add sub files", this)); + VCSTest.assertState(list2, VCSState.UP_TO_DATE); + + FileUtil.deleteRecursively(subdir); + + context.create(VCSLocalData.FILE, "subdir" + separator, interval); + + VCSTest.assertState(list2, UNVERSIONNED_OR_MISSING); + + } + + @MethodTest + public void testModifiedState() throws Exception { + + // modify 5 file and assert to state is modified + + setCommand(VCSState.MODIFIED, ""); + + modifyFile(list, 30, 'h'); + VCSTest.assertState(list, state); + + VCSTest.handler.revert(list); + VCSTest.assertState(list, VCSState.UP_TO_DATE); + } + + @MethodTest + public void testOutOfDateState() throws Exception { + + // commit n files, revert to first version and assert to state is + // out to date + + setCommand(VCSState.OUT_OF_DATE, ""); + + modifyFile(list, 45, 'j'); + VCSTest.assertState(list, VCSState.MODIFIED); + + /*rev2 = VCSTest.handler.commit(list, VCSLocalData.FILE.getCommitMessage("commit one", this)); + final SVNRevision revision = SVNRevision.create(rev1); + + update(list, revision); + VCSTest.assertState(list, state); + + context.delete(VCSLocalData.FILE, interval); + VCSTest.assertState(list, VCSState.MISSING); + + update(list, revision); + VCSTest.assertState(list, state);*/ + + } + + @MethodTest + public void testOutOfDateAndModifiedState() throws Exception { + + // modified n files, revert to first version and assert to state is out + // to date + + setCommand(VCSState.OUT_OF_DATE_AND_MODIFIED, ""); + + modifyFile(list, 14, 'n'); + + VCSTest.assertState(list, state); + + VCSTest.handler.revert(list); + + VCSTest.assertState(list, VCSState.OUT_OF_DATE); + + modifyFile(list, 46, 'o'); + + VCSTest.assertState(list, state); + + VCSTest.handler.revert(list); + + VCSTest.assertState(list, VCSState.OUT_OF_DATE); + } + + // ///////////////////////////////////////////////////////////////////////// + // / Methodes utiles + // ///////////////////////////////////////////////////////////////////////// + + protected void setCommand(VCSState stateToTest, String command) { + setCommand(start, last, stateToTest, command); + } + + protected void setCommand(int pStart, int pLast, VCSState stateToTest, + String command) { + state = stateToTest; + if (!(pStart == start && pLast == last)) { + start = pStart; + last = pLast; + interval = context.getIndex(pStart, pLast); + } + VCSTest.log.info("[state:" + state + "] [" + command + "] on interval [" + + start + "," + last + "]"); + } + +} \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSTest.java =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSTest.java (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/test/java/org/codelutin/vcs/VCSTest.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,324 @@ +package org.codelutin.vcs; + +import junit.framework.TestCase; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.codelutin.log.LutinLogFactory; +import org.codelutin.util.FileUtil; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * abstract test for a vcs should be implements by any new vcs handler + * + * @author chemit + */ +public abstract class VCSTest extends TestCase { + + static protected Boolean resetConfiguration; + + static protected VCSType vcsType; + + /** method to be invoked before first test */ + protected abstract void setUpVars(); + + /** + * method to be inocked after last test + * + * @throws Exception TODO + */ + protected abstract void tearDownVars() throws Exception; + + /** flag to says we have already invoked setVars method */ + static protected boolean init = false; + + static protected VCSConfig config; + + static protected File databaseDirectory; + + static protected File oldConfig; + + static protected VCSHandler handler; + + static protected int nbTests; + + static protected int currentTest = 0; + + static { + System.setProperty("org.apache.commons.logging.LogFactory", LutinLogFactory.class.getName()); + } + + protected static Log log = LogFactory.getLog(VCSTest.class); + + protected void resetConfig() throws Exception { + log.info(" process " + currentTest + "/" + nbTests + " tests for " + + getClass()); + tearDownVars(); + log.info(" == pause for one second, waiting for next test..."); + Thread.sleep(100); + nbTests = currentTest = 0; + config = null; + handler = null; + databaseDirectory = null; + init = false; + + // push back previous configuration file + String path = oldConfig.getAbsolutePath(); + FileUtil.copy(oldConfig, new File(path.substring(0, path.length() - 4))); + oldConfig.delete(); + } + + private static String originalLocalDatabaseName; + private static String originalRemoteDatabaseName; + + protected void initConfig() throws Exception { + try { + setUpVars(); + + long timestamp = System.nanoTime(); + + nbTests = getNbTests(); + + log.info("[" + timestamp + "] found " + nbTests + " tests for " + getClass()); + + File dConfig = new File(System.getProperty("user.home"), ".isis-config-3"); + + if (dConfig.exists()) { + oldConfig = new File(dConfig.getParentFile(), dConfig.getName() + "_old"); + FileUtil.copy(dConfig, oldConfig); + } + + //IsisFish.init(); + //TODO force type load(vcsType); + + //config = IsisContext.get().getVcsConfig(); + config = null; + + String lname = config.getLocalDatabasePath().getName(); + String rname = config.getRemoteDatabase(); + if (originalLocalDatabaseName == null) { + originalLocalDatabaseName = lname; + originalRemoteDatabaseName = rname; + } else { + lname = originalLocalDatabaseName; + rname = originalRemoteDatabaseName; + } + //IsisVcsConfig.LOCAL_DATABASE_PROPERTY_KEY.setCurrentValue(lname + timestamp); + + //IsisVcsConfig.REMOTE_DATABASE_PROPERTY_KEY.setCurrentValue( rname + timestamp); + + try { + config.validate(); + + } catch (VCSRuntimeException e) { + log.fatal("Fill missing properties in configuration file [" + + config.getSource() + "]"); + System.exit(1); + } + + assertTrue(config.isInit()); + + handler = VCSHandlerFactory.getHandler(); + //handler = IsisContext.get().getVCSHanler(); + + assertNotNull(handler); + + databaseDirectory = config.getLocalDatabasePath(); + + log.info("localDatabase : [" + databaseDirectory + "]"); + log.info("remoteDatabase : [" + config.getRemoteDatabasePath() + + "]"); + log.info("remote url : [" + handler.getRemoteUrl() + "]"); + log.debug("handler : " + handler); + init = true; + } catch (Exception e) { + log.error("could not load Default VCSHandler ", e); + fail(); + } + } + + protected void postInitConfig() throws VCSException { + // init root of working copy (check it out if it the first use) + handler.initWorkingCopy(); + assertTrue(databaseDirectory != null && databaseDirectory.exists()); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + if (!init) { + initConfig(); + } + currentTest++; + log.debug(" (" + currentTest + "/" + nbTests + ") : " + this); + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + log.debug(" (" + currentTest + "/" + nbTests + ") : " + this); + if (currentTest == nbTests) + resetConfig(); + } + + protected int getNbTests() { + int result = 0; + for (java.lang.reflect.Method method : getClass().getMethods()) + if (method.isAnnotationPresent(MethodTest.class)) + result++; + + assertTrue("find no test methods marked with annotation " + + MethodTest.class + "in class " + getClass(), result > 0); + return result; + } + + protected MethodTest getMethodTest() { + try { + + return getClass().getMethod(getName()).getAnnotation( + MethodTest.class); + + } catch (NoSuchMethodException e) { + throw new RuntimeException(e); + } + } + + protected File getLocalDatabaseFile() { + return VCSHandlerFactory.getConfig().getLocalDatabasePath(); + } + + protected void update(List<File> list) throws VCSException { + for (File file : list) + handler.update(file); + } + + protected void update(List<File> list, VCSRevision revision) + throws VCSException { + for (File file : list) + handler.update(file, revision); + } + + public static void assertState(List<File> files, VCSState status) + throws VCSException { + for (File file : files) { + final VCSState state = handler.getState(file, new ArrayList()); + if (state != status) + fail("state required [" + status + "] but found [" + state + + "] for files " + file); + } + } + + public static void assertFileState(List<File> list, + List<VCSFileState> files, VCSState status, boolean synch) + throws VCSException { + if (synch) + VCSFileStateManager.doSynch(handler, list); + VCSState state; + for (VCSFileState file : files) { + try { + state = file.getState(); + if (state != status) + fail("state required [" + status + "] but found [" + state + + "] for files " + file); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + public static void assertState(File file, VCSState status) + throws VCSException { + final VCSState vcsStatus = handler.getState(file, new ArrayList()); + if (vcsStatus != status) + fail("state required [" + status + "] but found [" + vcsStatus + + "] for file " + file); + } + + protected void modifyFile(List<File> f) throws IOException { + modifyFile(f, 10, 'a'); + for (File file : f) { + modifyFile(file, 10, 'a'); + } + } + + protected void modifyFile(List<File> f, int newSize) throws IOException { + modifyFile(f, newSize, 'b'); + } + + protected void modifyFile(List<File> f, int newSize, char c) + throws IOException { + for (File file : f) + modifyFile(file, newSize, c); + } + + protected void modifyFile(File f, int newSize) throws IOException { + modifyFile(f, newSize, 'a'); + } + + protected void modifyFile(File f, int newSize, char c) throws IOException { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < newSize; i++) + sb.append(c); + FileUtil.writeString(f, sb.toString()); + } + + protected List<File> getOneFileAsList(File f) { + List<File> result = new ArrayList<File>(); + result.add(f); + return result; + } + + // ///////////////////////////////////////////////////////////////////////// + // / Preparation repository et working copy + // ///////////////////////////////////////////////////////////////////////// + protected void initVCS() throws VCSException { + // assert remote database does not exists + try { + handler.deleteRemoteDir(VCSLocalData.DIRECTORY.getCommitMessage("deldir remote", + this), ""); + } catch (VCSException e) { + // this is ok for this time :) + // we just wants to be sure the remote database directory does not + // exists any longer + } + + // create remote directory + handler.makeRemoteDir(VCSLocalData.DIRECTORY.getCommitMessage("mkdir remote", this), + ""); + + handler.deleteWorkingCopy(); + + // assert local directory not exists + assertFalse(getLocalDatabaseFile().exists()); + + handler.initWorkingCopy(); + + // assert directory exists and contains vcs configuration directory in + // this file + assertTrue(getLocalDatabaseFile().exists()); + assertTrue(new File(getLocalDatabaseFile(), handler + .getConfLocalDirname()).exists()); + } + + // ///////////////////////////////////////////////////////////////////////// + // / Suppression du repository et working copy + // ///////////////////////////////////////////////////////////////////////// + + protected void disposeVCS() throws Exception { + + // delete remote directory + handler.deleteRemoteDir(VCSLocalData.DIRECTORY.getCommitMessage("deldir remote", + this), ""); + + // delete local working copy + handler.deleteWorkingCopy(); + + // assert local directory does not exists any longer + assertFalse(getLocalDatabaseFile().exists()); + + } + +} Added: trunk/lutinvcs/lutinvcs-core/src/test/resources/log4j.properties =================================================================== --- trunk/lutinvcs/lutinvcs-core/src/test/resources/log4j.properties (rev 0) +++ trunk/lutinvcs/lutinvcs-core/src/test/resources/log4j.properties 2008-03-31 17:02:25 UTC (rev 234) @@ -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 Added: trunk/lutinvcs/lutinvcs-provider-cvs/.cvsignore =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/.cvsignore (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/.cvsignore 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,7 @@ +target +velocity.log +maven.log +.eclipse +.classpath +lutinutil.iml +lutinutil.ipr Added: trunk/lutinvcs/lutinvcs-provider-cvs/LICENSE.txt =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/LICENSE.txt (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/LICENSE.txt 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,280 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS Added: trunk/lutinvcs/lutinvcs-provider-cvs/changelog =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/changelog (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/changelog 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,57 @@ +ver-0-26 poussin 2007???? + * bug in concat(Object [] ...), better array type now work + * add unaccent in StringUtil + +ver-0-25 poussin 20070425 + * add StringUtil.toArrayXXX(String ... s) methodes + * use generic + +ver-0-24 poussin + * ArgumentsParser have 1 as repetitionMax by default + * ArgumentsParser use jdk 1.5 syntaxe (..., <>) + +ver-0-23 poussin 20061004 + * move i18n in lutinutil + * add method Resource.getConfigProperties(String, Properties) to chains + properties + +ver-0-22 poussin 20060913 + * use Generics in CategorisedListenerSet + * add org.codelutin.log package (LutinLog, ...) + * remove org.codelutin.util.Log + +ver-0-21 poussin 20060907 + + * Add TransformedList + * Add FileUtil.getTempFile(String):File + * add FileUtil.getFile():File that prompt user + * add FileUtil.getDirectory(): String that prompt user + * add FileUtil.copyRecursively(File, File, String ... patternFilter) + * add ZipUtil class to compress/uncompress zip file + * Transparente*Reference accept null object + +ver-0-17 thimel 20050610 + + * Ajout de BoundedList et BoundedListOutOfBoundsException + +ver-0-16 poussin 20050526 + + * Ajout de la methode getConfigProperties dans Resource + +ver-0-9 poussin 20040728 + + * Ajout de methode isJar, isZip, dans Resource + +ver-0-3 poussin 20040405 + + * utilisation de maven pour la gestion du projet + * Ajout de ExceptionUtil + +ver-0-2 poussin 20031021 + + * ajout du parser d'argument, ArgumentsParser + * ajout de StringUtil + +ver-0-1 + + * premier version contient seulement Resource Added: trunk/lutinvcs/lutinvcs-provider-cvs/pom.xml =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/pom.xml (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/pom.xml 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,66 @@ +<?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-provider-cvs</artifactId> + <name>Lutinvcs provider cvs</name> + + <packaging>jar</packaging> + <version>0.1-SNAPSHOT</version> + <description>Librairie vcs provider cvs</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>org.netbeans.lib</groupId> + <artifactId>cvsclient</artifactId> + <!--version>20051129</version--> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>sshtools</groupId> + <artifactId>j2ssh-common</artifactId> + <!--version>0.2.2</version--> + <scope>compile</scope> + </dependency> + + <dependency> + <groupId>sshtools</groupId> + <artifactId>j2ssh-core</artifactId> + <!--version>0.2.2</version--> + <scope>compile</scope> + </dependency> + </dependencies> + +</project> Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/CVSHandlerProvider.java =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/CVSHandlerProvider.java (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/CVSHandlerProvider.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,29 @@ +/** + * # #% 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.impl.cvs.CVSHandler; + +/** @author chemit */ +public class CVSHandlerProvider implements VCSHandlerProvider<CVSHandler> { + + public String getName() { + return "CVS"; + } + + public CVSHandler newInstance(VCSConfig config) { + return new CVSHandler(config); + } +} \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/BasicListener.java =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/BasicListener.java (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/BasicListener.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,113 @@ +/* *##% + * Copyright (C) 2005 + * Ifremer, Code Lutin, C�dric Pineau, Benjamin Poussin + * + * 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. + *##%*/ + +/* * + * Compress.java + * + * Created: 7 nov. 2005 17:40:00 CEST + * + * @author Gr�goire DESSARD <dessard@codelutin.com> + * @version $Revision: 1.1 $ + * + * Last update: $Date: 2007-10-29 18:54:01 $ + * by : $Author: tchemit $ + */ + +package org.codelutin.vcs.impl.cvs; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.netbeans.lib.cvsclient.event.CVSAdapter; +import org.netbeans.lib.cvsclient.event.FileAddedEvent; +import org.netbeans.lib.cvsclient.event.FileInfoEvent; +import org.netbeans.lib.cvsclient.event.FileRemovedEvent; +import org.netbeans.lib.cvsclient.event.FileUpdatedEvent; +import org.netbeans.lib.cvsclient.event.MessageEvent; +import org.netbeans.lib.cvsclient.event.TerminationEvent; + +/** + * Listener basique envoyant le r�sultat sur le log. + * + * @author dessard + */ +public class BasicListener extends CVSAdapter + +{ + /** to use log facility, just put in your code: log.info(\"...\"); */ + static private Log log = LogFactory.getLog(BasicListener.class); + + /** + * R�cup�re les �venements au moment des ordres CVS. Et affiche ces messages + * dans les logs en info ou en error (si l'�venement est en erreur). + */ + public void messageSent(MessageEvent event) { + if (event.isError()) { + log.error(event.getMessage()); + } else { + log.info(event.getMessage()); + } + } + + /* (non-Javadoc) + * @see org.netbeans.lib.cvsclient.event.CVSAdapter#commandTerminated(org.netbeans.lib.cvsclient.event.TerminationEvent) + */ + @Override + public void commandTerminated(TerminationEvent e) { + if (e.isError()) { + log.error("Server responses has error"); + } else { + log.debug("Server responses has OK"); + } + } + + /* (non-Javadoc) + * @see org.netbeans.lib.cvsclient.event.CVSAdapter#fileAdded(org.netbeans.lib.cvsclient.event.FileAddedEvent) + */ + @Override + public void fileAdded(FileAddedEvent e) { + log.debug("File has been added."); + } + + /* (non-Javadoc) + * @see org.netbeans.lib.cvsclient.event.CVSAdapter#fileInfoGenerated(org.netbeans.lib.cvsclient.event.FileInfoEvent) + */ + @Override + public void fileInfoGenerated(FileInfoEvent e) { + log.debug("File status information has been received"); + } + + /* (non-Javadoc) + * @see org.netbeans.lib.cvsclient.event.CVSAdapter#fileRemoved(org.netbeans.lib.cvsclient.event.FileRemovedEvent) + */ + @Override + public void fileRemoved(FileRemovedEvent e) { + log.debug("File is removed."); + ; + } + + /* (non-Javadoc) + * @see org.netbeans.lib.cvsclient.event.CVSAdapter#fileUpdated(org.netbeans.lib.cvsclient.event.FileUpdatedEvent) + */ + @Override + public void fileUpdated(FileUpdatedEvent e) { + log.debug("File has been updated"); + } + + +} Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSCommandResult.java =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSCommandResult.java (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSCommandResult.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,90 @@ +/* *##% + * Copyright (C) 2006 + * Ifremer, Code Lutin, C�dric Pineau, Benjamin Poussin + * + * 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. + *##%*/ + +/* * + * CVSCommandResult.java + * + * Created: 9 d�c. 06 01:19:47 + * + * @author poussin + * @version $Revision: 1.1 $ + * + * Last update: $Date: 2007-10-29 18:54:01 $ + * by : $Author: tchemit $ + */ + +package org.codelutin.vcs.impl.cvs; + +import org.netbeans.lib.cvsclient.command.FileInfoContainer; + +import java.util.ArrayList; +import java.util.List; + + +public class CVSCommandResult { + protected boolean error = false; + protected List<FileInfoContainer> fileInfo = new ArrayList<FileInfoContainer>(); + protected StringBuffer trace = new StringBuffer(); + protected List<String> fileAdded = new ArrayList<String>(); + protected List<String> fileUpdated = new ArrayList<String>(); + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + String result = "error = " + error + "\n"; + result += "fileInfo = " + fileInfo + "\n"; + result += "trace = " + trace + "\n"; + result += "fileAdded = " + fileAdded + "\n"; + result += "fileUpdated = " + fileUpdated + "\n"; + return result; + } + + /** @return Returns the fileInfo. */ + public List<FileInfoContainer> getFileInfo() { + return this.fileInfo; + } + + /** @return Returns the trace. */ + public StringBuffer getTrace() { + return this.trace; + } + + /** @return Returns the fileAdded. */ + public List<String> getFileAdded() { + return this.fileAdded; + } + + /** @return Returns the fileUpdated. */ + public List<String> getFileUpdated() { + return this.fileUpdated; + } + + /** @return Returns the error. */ + public boolean isError() { + return this.error; + } + + /** @param error The error to set. */ + public void setError(boolean error) { + this.error = error; + } +} + Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSHandler.java =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSHandler.java (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSHandler.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,292 @@ +package org.codelutin.vcs.impl.cvs; + +import static org.codelutin.i18n.I18n._; +import org.codelutin.util.FileUtil; +import org.codelutin.vcs.AbstractVCSHandler; +import org.codelutin.vcs.VCSConfig; +import org.codelutin.vcs.VCSException; +import org.codelutin.vcs.VCSState; +import org.netbeans.lib.cvsclient.command.FileInfoContainer; +import org.netbeans.lib.cvsclient.command.log.LogInformation; +import org.netbeans.lib.cvsclient.command.status.StatusInformation; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +/** + * VCSHandler implementation for cvs + * + * @author chemit + */ + +public class CVSHandler extends AbstractVCSHandler { + + public CVSHandler(VCSConfig config) { + super(config, "CVS", "Entries"); + } + + public void initWorkingCopy() throws VCSException { + File root = config.getLocalDatabasePath(); + + if (!root.exists()) getLocalDatabasePath().mkdirs(); + + //TODO Should checkout root remote directory unrecurse ? + //TODO to have vcs configuration file present in local database directory + //CVSHelper.checkout(root,""); + } + + public String getRemoteUrl() { + return (config.isUseSshConnexion() ? ":ext:" : ":pserver:") + config.getUserName() + "@" + config.getHostName() + config.getRemotePath(); + } + + public boolean isOnRemote(File file) { + boolean result = false; + if (file.isDirectory()) { + File cvsdir = new File(file, confLocalDirName); + result = cvsdir.exists(); + } else { + File cvsdir = new File(file.getParentFile(), confLocalDirName); + File cvsentries = new File(cvsdir, confLocalEntriesFilename); + try { + String entries; + entries = FileUtil.readAsString(cvsentries); + result = entries.contains("/" + file.getName()); + } catch (IOException eee) { + if (log.isWarnEnabled()) { + log.warn("Can't read CVS Entries file : " + cvsentries, eee); + } + } + } + return result; + } + + public boolean isUpToDate(File file) throws VCSException { + + CVSCommandResult cvsResult = CVSHelper.cvsStatus(file); + if (cvsResult.isError()) { + throw new VCSException(_("lutinvcs.error.status.files", cvsResult.getTrace().toString())); + } + boolean result = true; + for (FileInfoContainer info : cvsResult.getFileInfo()) { + if (info instanceof StatusInformation) { + StatusInformation status = (StatusInformation) info; + String remoteVersion = status.getRepositoryRevision(); + String localVersion = status.getWorkingRevision(); + log.info("File version: " + status.getFile() + " remote: " + remoteVersion + " local: " + localVersion); + result = remoteVersion.equals(localVersion); + if (!result) { + break; + } + } + } + return result; + } + + public void makeRemoteDir(String msg, String... dirNames) throws VCSException { + //TODO + throw new RuntimeException(getClass().getName() + "#makeRemoteDir is not actually implemented"); + } + + public void deleteRemoteDir(String commitMessage, String... dirNames) throws VCSException { + throw new RuntimeException(getClass().getName() + "#deleteRemoteDir is not actually implemented"); + //TODO + } + + /*public VCSStatus getStatus(File file) { + throw new RuntimeException(getClass().getName() + "#getStatus(File) is not actually implemented"); + //TODO + }*/ + + public VCSState getState(File fileState, Collection tmp) throws VCSException { + return getState(fileState, tmp, true); + } + + public VCSState getState(File file, Collection tmp, boolean noremote) throws VCSException { + throw new RuntimeException(getClass().getName() + "#getState(File) is not actually implemented"); + //TODO + } + + public long add(List<File> files, String msg) throws VCSException { + + log.debug("files to add: " + files); + CVSCommandResult result = CVSHelper.cvsAdd(files); + assertCommandResult(result, "Can''t add files: {0}"); + + result = CVSHelper.cvsCommit(files, msg); + assertCommandResult(result, "Can''t commit files: {0}"); + return -1; + } + + public void delete(List<File> files, String msg) throws VCSException { + + CVSCommandResult result = CVSHelper.cvsRemove(files); + assertCommandResult(result, "Can''t remove files: {0}"); + + result = CVSHelper.cvsCommit(files, msg); + assertCommandResult(result, "Can''t commit deleted files: {0}"); + + } + + public long commit(List<File> files, String msg) throws VCSException { + add(files, msg); + return 0; + } + + public void update(File file) throws VCSException { + CVSCommandResult result = CVSHelper.cvsUpdate(file); + assertCommandResult(result, "Can''t update files: {0}"); + } + + public void checkout(File destDir, String module, boolean recurse) throws VCSException { + CVSCommandResult result = CVSHelper.checkout(destDir, module); + assertCommandResult(result, "Can''t checkout files: {0}"); + } + + public void checkoutFile(File destDir, String module) throws VCSException { + /*try { + new File(destDir,module).createNewFile(); + } catch (IOException e) { + throw new VCSException(e); + }*/ + //CVSHelper.checkoutFile(destDir,module); + } + + + public List<String> getRemoteStorageNames(File directory) { + List<String> result = new ArrayList<String>(); + try { + CVSCommandResult cvsResult = CVSHelper.cvsLog(directory); + for (FileInfoContainer info : cvsResult.getFileInfo()) { + if (info instanceof LogInformation) { + LogInformation status = (LogInformation) info; + result.add(status.getRepositoryFilename()); + } + } + } catch (Exception eee) { + log.warn("Error during connection to CVS serveur", eee); + } + Collections.sort(result); + return result; + } + + /** + * Retourne les messages de logs entre la version local et la remote ou null + * si les deux fichiers ont la meme version + * + * @param file TODO + * @param logInfo TODO + * @return le log ou null + * @throws VCSException TODO + */ + @SuppressWarnings("unchecked") + public String getLogMessage(File file, LogInformation logInfo) throws VCSException { + CVSCommandResult cvsResult = CVSHelper.cvsStatus(file); + if (cvsResult.isError()) { + throw new VCSException(_("lutinvcs.error.get.status.files", cvsResult.getTrace().toString())); + } + String result = ""; + for (FileInfoContainer info : cvsResult.getFileInfo()) { + if (info instanceof StatusInformation) { + StatusInformation status = (StatusInformation) info; + String remoteVersion = status.getRepositoryRevision(); + String localVersion = status.getWorkingRevision(); + log.info("File version: " + status.getFile() + " remote: " + remoteVersion + " local: " + localVersion); + if (!remoteVersion.equals(localVersion)) { + //noinspection unchecked + List<LogInformation.Revision> revs = logInfo.getRevisionList(); + revs = revs.subList(0, revs.indexOf(logInfo.getRevision(localVersion))); + result += getLogMessage(file, revs); + } + } + } + return result.equals("") ? null : result; + } + + /** + * retourne le log pour toutes les revisions presente dans revs + * + * @param file le fichier sur lequel les logs portent + * @param revs les revisions dont on souhaite le message de log + * @return une chaine representant la liste des logs + * @throws VCSException TODO + */ + public String getLogMessage(File file, List<LogInformation.Revision> revs) throws VCSException { + String result = ""; + for (LogInformation.Revision revision : revs) { + result += + "+" + revision.getAddedLines() + + "-" + revision.getRemovedLines() + + " " + file.getName() + + "(" + revision.getAuthor() + ", " + revision.getDate() + ")" + + "\n" + revision.getMessage() + + "\n"; + } + return result; + } + + private void assertCommandResult(CVSCommandResult result, String msg) throws VCSException { + if (result.isError()) { + throw new VCSException(org.codelutin.i18n.I18n._(msg, result.getTrace().toString())); + } + } + + public void revert(List<File> files) throws VCSException { + throw new RuntimeException(getClass().getName() + "#revert is not actually implemented"); + //TODO + } + + public Object getRevision(File f) throws VCSException { + throw new RuntimeException(getClass().getName() + "#getRevision is not actually implemented"); + //TODO + } + + public void update(File file, Object revision) throws VCSException { + throw new RuntimeException(getClass().getName() + "#update(File,Object) is not actually implemented"); + //TODO + } + + public String getDiff(File file) throws VCSException { + throw new RuntimeException(getClass().getName() + "#getDiff(File,OutputStream) is not actually implemented"); + //TODO + } + + public String getDiff(File file, Object againstRevision) throws VCSException { + throw new RuntimeException(getClass().getName() + "#getDiff(File,Object,OutputStream) is not actually implemented"); + //TODO + } + + public void testConnection() { + //TODO + } + + public boolean hasProtocoleChanged() { + throw new RuntimeException(getClass().getName() + "#hasProtocoleChanged() is not actually implemented"); + } + + public String getChangeLog(File file) throws VCSException { + throw new RuntimeException(getClass().getName() + "#getChangeLog((File) is not actually implemented"); + //TODO + } + + public List getLog(Object startRevision, Object endRevision, File file) throws VCSException { + throw new RuntimeException(getClass().getName() + "#getLog(Object,Object,File) is not actually implemented"); + //TODO + } + + public String getFileContent(File file, Object revision) throws VCSException { + throw new RuntimeException(getClass().getName() + "#getFileContent(File,Object) is not actually implemented"); + //TODO + } + + public long checkoutOnlyTheDirectory(File root, Object revision) throws VCSException { + checkoutFile(root.getParentFile(), root.getName()); + return -1; + //throw new RuntimeException(getClass().getName() + "#checkoutOnlyTheDirectory(File,Object) is not actually implemented"); + //TODO + } + +} Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSHelper.java =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSHelper.java (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSHelper.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,639 @@ +/* *##% + * Copyright (C) 2006 + * Code Lutin, C�dric Pineau, Benjamin Poussin + * + * 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. + *##%*/ + +/* * + * CVSHelper.java + * + * Created: 22 janv. 2006 01:39:13 + * + * @author poussin + * @version $Revision: 1.7 $ + * + * Last update: $Date: 2008-01-04 10:18:37 $ + * by : $Author: tchemit $ + */ + +package org.codelutin.vcs.impl.cvs; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import static org.codelutin.i18n.I18n._; +import org.codelutin.vcs.VCSConfig; +import org.codelutin.vcs.VCSException; +import org.codelutin.vcs.VCSHandlerFactory; +import org.codelutin.vcs.VCSRuntimeException; +import org.codelutin.vcs.VCSType; +import org.netbeans.lib.cvsclient.CVSRoot; +import org.netbeans.lib.cvsclient.Client; +import org.netbeans.lib.cvsclient.admin.Entry; +import org.netbeans.lib.cvsclient.admin.StandardAdminHandler; +import org.netbeans.lib.cvsclient.command.CommandException; +import org.netbeans.lib.cvsclient.command.GlobalOptions; +import org.netbeans.lib.cvsclient.command.KeywordSubstitutionOptions; +import org.netbeans.lib.cvsclient.command.add.AddCommand; +import org.netbeans.lib.cvsclient.command.checkout.CheckoutCommand; +import org.netbeans.lib.cvsclient.command.commit.CommitCommand; +import org.netbeans.lib.cvsclient.command.log.LogCommand; +import org.netbeans.lib.cvsclient.command.remove.RemoveCommand; +import org.netbeans.lib.cvsclient.command.status.StatusCommand; +import org.netbeans.lib.cvsclient.command.update.UpdateCommand; +import org.netbeans.lib.cvsclient.connection.AuthenticationException; +import org.netbeans.lib.cvsclient.connection.Connection; +import org.netbeans.lib.cvsclient.connection.PServerConnection; +import org.netbeans.lib.cvsclient.event.BinaryMessageEvent; +import org.netbeans.lib.cvsclient.event.CVSListener; +import org.netbeans.lib.cvsclient.event.FileAddedEvent; +import org.netbeans.lib.cvsclient.event.FileInfoEvent; +import org.netbeans.lib.cvsclient.event.FileRemovedEvent; +import org.netbeans.lib.cvsclient.event.FileToRemoveEvent; +import org.netbeans.lib.cvsclient.event.FileUpdatedEvent; +import org.netbeans.lib.cvsclient.event.MessageEvent; +import org.netbeans.lib.cvsclient.event.ModuleExpansionEvent; +import org.netbeans.lib.cvsclient.event.TerminationEvent; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** @author poussin */ + +public class CVSHelper { + + private static VCSConfig config; + /** Logger for this class */ + private static final Log log = LogFactory.getLog(CVSHelper.class); + + static protected Client getClient() { + // WARNING TO DEVELOPERS: + // Please be warned that attempting to reuse one open connection for + // more commands is not supported by cvs servers very well. + // You are advised to open a new Connection each time. + // If you still want to proceed, please do: + // System.setProperty("javacvs.multiple_commands_warning", "false") + // That will disable this message. + + // d'ou l'initialisation syst�matique de la connexion. + + String hostName = getConfig().getHostName(); + + // R�pertoire distant du CVS + String repository = config.getRemotePath(); + + String userName = getConfig().getUserName(); + + Connection connection; + if (getConfig().isUseSshConnexion()) { + throw new RuntimeException(CVSHelper.class + " you can not used a ssh connexion with CVS, use instead SVN configuration"); + // connexion ssh2 + // Localisation de la clef priv�e (pour la connexion ssh2). + //File keyFile = new File(config.getKeyFile()); + // Stockage des cl�s publics pour les hosts ou il y a eu connexion en ssh2 + //String host = config.etHost(); + // Localisation de la clef priv�e (pour la connexion ssh2). + //File keyFile = new File(IsisConfig.getProperties().getProperty( + // IsisConfig.CVS_KEY_FILE)); + // Stockage des cl�s publics pour les hosts ou il y a eu connexion en ssh2 + //String host = IsisConfig.getProperties().getProperty( + // IsisConfig.CVS_HOST); + +// Ssh2Connexion ssh2Connection = new Ssh2Connexion(); +// ssh2Connection.setUserName(userName); +// ssh2Connection.setHostName(hostName); +// ssh2Connection.setKeyFile(keyFile); +// ssh2Connection.setHost(host); +// ssh2Connection.setRepository(repository); +// connection = ssh2Connection; + } else { + String cvsrootString = ":pserver:" + userName + "@" + hostName + repository; + CVSRoot cvsroot = CVSRoot.parse(cvsrootString); + // connexion pserver + PServerConnection PServerConnection; + PServerConnection = new PServerConnection(cvsroot); +// PServerConnection.setUserName(userName); +// // PServerConnection.setEncodedPassword(encodedPassword); +// PServerConnection.setHostName(hostName); +// PServerConnection.setRepository(repository); + connection = PServerConnection; + } + + // Le connexion est ouverte automatiquement � l'�x�cution de la + // commande CVS si elle n'a pas �t� ouverte pr�c�dement. Je l'ouvre pour + // obtenir les messages d'erreurs plus clair. + // connection.open(); + + return new Client(connection, new StandardAdminHandler()); + } + + private static VCSConfig getConfig() { + if (config == null) + config = VCSHandlerFactory.getConfig(); + if (config.getType() != VCSType.CVS) { + throw new VCSRuntimeException("can not execute CVS command with " + + "a [" + config.getType() + "] handler"); + } + return config; + } + + static public GlobalOptions getGlobalOptions() { + GlobalOptions result = new GlobalOptions(); + //String repository = IsisConfig.getProperties().getProperty( + // IsisConfig.CVS_REPOSITORY); + String repository = getConfig().getRemotePath(); + result.setCVSRoot(repository); + return result; + } + + /** + * Permet de r�cuperer un nouveau module depuis le serveur + * Les donn�es sur le serveur sont dans /cvsroot/isis-fish/data/... + * on ne souhaite pas voir apparaitre data en local, on utilise donc + * le renomage du module a l'arrive pour retirer data + * + * @param destdir le repertoire local ou il faut mettre le module + * @param module le nom du module a recuperer + * @return result of command + * @throws org.codelutin.vcs.VCSException TODO + */ + static public CVSCommandResult checkout(File destdir, String module) throws VCSException { + String data = getConfig().getRemoteDatabase(); + //TODO Fix bug when module is a multi path one, check there is no + //TODO File.separator + String sep = File.separator; + if (module.indexOf("/") > -1) { + module = module.replaceAll(sep.equals("\\") ? sep + sep : sep, "/"); + } + String serverModule = data + "/" + module; + + // connexion ssh ou pserver, globalOption et initialisation client + // Intitialistion des options globals + GlobalOptions globalOptions = getGlobalOptions(); + Client client = getClient(); + + client.setLocalPath(destdir.getPath()); + + LogCVSListener listener = new LogCVSListener(); + client.getEventManager().addCVSListener(listener); + + // ex�cution de la commande de checkout + CheckoutCommand command = new CheckoutCommand(); + command.setModule(serverModule); + command.setCheckoutDirectory(module); //permet de renomer le module a l'arrive + try { + client.executeCommand(command, globalOptions); + } catch (CommandException eee) { + throw new VCSException(_("lutinvcs.error.checkout.module", module), eee); + } catch (AuthenticationException eee) { + throw new VCSException(_("lutinvcs.error.checkout.module", module), eee); + } finally { + try { + client.getEventManager().removeCVSListener(listener); + client.getConnection().close(); + } catch (IOException e) { + log.error("Fermeture de la connexion impossible", e); + } + } + return listener.getResult(); + } + + /** + * Permet de recuperer les mises a jours faite depuis le serveur + * + * @param file le fichier ou repertoire a mettre a jour recursivement + * @return the result of the command + * @throws VCSException if any problem while updating + */ + static public CVSCommandResult cvsUpdate(File file) throws VCSException { + GlobalOptions globalOptions = getGlobalOptions(); + Client client = getClient(); + + if (!file.exists() || file.isFile()) { + client.setLocalPath(file.getParent()); + } else { + client.setLocalPath(file.getPath()); + } + + LogCVSListener listener = new LogCVSListener(); + client.getEventManager().addCVSListener(listener); + + UpdateCommand command = new UpdateCommand(); + command.setFiles(new File[]{file}); + try { + client.executeCommand(command, globalOptions); + } catch (CommandException eee) { + throw new VCSException(_("lutinvcs.error.update.file", file), eee); + } catch (AuthenticationException eee) { + throw new VCSException(_("lutinvcs.error.update.file", file), eee); + } finally { + try { + client.getEventManager().removeCVSListener(listener); + client.getConnection().close(); + } catch (IOException e) { + log.error("Fermeture de la connexion impossible", e); + } + } + return listener.getResult(); + } + + /** + * Permet de recuperer les statuts depuis le serveur + * + * @param file le fichier ou repertoire dont on souhaite le statut recursivement + * @return the result of the command + * @throws VCSException if any problem while updating + */ + static public CVSCommandResult cvsStatus(File file) throws VCSException { + GlobalOptions globalOptions = getGlobalOptions(); + Client client = getClient(); + + if (file.isFile()) { + client.setLocalPath(file.getParent()); + } else { + client.setLocalPath(file.getPath()); + } + + LogCVSListener listener = new LogCVSListener(); + client.getEventManager().addCVSListener(listener); + + + StatusCommand command = new StatusCommand(); + command.setFiles(new File[]{file}); + +// Builder builder = command.createBuilder(new EventManager()); +// command.setBuilder(builder); + + try { + client.executeCommand(command, globalOptions); + } catch (CommandException eee) { + throw new VCSException(_("lutinvcs.error.update.file", file), eee); + } catch (AuthenticationException eee) { + throw new VCSException(_("lutinvcs.error.update.file", file), eee); + } finally { + try { + client.getEventManager().removeCVSListener(listener); + client.getConnection().close(); + } catch (IOException e) { + log.error("Fermeture de la connexion impossible", e); + } + } + return listener.getResult(); + } + + /** + * Permet de recuperer les logs depuis le serveur + * + * @param file le fichier ou repertoire dont on souhaite le log recursivement + * @return the result of the command + * @throws VCSException if any problem while updating + */ + static public CVSCommandResult cvsLog(File file) throws VCSException { + GlobalOptions globalOptions = getGlobalOptions(); + Client client = getClient(); + + if (file.isFile()) { + client.setLocalPath(file.getParent()); + } else { + client.setLocalPath(file.getPath()); + } + + LogCVSListener listener = new LogCVSListener(); + client.getEventManager().addCVSListener(listener); + + + LogCommand command = new LogCommand(); + command.setFiles(new File[]{file}); + +// Builder builder = command.createBuilder(new EventManager()); +// command.setBuilder(builder); + + try { + client.executeCommand(command, globalOptions); + } catch (CommandException eee) { + throw new VCSException(_("lutinvcs.error.update.file", file), eee); + } catch (AuthenticationException eee) { + throw new VCSException(_("lutinvcs.error.update.file", file), eee); + } finally { + try { + client.getEventManager().removeCVSListener(listener); + client.getConnection().close(); + } catch (IOException e) { + log.error("Fermeture de la connexion impossible", e); + } + } + return listener.getResult(); + } + + /** + * Permet de marquer des fichier a ajouter au CVS. Tous les fichiers de la + * liste doivent avoir une r�pertoire ancetre commun g�r� par le CVS. + * Tous les r�pertoires contenant des fichiers a ajouter doivent aussi + * etre ajout� s'il ne sont pas deja dans le CVS. + * + * @param files la listes des fichiers a ajouter, si les fichiers sont + * deja ajout�s cela ne produit pas d'erreur + * @return the result of the command + * @throws VCSException if any problem while updating + */ + static public CVSCommandResult cvsAdd(List<File> files) throws VCSException { + StandardAdminHandler adminHandler = new StandardAdminHandler(); + + File root = null; + File tmpRoot = null; + List<File> fileToAdd = new ArrayList<File>(); + for (File file : files) { + // recherche du repertoire ancetre de tous les autres + if (file.isFile()) { + tmpRoot = file.getParentFile(); + } + if (root == null || root.getPath().length() > tmpRoot.getParent().length()) { + root = tmpRoot; + } + + Entry entry = null; + try { + entry = adminHandler.getEntry(file); + } catch (IOException eee) { + if (log.isWarnEnabled()) { + log.warn(_("lutinvcs.error.get.information.file", file), eee); + } + } + // Si il n'y a pas d'entry, nouveau fichier et un add est �cessaire. + if (entry == null || !entry.isValid()) { + fileToAdd.add(file); + } + } + + if (fileToAdd.size() == 0) { + return new CVSCommandResult(); + } else { + log.debug(_("lutinvcs.message.add.cvs", root, fileToAdd)); + GlobalOptions globalOptions = getGlobalOptions(); + Client client = getClient(); + + client.setLocalPath(root.getPath()); + + LogCVSListener listener = new LogCVSListener(); + client.getEventManager().addCVSListener(listener); + + AddCommand addCommand = new AddCommand(); + addCommand.setFiles(fileToAdd.toArray(new File[fileToAdd.size()])); + addCommand.setKeywordSubst(KeywordSubstitutionOptions.DEFAULT); + try { + client.executeCommand(addCommand, globalOptions); + } catch (CommandException eee) { + throw new VCSException(_("lutinvcs.error.add.file", files), eee); + } catch (AuthenticationException eee) { + throw new VCSException(_("lutinvcs.error.add.file", files), eee); + } finally { + try { + client.getEventManager().removeCVSListener(listener); + client.getConnection().close(); + } catch (IOException e) { + log.error("Fermeture de la connexion impossible", e); + } + } + return listener.getResult(); + } + } + + /** + * Permet de marquer des fichier a supprimer du CVS + * + * @param files la listes des fichiers a supprimer, si les fichiers sont + * deja supprim�s cela ne produit pas d'erreur + * @return the result of the command + * @throws VCSException if any problem while updating + */ + static public CVSCommandResult cvsRemove(List<File> files) throws VCSException { + File root = null; + File tmpRoot = null; + List<File> fileToRemove = new ArrayList<File>(); + for (File file : files) { + // recherche du repertoire ancetre de tous les autres + if (file.isFile()) { + tmpRoot = file.getParentFile(); + } + if (root == null || root.getPath().length() > tmpRoot.getParent().length()) { + root = tmpRoot; + } + + if (file.isFile()) { + fileToRemove.add(file); + } + } + + if (fileToRemove.size() == 0) { + return new CVSCommandResult(); + } else { + log.debug(_("lutinvcs.message.remove.files", fileToRemove)); + GlobalOptions globalOptions = getGlobalOptions(); + Client client = getClient(); + + client.setLocalPath(root.getPath()); + + LogCVSListener listener = new LogCVSListener(); + client.getEventManager().addCVSListener(listener); + + RemoveCommand command = new RemoveCommand(); + command.setIgnoreLocallyExistingFiles(true); + command.setFiles(fileToRemove.toArray(new File[fileToRemove.size()])); + + log.debug("CVS command : " + command.getCVSCommand()); + try { + client.executeCommand(command, globalOptions); + } catch (CommandException eee) { + throw new VCSException(_("lutinvcs.error.remove.file", files), eee); + } catch (AuthenticationException eee) { + throw new VCSException(_("lutinvcs.error.remove.file", files), eee); + } finally { + try { + client.getEventManager().removeCVSListener(listener); + client.getConnection().close(); + } catch (IOException e) { + log.error("Fermeture de la connexion impossible", e); + } + } + return listener.getResult(); + } + } + + /** + * Permet d'envoyer des modifications au CVS + * + * @param files le fichier ou repertoire a envoyer, si file represente un + * repertoire alors un commit recursif est fait + * @param msg message of the commit + * @return the result of the command + * @throws VCSException if any problem while updating + */ + static public CVSCommandResult cvsCommit(List<File> files, String msg) throws VCSException { + File root = null; + File tmpRoot = null; + for (File file : files) { + // recherche du repertoire ancetre de tous les autres + if (file.isFile()) { + tmpRoot = file.getParentFile(); + } + if (root == null || root.getPath().length() > tmpRoot.getParent().length()) { + root = tmpRoot; + } + } + + GlobalOptions globalOptions = getGlobalOptions(); + Client client = getClient(); + + client.setLocalPath(root.getPath()); + + LogCVSListener listener = new LogCVSListener(); + client.getEventManager().addCVSListener(listener); + + CommitCommand command = new CommitCommand(); + command.setFiles(files.toArray(new File[files.size()])); + command.setMessage(msg); + log.debug("CVS command : " + command.getCVSCommand()); + try { + client.executeCommand(command, globalOptions); + } catch (CommandException eee) { + throw new VCSException(_("lutinvcs.error.commit.files", files), eee); + } catch (AuthenticationException eee) { + throw new VCSException(_("lutinvcs.error.commit.files", files), eee); + } finally { + try { + client.getEventManager().removeCVSListener(listener); + client.getConnection().close(); + } catch (IOException e) { + log.error("Fermeture de la connexion impossible", e); + } + } + return listener.getResult(); + } + + static protected class LogCVSListener implements CVSListener { + protected CVSCommandResult result = new CVSCommandResult(); + + public LogCVSListener() { + } + + /** @return Returns the result. */ + public CVSCommandResult getResult() { + return this.result; + } + + /* + * (non-Javadoc) + * + * @see org.netbeans.lib.cvsclient.event.CVSListener#messageSent(org.netbeans.lib.cvsclient.event.MessageEvent) + */ + public void messageSent(MessageEvent e) { + if (e.isError()) { + log.error(e.getMessage()); + // permet de stocker les traces + result.getTrace().append(e.getMessage()).append("\n"); + } else { + log.info(e.getMessage()); + } + } + + /* + * (non-Javadoc) + * + * @see org.netbeans.lib.cvsclient.event.CVSListener#messageSent(org.netbeans.lib.cvsclient.event.BinaryMessageEvent) + */ + public void messageSent(BinaryMessageEvent e) { + log.info(e.getMessage()); + } + + /* + * (non-Javadoc) + * + * @see org.netbeans.lib.cvsclient.event.CVSListener#fileAdded(org.netbeans.lib.cvsclient.event.FileAddedEvent) + */ + public void fileAdded(FileAddedEvent e) { + log.debug("File has been added."); + result.getFileAdded().add(e.getFilePath()); + } + + /* (non-Javadoc) + * @see org.netbeans.lib.cvsclient.event.CVSListener#fileToRemove(org.netbeans.lib.cvsclient.event.FileToRemoveEvent) + */ + public void fileToRemove(FileToRemoveEvent e) { + log.debug("File to removed: " + e.getFilePath()); +// result.getFileToRemove().add(e.getFilePath()); + + } + + /* + * (non-Javadoc) + * + * @see org.netbeans.lib.cvsclient.event.CVSListener#fileRemoved(org.netbeans.lib.cvsclient.event.FileRemovedEvent) + */ + public void fileRemoved(FileRemovedEvent e) { + log.debug("File is removed: " + e.getFilePath()); + } + + /* + * (non-Javadoc) + * + * @see org.netbeans.lib.cvsclient.event.CVSListener#fileUpdated(org.netbeans.lib.cvsclient.event.FileUpdatedEvent) + */ + public void fileUpdated(FileUpdatedEvent e) { + log.debug("File has been updated"); + result.getFileUpdated().add(e.getFilePath()); + } + + /* + * (non-Javadoc) + * + * @see org.netbeans.lib.cvsclient.event.CVSListener#fileInfoGenerated(org.netbeans.lib.cvsclient.event.FileInfoEvent) + */ + public void fileInfoGenerated(FileInfoEvent fileInfoEvent) { + log.debug("File status information has been received"); + // Avec le diffInfo, possibilit� de gestion plus fine des diff�rences. + // DiffInformation diffInfo = + // ((SimpleDiffBuilder)fileInfoEvent.getSource()).createDiffInformation(); + result.getFileInfo().add(fileInfoEvent.getInfoContainer()); + } + + /* + * (non-Javadoc) + * + * @see org.netbeans.lib.cvsclient.event.CVSListener#commandTerminated(org.netbeans.lib.cvsclient.event.TerminationEvent) + */ + public void commandTerminated(TerminationEvent e) { + if (e.isError()) { + log.error("Server responses has error"); + result.setError(true); + } else { + log.debug("Server responses has OK"); + } + } + + /* + * (non-Javadoc) + * + * @see org.netbeans.lib.cvsclient.event.CVSListener#moduleExpanded(org.netbeans.lib.cvsclient.event.ModuleExpansionEvent) + */ + public void moduleExpanded(ModuleExpansionEvent e) { + // ne fait rien + } + + } +} + + Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/DirectoryCVSFilter.java =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/DirectoryCVSFilter.java (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/DirectoryCVSFilter.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,50 @@ +/* *##% + * Copyright (C) 2005 + * Ifremer, Code Lutin, C�dric Pineau, Benjamin Poussin + * + * 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. + *##%*/ + +/* * + * DirectoryCVSFilter.java + * + * Created: 18 ao�t 2005 15:07:36 CEST + * + * @author Gr�goire DESSARD <dessard@codelutin.com> + * @version $Revision: 1.1 $ + * + * Last update: $Date: 2007-10-29 18:54:01 $ + * by : $Author: tchemit $ + */ + +package org.codelutin.vcs.impl.cvs; + +import java.io.File; +import java.io.FilenameFilter; + +/** + * Permet de filtrer les r�pertoires CVS. + * + * @author dessard + */ +public class DirectoryCVSFilter implements FilenameFilter { + + //static final public DirectoryCVSFilter filter = new DirectoryCVSFilter(); + + /** Refuse tous les r�pertoires ayant comme nom CVS. */ + public boolean accept(File dir, String name) { + return !name.equals("CVS"); + } +} Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/SinkHostKeyVerification.java =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/SinkHostKeyVerification.java (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/SinkHostKeyVerification.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,95 @@ +/* *##% + * Copyright (C) 2005 + * Ifremer, Code Lutin, C�dric Pineau, Benjamin Poussin + * + * 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. + *##%*/ + +/* * + * Compress.java + * + * Created: 7 nov. 2005 17:40:00 CEST + * + * @author Gr�goire DESSARD <dessard@codelutin.com> + * @version $Revision: 1.1 $ + * + * Last update: $Date: 2007-10-29 18:54:01 $ + * by : $Author: tchemit $ + */ + +package org.codelutin.vcs.impl.cvs; + +import com.sshtools.common.hosts.AbstractHostKeyVerification; +import com.sshtools.j2ssh.transport.InvalidHostFileException; +import com.sshtools.j2ssh.transport.TransportProtocolException; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * Permet de g�rer la cle du domaine pour la connexion SSH. + * <p/> + * Pour l'authentification de l'utilisateur : + * + * @author dessard + * @see Ssh2Connexion + */ +public class SinkHostKeyVerification extends AbstractHostKeyVerification { + + /** to use log facility, just put in your code: log.info(\"...\"); */ + static private Log log = LogFactory.getLog(SinkHostKeyVerification.class); + + /** + * Constructeur + * + * @param hostFileName Fichier d'autorisation des domaines. Permet de v�rifier la + * cl�f des domaines et les authorisations d'acc�s. + * @throws InvalidHostFileException + */ + public SinkHostKeyVerification(String hostFileName) + throws InvalidHostFileException { + super(hostFileName); + } + + /** + * M�thode appel�e en cas de refus de la connexion. Affiche un message + * d'erreur dans le log. + */ + public void onDeniedHost(String host) throws TransportProtocolException { + log.error("ERROR - Connexion host refus�e sur : " + host); + } + + /** + * M�thode appel� quand le cl� du domaine est fausse. Dans ce cas autorise + * automatiquement le host et rajoute la bonne cl� dans le fichier de cl� de + * domaine. + */ + public void onHostKeyMismatch(String host, String recordedFingerprint, + String actualFingerprint) throws TransportProtocolException { + // si le clef du host est inconnu, je l'autorise + allowHost(host, actualFingerprint, true); + + } + + /** + * M�thode appel� quand le cl� du domaine est inconnu. Dans ce cas autorise + * automatiquement le host et le rajoute dans le fichier de clef de domaine + */ + public void onUnknownHost(String host, String fingerprint) + throws TransportProtocolException { + // si le host est inconnu, je l'autorise + allowHost(host, fingerprint, true); + } + +} Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/Ssh2Connexion.java =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/Ssh2Connexion.java (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/Ssh2Connexion.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,333 @@ +/* *##% + * Copyright (C) 2005 + * Ifremer, Code Lutin, C�dric Pineau, Benjamin Poussin + * + * 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. + *##%*/ + +/* * + * Compress.java + * + * Created: 7 nov. 2005 17:40:00 CEST + * + * @author Gr�goire DESSARD <dessard@codelutin.com> + * @version $Revision: 1.3 $ + * + * Last update: $Date: 2008-01-04 10:14:36 $ + * by : $Author: tchemit $ + */ + +package org.codelutin.vcs.impl.cvs; + +import com.sshtools.j2ssh.SshClient; +import com.sshtools.j2ssh.authentication.AuthenticationProtocolState; +import com.sshtools.j2ssh.authentication.PublicKeyAuthenticationClient; +import com.sshtools.j2ssh.configuration.SshConnectionProperties; +import com.sshtools.j2ssh.session.SessionChannelClient; +import com.sshtools.j2ssh.transport.HostKeyVerification; +import com.sshtools.j2ssh.transport.publickey.SshPrivateKey; +import com.sshtools.j2ssh.transport.publickey.SshPrivateKeyFile; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import static org.codelutin.i18n.I18n._; +import org.codelutin.vcs.VCSRuntimeException; +import org.netbeans.lib.cvsclient.command.CommandAbortedException; +import org.netbeans.lib.cvsclient.connection.AbstractConnection; +import org.netbeans.lib.cvsclient.connection.AuthenticationException; +import org.netbeans.lib.cvsclient.connection.ConnectionModifier; +import org.netbeans.lib.cvsclient.util.LoggedDataInputStream; +import org.netbeans.lib.cvsclient.util.LoggedDataOutputStream; + +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.IOException; + +/** + * Permet de g�rer la connexion de l'utilisateur d'apr�s sa clef priv�e local + * (la cl�s public devant �tre d�pos�e sur le serveur). + * <p/> + * Pour l'authentification du server : + * + * @author dessard + * @see SinkHostKeyVerification + */ +public class Ssh2Connexion extends AbstractConnection { + + /** to use log facility, just put in your code: log.info(\"...\"); */ + static private Log log = LogFactory.getLog(Ssh2Connexion.class); + + /** Port par d�faut d'une connexion ssh2. */ + public static final int DEFAULT_PORT = 22; + + /** Timeout de r�ponse. */ + private static final int BANNER_TIMEOUT = 2000; + + /** Nom du domaine ou on veut se connecter. */ + private String hostName; + + /** + * Port utilis� pour la connexion. La valeur -1 par d�fait indique qu'on + * utilisera le port par d�faut. + */ + private int port = -1; + + /** Nom d'utilisateur. */ + private String userName; + + /** Chemin du fichier de clef priv�e. */ + private File keyFile = null; + + /** Nom du fichier contenant les cles des hosts */ + private String host = null; + + /** Client */ + private SshClient client; + + /** + * Permet l'ouverture de la connexion. + * + * @see org.netbeans.lib.cvsclient.connection.Connection#open() + */ + public void open() throws AuthenticationException, CommandAbortedException { + + try { + // propri�t�s ssh + SshConnectionProperties props = new SshConnectionProperties(); + props.setHost(hostName); + props.setPort((port == -1) ? DEFAULT_PORT : port); + props.setUsername(userName); + + // path des domaines autoris�s (hostKey). + HostKeyVerification ver = new SinkHostKeyVerification(host); + + client = new SshClient(); + client.connect(hostName, ver); + PublicKeyAuthenticationClient pk = new PublicKeyAuthenticationClient(); + pk.setUsername(userName); + + SshPrivateKeyFile file = + SshPrivateKeyFile.parse(keyFile); + SshPrivateKey key = file.toPrivateKey(null); // passphrase + pk.setKey(key); + int result = client.authenticate(pk); + if (result == AuthenticationProtocolState.COMPLETE) { + SessionChannelClient session = client.openSessionChannel(); + + session.executeCommand("cvs server"); + + int inbuf = (int) session.getRemoteWindow().getWindowSpace(); + // Si la taille est inf�rieur � 1, met la taille maximum. + if (inbuf < 1) { + inbuf = 65536; + } + // Instancie Stream en entr�e. + LoggedDataInputStream inputStream = new LoggedDataInputStream( + new BufferedInputStream(session.getInputStream(), inbuf)); + setInputStream(inputStream); + + int outbuf = (int) session.getRemotePacketSize(); + // Si la taille est inf�rieur � 1, met la taille maximum. + if (outbuf < 1) { + outbuf = 65536; + } + // Instancie Stream en sortie. + LoggedDataOutputStream outputStream = new LoggedDataOutputStream( + new BufferedOutputStream(session.getOutputStream(), outbuf)); + setOutputStream(outputStream); + } else { + throw new AuthenticationException("Authentication not completed " + result, "Authentication not completed " + result); + } +// client = new SshClient(); +// // connexion +// client.connect(props, ver); +// +// // Authenticate using a public key +// PublicKeyAuthenticationClient pk = new PublicKeyAuthenticationClient(); +// +// // Met le nom de l'utilisateur +// pk.setUsername(userName); +// +// // Ouvre la cl� priv�. +// SshPrivateKeyFile file = SshPrivateKeyFile.parse(keyFile); +// +// // Met la cl� priv�e. +// SshPrivateKey key = file.toPrivateKey(null); +// +// // Set the key and authenticate +// pk.setKey(key); +// int result = 0; +// +// result = client.authenticate(pk); +// +// log +// .debug("READY = 1 ; FAILED = 2 ; PARTIAL = 3 ; COMPLETE = 4 ; CANCELLED = 5 "); +// log.debug("result authentification : " + result); +// +// // ouverture du canal de communication +// SessionChannelClient session = client.openSessionChannel(); + + // ex�cute commande +// session.executeCommand("cvs server"); +// +// int inbuf = (int) session.getRemoteWindow().getWindowSpace(); +// // Si la taille est inf�rieur � 1, met la taille maximum. +// if (inbuf < 1) { +// inbuf = 65536; +// } +// // Instancie Stream en entr�e. +// LoggedDataInputStream inputStream = new LoggedDataInputStream( +// new BufferedInputStream(session.getInputStream(), inbuf)); +// setInputStream(inputStream); +// +// int outbuf = (int) session.getRemotePacketSize(); +// // Si la taille est inf�rieur � 1, met la taille maximum. +// if (outbuf < 1) { +// outbuf = 65536; +// } +// // Instancie Stream en sortie. +// LoggedDataOutputStream outputStream = new LoggedDataOutputStream( +// new BufferedOutputStream(session.getOutputStream(), outbuf)); +// setOutputStream(outputStream); + + } catch (Exception eee) { + throw new VCSRuntimeException(_("lutinvcs.error.connect.server"), eee); + } + + } + + /* + * (non-Javadoc) + * + * @see org.netbeans.lib.cvsclient.connection.Connection#verify() + */ + public void verify() throws AuthenticationException { + } + + /** + * A la fermeture de la connexion, demande au client la d�connexion. + * + * @see org.netbeans.lib.cvsclient.connection.Connection#close() + */ + public void close() throws IOException { + client.disconnect(); + client = null; + } + + /** + * Test si la connexion est ouverte. + * + * @return null, si pas de client, true si il y a connexion, false si il n'y + * a pas connexion. + * @see org.netbeans.lib.cvsclient.connection.Connection#isOpen() + */ + public boolean isOpen() { + return (client != null) && client.isConnected(); + } + + /* + * (non-Javadoc) + * + * @see org.netbeans.lib.cvsclient.connection.Connection#getPort() + */ + public int getPort() { + return port; + } + + /* + * (non-Javadoc) + * + * @see org.netbeans.lib.cvsclient.connection.Connection#modifyInputStream(org.netbeans.lib.cvsclient.connection.ConnectionModifier) + */ + public void modifyInputStream(ConnectionModifier connectionModifier) + throws IOException { + connectionModifier.modifyInputStream(getInputStream()); + } + + /* + * (non-Javadoc) + * + * @see org.netbeans.lib.cvsclient.connection.Connection#modifyOutputStream(org.netbeans.lib.cvsclient.connection.ConnectionModifier) + */ + public void modifyOutputStream(ConnectionModifier connectionModifier) + throws IOException { + connectionModifier.modifyOutputStream(getOutputStream()); + } + + /** @return Retourne le nom du domaine. */ + public String getHostName() { + return hostName; + } + + /** @param hostName Enregistre le nom du domaine. */ + public void setHostName(String hostName) { + this.hostName = hostName; + } + + /** @return Retourne le nom (identifiant de connexion) de l'utilisateur. */ + public String getUserName() { + return userName; + } + + /** @param userName Enregistre le nom (identifiant de connexion) de l'utilisateur. */ + public void setUserName(String userName) { + this.userName = userName; + } + + /** + * Permet de modifier le port pas d�faut. + * + * @param port Nouveau port. + */ + public void setPort(int port) { + this.port = port; + } + + /** + * @return Retourne le fichier conenant la liste des cl�fs et des + * autorisations pour les domaines. + */ + public File getKeyFile() { + return keyFile; + } + + /** + * Met le fichier conenant la liste des cl�fs et des autorisations pour les + * domaines. + * + * @param keyFile Le fichier � enregistrer. + */ + public void setKeyFile(File keyFile) { + this.keyFile = keyFile; + } + + /** + * Nom du fichier contenant les cles des hosts + * + * @return le fichier contenant les clefs + */ + public String getHost() { + return host; + } + + /** + * Nom du fichier contenant les cles des hosts + * + * @param host le fichier contenant les clefs + */ + public void setHost(String host) { + this.host = host; + } +} Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1 @@ +org.codelutin.util.LutinLogFactory \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/META-INF/services/org.codelutin.vcs.VCSHandlerProvider =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/META-INF/services/org.codelutin.vcs.VCSHandlerProvider (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/META-INF/services/org.codelutin.vcs.VCSHandlerProvider 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1 @@ +org.codelutin.vcs.CVSHandlerProvider \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/i18n/lutinvcs-provider-cvs-en_GB.properties =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/i18n/lutinvcs-provider-cvs-en_GB.properties (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/i18n/lutinvcs-provider-cvs-en_GB.properties 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,11 @@ +lutinvcs.error.add.file=Can't add file {0} +lutinvcs.error.checkout.module=Can''t checkout module {0} +lutinvcs.error.commit.files=Can''t commit files {0} +lutinvcs.error.connect.server=Can't connect to server +lutinvcs.error.get.information.file=Can''t get information on file {0] +lutinvcs.error.get.status.files=Can''t get status files\: {0} +lutinvcs.error.remove.file=Can't remove file {0} +lutinvcs.error.status.files=Can't get status files\: {0} +lutinvcs.error.update.file=Can''t update file ''{0}'' +lutinvcs.message.add.cvs=Ajouter depuis {0} fichiers {1}. +lutinvcs.message.remove.files=Suppresion des fichiers {0}. Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/i18n/lutinvcs-provider-cvs-fr_FR.properties =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/i18n/lutinvcs-provider-cvs-fr_FR.properties (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/resources/i18n/lutinvcs-provider-cvs-fr_FR.properties 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,11 @@ +lutinvcs.error.add.file=Can't add file {0} +lutinvcs.error.checkout.module=Can''t checkout module {0} +lutinvcs.error.commit.files=Can''t commit files {0} +lutinvcs.error.connect.server=Can't connect to server +lutinvcs.error.get.information.file=Can''t get information on file {0] +lutinvcs.error.get.status.files=Can''t get status files\: {0} +lutinvcs.error.remove.file=Can't remove file {0} +lutinvcs.error.status.files=Can't get status files\: {0} +lutinvcs.error.update.file=Can''t update file ''{0}'' +lutinvcs.message.add.cvs=Ajouter depuis {0} fichiers {1}. +lutinvcs.message.remove.files=Suppresion des fichiers {0}. Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/site/fr/rst/devel/index.rst =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/site/fr/rst/devel/index.rst (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/site/fr/rst/devel/index.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,5 @@ +========================== +Lutin vcs provider cvs dev +========================== + +TODO Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/site/fr/rst/index.rst =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/site/fr/rst/index.rst (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/site/fr/rst/index.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,5 @@ +====================== +Lutin vcs provider cvs +====================== + +TODO \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/site/fr/rst/todo.rst =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/site/fr/rst/todo.rst (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/site/fr/rst/todo.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,4 @@ +============================== +Lutinvcs - provider cvs - TODO +============================== + Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/site/site_fr.xml =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/site/site_fr.xml (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/site/site_fr.xml 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<project name="simexplorer-si"> + + <skin> + <groupId>lutinlib</groupId> + <artifactId>lutin-site-skin</artifactId> + <version>0.1</version> + </skin> + + <bannerLeft> + <name>Système d'information - SimExplorer</name> + </bannerLeft> + + <bannerRight> + <src> + http://www.codelutin.com/images/lutinorange-codelutin.png + </src> + <href>http://www.codelutin.com</href> + </bannerRight> + + <poweredBy> + <logo href="http://docutils.sourceforge.net/rst.html" + img="/images/restructuredtext-logo.png" name="reStructuredText"/> + </poweredBy> + + <body> + <menu name="Common Links" inherit="top" /> + <menu ref="parent" /> + <menu ref="reports" /> + + <menu name="Liens"> + <item href="http://java.sun.com/j2se" + name="Le site Java de Sun"> + </item> + </menu> + </body> +</project> Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/test/java/org/codelutin/vcs/impl/cvs/CVSHandlerTest.java =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/test/java/org/codelutin/vcs/impl/cvs/CVSHandlerTest.java (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/test/java/org/codelutin/vcs/impl/cvs/CVSHandlerTest.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,18 @@ +package org.codelutin.vcs.impl.cvs; + +import org.codelutin.vcs.VCSType; +import org.codelutin.vcs.VCSHandlerTest; + +/** + * Test CVSHandler + */ +class CVSHandlerTest extends VCSHandlerTest { + + protected void setUpVars() { + vcsType = VCSType.CVS; + super.setUpVars(); + } + + // if you don't want to execute some incompatible test just override them + +} \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/test/java/org/codelutin/vcs/impl/cvs/CVSHelperTest.java =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/test/java/org/codelutin/vcs/impl/cvs/CVSHelperTest.java (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/test/java/org/codelutin/vcs/impl/cvs/CVSHelperTest.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,116 @@ +/* *##% + * Copyright (C) 2006 + * Code Lutin, C�dric Pineau, Benjamin Poussin + * + * 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. + *##%*/ + +/* * + * CVSHelperTest.java + * + * Created: 22 janv. 2006 02:49:26 + * + * @author poussin + * @version $Revision: 1.1 $ + * + * Last update: $Date: 2007-10-29 18:54:01 $ + * by : $Author: tchemit $ + */ + +package org.codelutin.vcs.impl.cvs; + +import junit.framework.TestCase; + + +/** + * @author poussin + * + */ + +public class CVSHelperTest extends TestCase { + + public void testDummy() { + + } + +// /* +// * Test method for 'fr.ifremer.isisfish.versionning.vcsCvs.CVSHelper.checkout(File, String)' +// */ +// public void testCheckout() throws Exception { +// IsisConfig.load(); +// String r = ""; +// r += CVSHelper.checkout(IsisConfig.getDatabaseDirectory(), "scripts"); +// r += "\n"; +// r += CVSHelper.checkout(IsisConfig.getDatabaseDirectory(), "exports"); +// r += "\n"; +// r += CVSHelper.checkout(IsisConfig.getDatabaseDirectory(), "regions/banyuls"); +// System.out.println(r); +// } +// +// /* +// * Test method for 'fr.ifremer.isisfish.versionning.vcsCvs.CVSHelper.cvsUpdate(File)' +// */ +// public void testCvsUpdate() throws Exception { +// IsisConfig.load(); +// String r = ""; +// r += CVSHelper.cvsUpdate(new File(IsisConfig.getDatabaseDirectory(), "scripts")); +// r += "\n"; +// r += CVSHelper.cvsUpdate(new File(IsisConfig.getDatabaseDirectory(), "exports")); +// r += "\n"; +// r += CVSHelper.cvsUpdate(new File(IsisConfig.getDatabaseDirectory(), "regions/banyuls")); +// System.out.println(r); +// } +// +// /* +// * Test method for 'fr.ifremer.isisfish.versionning.vcsCvs.CVSHelper.cvsAdd(List<File>)' +// */ +// public void testCvsAdd() throws Exception { +// File newScript = new File(IsisConfig.getDatabaseDirectory(), "exports/newScript.java"); +// newScript.createNewFile(); +// +// List<File> files = Arrays.asList(newScript.getParentFile().listFiles()); +// +// IsisConfig.load(); +// String r = ""; +// r += CVSHelper.cvsAdd(files); +// r += CVSHelper.cvsCommit(files, "ajout de newScript"); +// System.out.println(r); +// } +// +// /* +// * Test method for 'fr.ifremer.isisfish.versionning.vcsCvs.CVSHelper.cvsRemove(List<File>)' +// */ +// public void testCvsRemove() throws Exception { +// File newScript = new File(IsisConfig.getDatabaseDirectory(), "exports/newScript.java"); +// List<File> files = new ArrayList<File>(); +// files.add(newScript); +// +// IsisConfig.load(); +// String r = ""; +// r += CVSHelper.cvsRemove(files); +// r += CVSHelper.cvsCommit(files, "suppression de newScript"); +// System.out.println(r); +// } + +// /* +// * Test method for 'fr.ifremer.isisfish.versionning.vcsCvs.CVSHelper.cvsCommit(List<File>, String)' +// */ +// public void testCvsCommit() throws Exception { +// +// } + +} + + Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/test/java/org/codelutin/vcs/impl/cvs/SshConnexionTest.java =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/test/java/org/codelutin/vcs/impl/cvs/SshConnexionTest.java (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/test/java/org/codelutin/vcs/impl/cvs/SshConnexionTest.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,98 @@ +/* *##% + * Copyright (C) 2006 + * Ifremer, Code Lutin, C�dric Pineau, Benjamin Poussin + * + * 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. + *##%*/ + +/* * + * SshConnexionTest.java + * + * Created: 26 d�c. 06 17:43:42 + * + * @author poussin + * @version $Revision: 1.2 $ + * + * Last update: $Date: 2007-10-30 04:29:11 $ + * by : $Author: tchemit $ + */ + +package org.codelutin.vcs.impl.cvs; + +import com.sshtools.j2ssh.SshClient; +import com.sshtools.j2ssh.authentication.AuthenticationProtocolState; +import com.sshtools.j2ssh.authentication.PublicKeyAuthenticationClient; +import com.sshtools.j2ssh.session.SessionChannelClient; +import com.sshtools.j2ssh.transport.HostKeyVerification; +import com.sshtools.j2ssh.transport.publickey.SshPrivateKey; +import com.sshtools.j2ssh.transport.publickey.SshPrivateKeyFile; +import junit.framework.TestCase; + +import java.io.File; + +/** + * java -cp j2ssh-common-0.2.2.jar:j2ssh-core-0.2.2.jar:/var/cache/maven2/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar com.sshtools.j2ssh.transport.publickey.SshKeyGenerator -b 1024 -t dsa toto + * + * @author poussin + */ +class SshConnexionTest extends TestCase { + + public void testKey() throws Exception { + String username = "bpoussin"; + String hostname = "labs.libre-entreprise.org"; + String keyfile = "/home/poussin/.ssh/id_dsa"; + + System.out.println("step 0"); + + SshPrivateKeyFile file = + SshPrivateKeyFile.parse(new File(keyfile)); + System.out.println("step 1"); + + HostKeyVerification ver = new SinkHostKeyVerification("/home/poussin/.isis-ssh-host.xml"); + + SshClient ssh = new SshClient(); + ssh.connect(hostname, ver); + PublicKeyAuthenticationClient pk = new PublicKeyAuthenticationClient(); + pk.setUsername(username); + + System.out.println("step 2"); + String passphrase = null; + if (file.isPassphraseProtected()) { + System.out.print("Enter passphrase? "); + passphrase = ""; + } + SshPrivateKey key = file.toPrivateKey(passphrase); + System.out.println("step 3"); + pk.setKey(key); + System.out.println("step 4"); + int result = ssh.authenticate(pk); + System.out.println("step 5"); + // Evaluate the result + if (result == AuthenticationProtocolState.COMPLETE) { + System.out.println("Ok complete"); + // The connection is authenticated we can now do some real work! + SessionChannelClient session = ssh.openSessionChannel(); + ssh.disconnect(); + } + if (result == AuthenticationProtocolState.PARTIAL) { + System.out.println("Further authentication requried!"); + } + if (result == AuthenticationProtocolState.FAILED) { + System.out.println("Authentication failed!"); + } + } +} + + Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/test/resources/.isis-config-3_cvs =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/test/resources/.isis-config-3_cvs (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/test/resources/.isis-config-3_cvs 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,21 @@ +#IsisFish configuration version 3 +#Fri Dec 07 10:44:28 GMT 2007 +compileDirectory=/home/tony/isis-build +cvsSsh2Connexion=false +defaultExportDirectory=/home/tony/isis-export +cvsUserName=anonymous +simulatorServerPassword=guest +simulatorServer=http\://simulateur.ifremer.fr\:9090 +javadocUrl=http\://isis-fish.labs.libre-entreprise.org/apidocs/ +smtpServer=smtp +cvsHost=/home/tony/.isis-ssh-host.xml +cvsHostName=cvs.labs.libre-entreprise.org +userName=chemit tony +cvsKeyFile=/home/tony/.isis-ssh-key +cvsDataBase=isis-fish-data +database=/home/tony/isis-database-3_cvs +simulatorServerLogin=anonymous +language=fr +country=FR +userMail=chemit@codelutin.com +cvsRepository=/cvsroot/isis-fish Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/test/resources/isis-database-3_cvs.zip =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-provider-cvs/src/test/resources/isis-database-3_cvs.zip ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-provider-cvs/src/test/resources/log4j.properties =================================================================== --- trunk/lutinvcs/lutinvcs-provider-cvs/src/test/resources/log4j.properties (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-cvs/src/test/resources/log4j.properties 2008-03-31 17:02:25 UTC (rev 234) @@ -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 Added: trunk/lutinvcs/lutinvcs-provider-svn/.cvsignore =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/.cvsignore (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/.cvsignore 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,7 @@ +target +velocity.log +maven.log +.eclipse +.classpath +lutinutil.iml +lutinutil.ipr Added: trunk/lutinvcs/lutinvcs-provider-svn/LICENSE.txt =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/LICENSE.txt (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/LICENSE.txt 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,280 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS Added: trunk/lutinvcs/lutinvcs-provider-svn/changelog =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/changelog (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/changelog 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,57 @@ +ver-0-26 poussin 2007???? + * bug in concat(Object [] ...), better array type now work + * add unaccent in StringUtil + +ver-0-25 poussin 20070425 + * add StringUtil.toArrayXXX(String ... s) methodes + * use generic + +ver-0-24 poussin + * ArgumentsParser have 1 as repetitionMax by default + * ArgumentsParser use jdk 1.5 syntaxe (..., <>) + +ver-0-23 poussin 20061004 + * move i18n in lutinutil + * add method Resource.getConfigProperties(String, Properties) to chains + properties + +ver-0-22 poussin 20060913 + * use Generics in CategorisedListenerSet + * add org.codelutin.log package (LutinLog, ...) + * remove org.codelutin.util.Log + +ver-0-21 poussin 20060907 + + * Add TransformedList + * Add FileUtil.getTempFile(String):File + * add FileUtil.getFile():File that prompt user + * add FileUtil.getDirectory(): String that prompt user + * add FileUtil.copyRecursively(File, File, String ... patternFilter) + * add ZipUtil class to compress/uncompress zip file + * Transparente*Reference accept null object + +ver-0-17 thimel 20050610 + + * Ajout de BoundedList et BoundedListOutOfBoundsException + +ver-0-16 poussin 20050526 + + * Ajout de la methode getConfigProperties dans Resource + +ver-0-9 poussin 20040728 + + * Ajout de methode isJar, isZip, dans Resource + +ver-0-3 poussin 20040405 + + * utilisation de maven pour la gestion du projet + * Ajout de ExceptionUtil + +ver-0-2 poussin 20031021 + + * ajout du parser d'argument, ArgumentsParser + * ajout de StringUtil + +ver-0-1 + + * premier version contient seulement Resource Added: trunk/lutinvcs/lutinvcs-provider-svn/pom.xml =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/pom.xml (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/pom.xml 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,53 @@ +<?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-provider-svn</artifactId> + <name>Lutinvcs provider svn</name> + + <packaging>jar</packaging> + <version>0.1-SNAPSHOT</version> + <description>Librairie vcs provider svn</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>org.tmatesoft</groupId> + <artifactId>svnkit</artifactId> + <!--version>1.1.2</version--> + <scope>compile</scope> + </dependency> + </dependencies> + +</project> Added: trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNHandlerProvider.java =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNHandlerProvider.java (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNHandlerProvider.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,28 @@ +/** + * # #% 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.impl.svn.SVNHandler; + +/** @author chemit */ +public class SVNHandlerProvider implements VCSHandlerProvider<SVNHandler> { + public String getName() { + return "SVN"; + } + + public SVNHandler newInstance(VCSConfig config) { + return new SVNHandler(config); + } +} Added: trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/VCSRevisionImpl.java =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/VCSRevisionImpl.java (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/VCSRevisionImpl.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,31 @@ +/** + * # #% 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.tmatesoft.svn.core.wc.SVNRevision; + +/** @author chemit */ +public class VCSRevisionImpl implements VCSRevision { + + SVNRevision rev; + + public String getValue() { + return rev == null ? null : rev.toString(); + } + + public void setRev(SVNRevision rev) { + this.rev = rev; + } +} Added: trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHandler.java =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHandler.java (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHandler.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,814 @@ +/* *##% +* 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.impl.svn; + +import static org.codelutin.i18n.I18n._; +import org.codelutin.vcs.AbstractVCSHandler; +import org.codelutin.vcs.VCSConfig; +import org.codelutin.vcs.VCSException; +import org.codelutin.vcs.VCSHelper; +import static org.codelutin.vcs.VCSHelper.isFileInCheckedDir; +import org.codelutin.vcs.VCSRuntimeException; +import org.codelutin.vcs.VCSState; +import static org.codelutin.vcs.VCSState.OUT_OF_DATE; +import static org.codelutin.vcs.VCSState.OUT_OF_DATE_AND_MODIFIED; +import static org.codelutin.vcs.VCSState.UP_TO_DATE; +import org.codelutin.vcs.VCSStatus; +import org.tmatesoft.svn.core.ISVNDirEntryHandler; +import org.tmatesoft.svn.core.ISVNLogEntryHandler; +import org.tmatesoft.svn.core.SVNCommitInfo; +import org.tmatesoft.svn.core.SVNDirEntry; +import org.tmatesoft.svn.core.SVNException; +import org.tmatesoft.svn.core.SVNLogEntry; +import org.tmatesoft.svn.core.SVNNodeKind; +import org.tmatesoft.svn.core.SVNURL; +import org.tmatesoft.svn.core.io.SVNRepository; +import org.tmatesoft.svn.core.wc.ISVNOptions; +import org.tmatesoft.svn.core.wc.SVNClientManager; +import org.tmatesoft.svn.core.wc.SVNRevision; +import org.tmatesoft.svn.core.wc.SVNStatus; +import org.tmatesoft.svn.core.wc.SVNStatusType; +import static org.tmatesoft.svn.core.wc.SVNStatusType.*; +import org.tmatesoft.svn.core.wc.SVNWCClient; +import org.tmatesoft.svn.core.wc.SVNWCUtil; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; + +/** + * VCSHandler implementation for svn + * + * @author chemit + */ + +public final class SVNHandler extends AbstractVCSHandler { + + protected SVNURL repositoryURL; + + protected SVNRepository repository; + + protected SVNClientManager ourClientManager; + + protected SVNWCClient ourWcClient; + + public SVNHandler(VCSConfig config) { + + super(config, ".svn", "entries"); + + SVNHelper.setupLibrary(); + + try { + + // construct remote repository SVNURL + + repositoryURL = SVNURL.parseURIEncoded(getRemoteUrl()); + log.info("repositoryURL " + repositoryURL); + + // instanciate runtime default options + ISVNOptions options = SVNWCUtil.createDefaultOptions(true); + + // TODO Deal with authentication + + if (config.isUseSshConnexion()) { + // we use a ssh2 authentication mecanism (username /keyFile) + // just push in System properties that's we need for this... + System.setProperty("svnkit.ssh2.key", config.getKeyFile().getAbsolutePath()); + System.setProperty("svnkit.ssh2.username", config.getUserName()); + if (!config.isNoPassPhrase()) { + char[] pass = getConfig().getPassphrase().toCharArray(); + if (pass != null) { + System.setProperty("svnkit.ssh2.passphrase", Arrays.toString(pass)); + Arrays.fill(pass, '0'); + } + } + //System.setProperty("svnkit.ssh2.password", ""); + //System.setProperty("svnkit.ssh2.port", "22"); + + // instanciate svn client manager + ourClientManager = SVNClientManager.newInstance(options); + + } else { + // we use a simple authentication mecanism (username/password) + ourClientManager = SVNClientManager.newInstance(options, config.getUserName(), config.getUserName()); + } + // instanciate repo + repository = ourClientManager.createRepository(repositoryURL, true); + + // add our svn event logger TODO Remake this logger or use the + // DebugLog from svnkit ? + ourClientManager.setEventHandler(new SVNHelper.SVNEventLoggerHandler()); + } catch (SVNException e) { + // TODO I18N + throw new VCSRuntimeException("could not compute repository url ", e); + } + } + + public boolean hasProtocoleChanged() throws VCSException { + File root = config.getLocalDatabasePath(); + if (!root.exists() || !isFileInCheckedDir(root, this)) { + // local database does not exists, so no switch + return false; + } + String oldProtocol = getSVNStatus(root, false).getURL().getProtocol(); + String newProtocol = repositoryURL.getProtocol(); + return !oldProtocol.equals(newProtocol); + } + + public void initWorkingCopy() throws VCSException { + try { + // test connection + repository.testConnection(); + + } catch (SVNException e1) { + // connexion failed, what do we want to do ? display vcs + // configuration to user ? + // display explicit message for user + throw new VCSException(e1); + } + + File root = config.getLocalDatabasePath(); + if (!root.exists()) { + getLocalDatabasePath().mkdirs(); + } + long lastRevision = checkoutOnlyTheDirectory(root, SVNRevision.HEAD); + log.info(_("lutinvcs.message.copy.revision", null, lastRevision)); + } + + public void testConnection() throws VCSException { + if (getConfig().isUseSshConnexion()) { + // try to test the ssh connection + + File path = getConfig().getKeyFile(); + try { + String passphrase = getConfig().getPassphrase(); + SVNHelper.testSSHConnection(repositoryURL.toString(), getConfig().getUserName(), path == null ? null : path.getAbsolutePath(), passphrase == null ? new char[0] : passphrase.toCharArray()); + return; + } catch (VCSException e) { + log.warn(_("lutinvcs.error.vcs.no.ssh.connection", getConfig().getUserName(), path)); + } + } + // do not use ssh connection + getConfig().setUseSshConnexion(false); + // try to test with a anonymous connection + SVNHelper.testAnonymousConnection(repositoryURL.toString()); + } + + public String getRemoteUrl() { + StringBuilder sb = new StringBuilder(); + sb.append(config.isUseSshConnexion() ? "svn+ssh://" : "svn://"); + sb.append(config.getHostName()).append("/"); + sb.append(config.getRemotePath()).append("/"); + sb.append(config.getRemoteDatabase()); + return sb.toString(); + } + + // TODO Delete VCSStatus and all links, use VCSState + public VCSStatus getStatus(File file) { + SVNStatusType statusType; + try { + statusType = getStatusType(file); + } catch (SVNException e) { + return VCSStatus.NONE; + } + VCSStatus result; + if (statusType.equals(STATUS_NORMAL)) { + result = VCSStatus.NORMAL; + } else if (statusType.equals(STATUS_ADDED)) { + result = VCSStatus.ADDED; + } else if (statusType.equals(STATUS_CONFLICTED)) { + result = VCSStatus.CONFLICTED; + } else if (statusType.equals(STATUS_DELETED)) { + result = VCSStatus.DELETED; + } else if (statusType.equals(STATUS_IGNORED)) { + result = VCSStatus.IGNORED; + } else if (statusType.equals(STATUS_MISSING)) { + result = VCSStatus.MISSING; + } else if (statusType.equals(STATUS_MODIFIED)) { + result = VCSStatus.MODIFIED; + } else if (statusType.equals(STATUS_UNVERSIONED)) { + result = VCSStatus.UNVERSIONED; + } else + result = VCSStatus.NONE; + return result; + } + + // tmp is used to get back the revision + public VCSState getState(File file, Collection tmp) throws VCSException { + return getState(file, tmp, true); + } + + @SuppressWarnings("unchecked") + public VCSState getState(File file, Collection tmp, boolean noremote) throws VCSException { + + VCSState result = VCSState.UNKNOWN; + + boolean exist = file.exists(); + + VCSHelper.assertFileInWC(file, this); + + // file is in a working copy + + SVNStatus stat = null; + SVNStatusType statusLocal; + SVNStatusType statRemote; + + if (!exist || !isFileInCheckedDir(file, this)) { + + // file not locally exists or not in a checked dir + // check if present on remote repository + + try { + stat = ourClientManager.getStatusClient().doStatus(file, true); + + if (stat != null) { + + statusLocal = stat.getContentsStatus(); + if (statusLocal.equals(STATUS_UNVERSIONED)) { + result = VCSState.UNVERSIONNED; + } else if (statusLocal.equals(STATUS_MISSING)) { + result = VCSState.MISSING; + } + + } + // file is on remote + } catch (SVNException e) { + log.debug(_("lutinvcs.error.not.find.status", file, e.getErrorMessage())); + // it means no file on remote! + // TODO Find how to not do that!!! + if (exist) { + result = VCSState.UNVERSIONNED_OR_MISSING; + } + } + if (stat != null) { + tmp.add(stat.getRevision().getNumber()); + } + return result; + } + + // file is under VCS and exists + try { + + stat = ourClientManager.getStatusClient().doStatus(file, true); + + } catch (SVNException e) { + log.warn(_("lutinvcs.error.not.find.status", file, e.getErrorMessage())); + return VCSState.UNKNOWN; + } + + statusLocal = stat.getContentsStatus(); + statRemote = stat.getRemoteContentsStatus(); + + if (statusLocal.equals(STATUS_NORMAL)) { + // locally not modify + // could be out of date + result = statRemote == STATUS_NONE ? UP_TO_DATE : OUT_OF_DATE; + } else if (statusLocal.equals(STATUS_ADDED)) { + + //TODO Should add a new VCSState : NEED_COMMIT + + } else if (statusLocal.equals(STATUS_CONFLICTED)) { + + result = OUT_OF_DATE_AND_MODIFIED; + + } else if (statusLocal.equals(STATUS_DELETED)) { + + //TODO Should add a new VCSState : NEED_COMMIT + + } else if (statusLocal.equals(STATUS_IGNORED)) { + + } else if (statusLocal.equals(STATUS_MISSING)) { + + result = VCSState.MISSING; + + } else if (statusLocal.equals(STATUS_MODIFIED)) { + result = VCSState.MODIFIED; + // locally modify + // could be out of date + if (STATUS_NONE != statRemote) { + result = OUT_OF_DATE_AND_MODIFIED; + } + } else if (statusLocal.equals(STATUS_UNVERSIONED)) { + + result = VCSState.UNVERSIONNED; + } + //noinspection unchecked + tmp.add(stat.getRevision().getNumber()); + return result; + } + + private int prefixPath = -1; + + private int getPrefixPath() { + if (prefixPath == -1) + prefixPath = getLocalDatabasePath().getAbsolutePath().length() + 1; + return prefixPath; + } + + private String getRelativePath(File f) { + final String path = f.getAbsolutePath(); + return path.length() <= getPrefixPath() ? path : path.substring(getPrefixPath()); + } + + public boolean isOnRemote(File file) { + VCSStatus fileStatus = getStatus(file); + return !(VCSStatus.UNVERSIONED == fileStatus || VCSStatus.NONE == fileStatus); + } + + public boolean isUpToDate(File file) throws VCSException { + SVNStatus status = getSVNStatus(file); + return status.getContentsStatus() == STATUS_NORMAL && STATUS_NONE == status.getRemoteContentsStatus(); + } + + public long add(List<File> files, String msg) throws VCSException { + assertFilesExist(files, msg); + try { + ArrayList<File> filesTmp = new ArrayList<File>(files); + for (Iterator<File> it = filesTmp.iterator(); it.hasNext();) { + File file = it.next(); + + VCSStatus status = getStatus(file); + if (!file.exists() || status == VCSStatus.NORMAL) { + // do not commit this file + it.remove(); + continue; + } + // we must check first if file need really to be added ? + if (status == VCSStatus.UNVERSIONED) { + getOurWcClient().doAdd(file, false, false, false, false, false); + log.debug("mark to add '" + getRelativePath(file) + "'"); + } + } + if (!filesTmp.isEmpty() && msg != null) { + // we do commit + long rev = commit(filesTmp, msg); + for (File file : filesTmp) { + log.info("'" + getRelativePath(file) + "' at revison " + rev); + } + return rev; + } + } catch (SVNException e) { + throw new VCSException(e); + } + return -1; + } + + public void delete(List<File> files, String msg) throws VCSException { + assertFilesExist(files, "delete"); + files.remove(getLocalDatabasePath()); + files.remove(getLocalDatabasePath().getParentFile()); + try { + // when delete is true, after commit we have a none status + for (File file : files) { + + getOurWcClient().doDelete(file, true, msg != null, false); + log.debug("mark to delete '" + getRelativePath(file) + "'"); + } + long revision; + if (msg != null) { + // we do commit + revision = commit(files, msg); + for (File file : files) { + log.info("'" + getRelativePath(file) + "' at revison " + revision); + } + } + } catch (SVNException e) { + throw new VCSException(e); + } + } + + public void revert(List<File> files) throws VCSException { + assertFilesExist(files, "revert"); + try { + for (File file : files) { + // we have nothing to do for with a normal status file + if (getStatus(file) == VCSStatus.NORMAL) { + continue; + } + getOurWcClient().doRevert(file, true); + log.info("'" + getRelativePath(file) + "' at revison " + "TODO"); + } + } catch (SVNException e) { + throw new VCSException(e); + } + } + + public long commit(List<File> files, String msg) throws VCSException { + assertFilesExist(files, "commit"); + + try { + SVNCommitInfo commitInfo = ourClientManager.getCommitClient() + .doCommit(files.toArray(new File[files.size()]), false, msg, false, true); + log.debug("to revision " + commitInfo.getNewRevision()); + return commitInfo.getNewRevision(); + } catch (SVNException e) { + throw new VCSException(e); + } + } + + public void update(File file) throws VCSException { + update(file, SVNRevision.HEAD); + } + + /** + * @param file file to update from remote repository + * @param revision required revision + * @throws VCSException if any exception while update operation (like update a + * locally modified file or a unversionned file) + */ + public void update(File file, Object revision) throws VCSException { + try { + VCSStatus status = getStatus(file); + if (status == VCSStatus.MODIFIED) + throw new VCSException("could not update a localy modified file " + file); + if (status == VCSStatus.UNVERSIONED || status == VCSStatus.NONE) + throw new VCSException("could not update a non versionned file " + file); + long newRev = ourClientManager.getUpdateClient().doUpdate(file, (SVNRevision) revision, true); + log.info("'" + getRelativePath(file) + "' to revision " + newRev); + } catch (SVNException e) { + throw new VCSException(e); + } + } + + public void checkout(File destDir, String module, boolean recurse) + throws VCSException { + try { + final SVNURL urlModule = repositoryURL.appendPath(module, true); + + String sep = File.separator; + // TODO Why this ? + final File modulePath = new File(destDir, module.replaceAll("/", "\\".equals(sep) ? sep + sep : sep)); + log.info(urlModule + " to path '" + getRelativePath(modulePath) + "' (module:" + module + ")"); + ourClientManager.getUpdateClient().doCheckout(urlModule, modulePath, null, SVNRevision.HEAD, recurse); + } catch (SVNException e) { + throw new VCSException(e); + } + } + + public void checkoutFile(File destDir, String module) throws VCSException { + update(new File(destDir, module)); + } + + public long checkoutOnlyTheDirectory(File root, Object revision) + throws VCSException { + long lastRevision; + try { + // obtain module + File repoRoot = getLocalDatabasePath(); + File tmp = root; + StringBuilder sb = new StringBuilder(); + while (!tmp.equals(repoRoot)) { + sb.append('/').append(tmp.getName()); + tmp = tmp.getParentFile(); + } + String module = sb.toString(); + if (module.length() > 0) + module = module.substring(1); + + SVNURL url = repositoryURL.appendPath(module, true); + + lastRevision = ourClientManager.getUpdateClient().doCheckout( + url, + root, + null, + (SVNRevision) (revision == null ? SVNRevision.HEAD + : revision), false); + + log.info(url + " to path '" + getRelativePath(root) + "' (module:" + module + ") to revision " + lastRevision); + // Suppress all files from root directory of working copy + for (File file : root.listFiles()) + if (file.isFile()) + file.delete(); + } catch (SVNException e) { + throw new VCSException(e); + } + return lastRevision; + } + + public List<String> getRemoteStorageNames(File directory) + throws VCSException { + final List<String> result = new ArrayList<String>(); + + try { + ISVNDirEntryHandler handler = new ISVNDirEntryHandler() { + final String sep = File.separator; + + public void handleDirEntry(SVNDirEntry dirEntry) + throws SVNException { + // we only deal with files + if (dirEntry.getKind() == SVNNodeKind.FILE) { + + String s = dirEntry.getRelativePath(); + // TODO Prefer use VCSHelper.XXX method to convert names + if (s.indexOf("/") > -1) { + s = s.replaceAll("/", sep.equals("\\") ? sep + sep : sep); + } + result.add(s); + } + } + }; + ourClientManager.getLogClient().doList(directory, SVNRevision.BASE, + SVNRevision.HEAD, true, handler); + } catch (SVNException e) { + throw new VCSException(e); + } + Collections.sort(result); + return result; + } + + public SVNRevision getRevision(File f) throws VCSException { + SVNStatus status; + try { + status = ourClientManager.getStatusClient().doStatus(f, false); + return status.getRevision(); + } catch (SVNException e) { + throw new VCSException(e); + } + } + + /** + * @param startRevision la r�vision de d�but + * @param endRevision la r�vision final + * @param file le fichier � traiter + * @return la liste des r�visions en tre la startRevision et la endRevision + * @throws VCSException if nay exception while operation + */ + public List<SVNLogEntry> getLog(Object startRevision, Object endRevision, + File file) throws VCSException { + + final List<SVNLogEntry> result = new ArrayList<SVNLogEntry>(); + + final long workingRevision = getRevision(file).getNumber(); + final long startRev = ((SVNRevision) startRevision).getNumber(); + + ISVNLogEntryHandler handler = new ISVNLogEntryHandler() { + public void handleLogEntry(SVNLogEntry logEntry) + throws SVNException { + if (workingRevision != logEntry.getRevision() || startRev == 0) + result.add(logEntry); + } + }; + + try { + ourClientManager.getLogClient().doLog(new File[]{file}, + (SVNRevision) startRevision, (SVNRevision) endRevision, + false, false, 1024, handler); + } catch (SVNException e) { + // it could mean that file in unversionned for example + } + + return result; + } + + /** + * Retourne la changelog d'un fichierentre la version local et la remote ou + * null si les deux fichiers ont la meme version + * + * @param file file to treate + * @return le log ou null si auncune r�vision n'a �t� fourni + * @throws VCSException if nay exception while operation + */ + public String getChangeLog(File file) throws VCSException { + SVNRevision startRevision = file.exists() ? SVNRevision.WORKING + : SVNRevision.create(0); + + log.debug("file " + file + " init Rev " + startRevision); + + List<SVNLogEntry> logInfo = getLog(startRevision, SVNRevision.HEAD, + file); + // List<SVNLogEntry> logInfo = getLog(file.exists()?SVNRevision.WORKING: + // SVNRevision.BASE, SVNRevision.HEAD, file); + + // if no revision where found, it means no changelog + // if (!file.exists() && logInfo.isEmpty()) { + if (logInfo.isEmpty()) { + return null; + } + + String result = ""; + + for (SVNLogEntry info : logInfo) { + + String remoteVersion = info.getRevision() + ""; + + log.debug("File version: " + remoteVersion); + + result += "\nRev " + info.getRevision() + " " + file.getName() + + "(" + info.getAuthor() + ", " + info.getDate() + ")" + + "\n" + info.getMessage(); + } + // System.out.println("changelog with normally no empty result [" + + // result + "]"); + return result.substring(1); + } + + public String getDiff(File file) throws VCSException, IOException { + + // make diff against Head revision of file + return getDiff(file, SVNRevision.HEAD); + } + + public String getDiff(File file, Object againstRevision) + throws VCSException, IOException { + + assertFileExist(file, "getDiff"); + + SVNRevision remoteRevision = (SVNRevision) againstRevision; + + SVNStatus status = getSVNStatus(file); + + if (status == null) { + throw new VCSException("could not found status for the file " + file); + } + + log.debug("status of file we want diff [" + file + "] ? " + status.getContentsStatus() + ":" + status.getRemoteContentsStatus()); + + SVNRevision localRevision = SVNRevision.WORKING; + + if (localRevision == null) { + throw new VCSException("could not found local revision for the file " + file); + } + + if (remoteRevision == null || remoteRevision != SVNRevision.HEAD) { + remoteRevision = status.getRemoteRevision(); + } + + if (remoteRevision == null) { + throw new VCSException("could not found remote revision for the file " + file); + } + + if (localRevision.getNumber() >= remoteRevision.getNumber() && remoteRevision != SVNRevision.HEAD) { + return null; + } + + // we know there is something to diff + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try { + ourClientManager.getDiffClient().doDiff(file, localRevision, file, remoteRevision, true, false, baos); + return baos.toString(); + } catch (Exception e) { + throw new VCSException(e); + } finally { + baos.close(); + } + } + + public String getFileContent(File file, Object revision) + throws VCSException, IOException { + if (file == null || file.isDirectory()) { + throw new VCSRuntimeException("could not invoke getFileContent for a directory [" + file + "]"); + } + String path = file.getAbsolutePath(); + int prefixRoot = getLocalDatabasePath().getAbsolutePath().length(); + + if (path.length() < prefixRoot) { + throw new VCSException("can't get the content file for file " + file + " since it is not under the root working copy (" + getLocalDatabasePath() + ")"); + } + String sep = File.separator; + path = path.substring(prefixRoot).replaceAll("\\".equals(sep) ? "\\\\" : sep, "/"); + + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try { + + repository.setLocation(repositoryURL, false); + + repository.getFile(path.substring(1), ((SVNRevision) revision).getNumber(), null, baos); + + return baos.toString(); + } catch (SVNException e) { + throw new VCSException(e); + } finally { + baos.close(); + } + } + + public byte[] getBinaryFileContent(File file, Object revision) throws VCSException, IOException { + if (file == null || file.isDirectory()) + throw new VCSRuntimeException("could not invoke getFileContent for a directory [" + file + "]"); + String path = file.getAbsolutePath(); + int prefixRoot = getLocalDatabasePath().getAbsolutePath().length(); + + if (path.length() < prefixRoot) + throw new VCSException("can't get the content file for file " + file + " since it is not under the root working copy (" + getLocalDatabasePath() + ")"); + String sep = File.separator; + path = path.substring(prefixRoot).replaceAll("\\".equals(sep) ? "\\\\" : sep, "/"); + + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try { + repository.setLocation(repositoryURL, false); + repository.getFile(path.substring(1), ((SVNRevision) revision).getNumber(), null, baos); + return baos.toByteArray(); + } catch (SVNException e) { + throw new VCSException(e); + } finally { + baos.close(); + } + } + + public SVNURL getRepositoryURL() { + return repositoryURL; + } + + public SVNStatus getSVNStatus(File file) throws VCSException { + return getSVNStatus(file, true); + } + + protected SVNStatus getSVNStatus(File file, boolean remote) throws VCSException { + try { + return ourClientManager.getStatusClient().doStatus(file, remote); + } catch (SVNException e) { + throw new VCSException(e); + } + } + + protected SVNStatusType getStatusType(File file) throws SVNException { + SVNStatus status = ourClientManager.getStatusClient().doStatus(file, false); + return status == null ? UNKNOWN : status.getContentsStatus(); + } + + private SVNWCClient getOurWcClient() { + if (ourWcClient == null) + ourWcClient = ourClientManager.getWCClient(); + return ourWcClient; + } + + private void assertFilesExist(List<File> files, String command) + throws VCSException { + if (files == null) + throw new VCSRuntimeException(getClass().getName() + "#" + command + "(List<File>,String) first argument can not be null"); + } + + private void assertFileExist(File file, String command) throws VCSException { + if (file == null) + throw new VCSRuntimeException(getClass().getName() + "#" + command + "(File,...) first argument can not be null"); + } + + public void makeRemoteDir(String commitMessage, String... dirNames) + throws VCSException { + try { + + SVNURL[] urls = new SVNURL[dirNames.length]; + for (int i = 0; i < dirNames.length; i++) { + SVNURL url = repositoryURL; + for (String path : dirNames[i].split("/")) + url = url.appendPath(path, false); + urls[i] = url; + } + + SVNCommitInfo commit = ourClientManager.getCommitClient().doMkDir( + urls, commitMessage); + long rev = commit.getNewRevision(); + for (String dirName : dirNames) { + log.info("'" + dirName + "' at revison " + rev); + } + } catch (SVNException e) { + throw new VCSException(e); + } + } + + public void deleteRemoteDir(String commitMessage, String... dirNames) + throws VCSException { + try { + + SVNURL[] urls = new SVNURL[dirNames.length]; + for (int i = 0; i < dirNames.length; i++) { + SVNURL url = repositoryURL; + for (String path : dirNames[i].split("/")) + url = url.appendPath(path, false); + urls[i] = url; + } + SVNCommitInfo commit = ourClientManager.getCommitClient().doDelete( + urls, commitMessage); + long rev = commit.getNewRevision(); + for (String dirName : dirNames) { + log.info("'" + dirName + "' at revison " + rev); + } + } catch (SVNException e) { + throw new VCSException(e); + } + } + +} Added: trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHelper.java =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHelper.java (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHelper.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,461 @@ +/* *##% +* 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.impl.svn; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.codelutin.vcs.VCSException; +import org.codelutin.vcs.VCSHelper; +import org.codelutin.vcs.VCSRuntimeException; +import org.codelutin.vcs.VCSTypeRepo; +import org.tmatesoft.svn.core.SVNCancelException; +import org.tmatesoft.svn.core.SVNException; +import org.tmatesoft.svn.core.SVNNodeKind; +import org.tmatesoft.svn.core.SVNProperty; +import org.tmatesoft.svn.core.SVNURL; +import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; +import org.tmatesoft.svn.core.internal.io.fs.FSRepositoryFactory; +import org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryFactoryImpl; +import org.tmatesoft.svn.core.io.SVNRepository; +import org.tmatesoft.svn.core.wc.ISVNEventHandler; +import org.tmatesoft.svn.core.wc.ISVNOptions; +import org.tmatesoft.svn.core.wc.SVNClientManager; +import org.tmatesoft.svn.core.wc.SVNEvent; +import org.tmatesoft.svn.core.wc.SVNEventAction; +import org.tmatesoft.svn.core.wc.SVNRevision; +import org.tmatesoft.svn.core.wc.SVNStatusType; +import org.tmatesoft.svn.core.wc.SVNWCUtil; + +import java.util.Arrays; + +/** + * A helper for SVN to test connection, find a svn url... + * + * @author chemit + */ + +public class SVNHelper { + public static boolean libraryInit = false; + + static protected final Log log = LogFactory.getLog(SVNHelper.class); + + /** + * Test if a anonymous svn connection can be openned. + * + * @param url the svn url to test + * @return <code>true</code> if connection is ok,<code>false</code> otherwise. + * @throws VCSException if could not compute the SVNURL + */ + public static boolean testAnonymousConnection(String url) throws VCSException { + boolean result = true; + + SVNRepository repository = getAnonymousConnection(url); + try { + repository.testConnection(); + } catch (SVNException e) { + result = false; + } finally { + if (repository != null) { + try { + repository.closeSession(); + } catch (Exception e) { + log.warn(e); + } + } + } + return result; + } + + /** + * Test if a anonymous svn connection can be openned. + * + * @param url the svn url to test + * @param username user name + * @param privateKeyFilePath the file to used as private key file + * @param passphrase passphrase to use + * @return <code>true</code> if connection is ok,<code>false</code> otherwise. + * @throws VCSException if could not compute the SVNURL + */ + public static boolean testSSHConnection(String url, String username, String privateKeyFilePath, char[] passphrase) throws VCSException { + boolean result = true; + + SVNRepository repository = getSSHConnection(url, username, privateKeyFilePath, passphrase); + try { + repository.testConnection(); + } catch (SVNException e) { + result = false; + } finally { + if (repository != null) { + try { + repository.closeSession(); + } catch (Exception e) { + log.warn(e); + } + } + } + return result; + } + + public static SVNRepository getAnonymousConnection(String url) throws VCSException { + + setupLibrary(); + + SVNURL testRepositoryURL; + try { + testRepositoryURL = SVNURL.parseURIEncoded(url); + } catch (SVNException e) { + throw new VCSException(e); + } + SVNRepository repository; + try { + ISVNOptions options = SVNWCUtil.createDefaultOptions(true); + SVNClientManager manager = SVNClientManager.newInstance(options, "anonymous", "anonymous"); + repository = manager.createRepository(testRepositoryURL, false); + repository.testConnection(); + return repository; + } catch (SVNException e) { + throw new VCSException(e); + } + } + + public static SVNRepository getSSHConnection(String url, String username, String privateKeyFilePath, char[] passphrase) throws VCSException { + + setupLibrary(); + + SVNURL testRepositoryURL; + try { + testRepositoryURL = SVNURL.parseURIEncoded(url); + } catch (SVNException e) { + throw new VCSException(e); + } + SVNRepository repository; + try { + ISVNOptions options = SVNWCUtil.createDefaultOptions(true); + System.setProperty("svnkit.ssh2.key", privateKeyFilePath); + System.setProperty("svnkit.ssh2.username", username); + if (passphrase != null && passphrase.length > 0) { + System.setProperty("svnkit.ssh2.passphrase", Arrays.toString(passphrase)); + } + //System.setProperty("svnkit.ssh2.passphrase", ""); + //System.setProperty("svnkit.ssh2.password", ""); + //System.setProperty("svnkit.ssh2.port", "22"); + + // instanciate svn client manager + SVNClientManager manager = SVNClientManager.newInstance(options); + repository = manager.createRepository(testRepositoryURL, false); + repository.testConnection(); + return repository; + } catch (SVNException e) { + throw new VCSException(e); + } + } + + /** + * @param typeRepo the type of repo we want to use if possible + * @param uncleanRemotePath remote path (could be unclean) + * @param databaseVersion the database version to use + * @param hostName the hostname to use + * @return the typeRepo to use + * @throws VCSException if could not compute SVNURL to tests + */ + public static VCSTypeRepo findTypeRepo(VCSTypeRepo typeRepo, + String uncleanRemotePath, + String databaseVersion, + String hostName) throws VCSException { + + + VCSTypeRepo result; + + String remotePath = VCSHelper.getRemotePath(typeRepo, uncleanRemotePath); + String remoteDatabase = VCSHelper.getRemoteDatabase(typeRepo, databaseVersion); + StringBuilder sb = new StringBuilder("svn://").append(hostName); + sb.append("/").append(remotePath); + String url = sb.toString(); + log.info("try svn url " + url + " (" + remoteDatabase + ")"); + + SVNRepository repository; + try { + repository = getAnonymousConnection(url); + } catch (VCSException e) { + log.warn(e); + return null; + } + + try { + SVNNodeKind kind = repository.checkPath(remoteDatabase, SVNRevision.HEAD.getNumber()); + log.info("kind node found for " + remoteDatabase + " : " + kind); + // typeRepo type is ok, use it + if (kind == SVNNodeKind.NONE) { + // could not found the remote database + if (typeRepo == VCSTypeRepo.HEAD) { + // this is a fatal error since head always exists + throw new VCSRuntimeException("could not found svn trunk " + url + " (" + repository.getLocation() + ")"); + } else { + result = VCSTypeRepo.HEAD; + } + } else { + // was found, so keep it + result = typeRepo; + } + } catch (SVNException e) { + throw new VCSRuntimeException(e); + } + log.info("required:" + typeRepo + " available:" + result); + return result; + }/* + * Initializes the library to work with a repository via different + * protocols. + */ + + public static void setupLibrary() { + if (libraryInit) { + return; + } + libraryInit = true; + /* + * For using over http:// and https:// + */ + DAVRepositoryFactory.setup(); + + /* + * For using over svn:// and svn+xxx:// + */ + SVNRepositoryFactoryImpl.setup(); + + /* + * For using over file:/// + */ + FSRepositoryFactory.setup(); + } + + /** + * A svn logger + * + * @author chemit + */ + public static class SVNEventLoggerHandler implements ISVNEventHandler { + + static private Log log = LogFactory.getLog(SVNEventLoggerHandler.class); + + /* + * progress is currently reserved for future purposes and now is always + * ISVNEventHandler.UNKNOWN + */ + + public boolean handleEventWC(SVNEvent event, double progress) { + /* + * Gets the current action. An action is represented by + * SVNEventAction. + */ + SVNEventAction action = event.getAction(); + String trace = null; + if (action == SVNEventAction.ADD) { + /* + * The item is scheduled for addition. + */ + trace = "A "; + } else if (action == SVNEventAction.COPY) { + /* + * The item is scheduled for addition with history (copied, in + * other words). + */ + trace = "A + "; + } else if (action == SVNEventAction.REVERT) { + /* + * The item is scheduled for revertion. + */ + trace = "R "; + } else if (action == SVNEventAction.DELETE) { + /* + * The item is scheduled for deletion. + */ + trace = "D "; + } else if (action == SVNEventAction.LOCKED) { + /* + * The item is locked. + */ + trace = "L "; + } else if (action == SVNEventAction.LOCK_FAILED) { + /* + * Locking operation failed. + */ + trace = "failed to lock "; + } + + if (trace != null) { + logInfo(trace, event); + return true; + } + + return false; + + } + + public boolean handleEventCommit(SVNEvent event, double progress) { + /* + * Gets the current action. An action is represented by + * SVNEventAction. In case of a commit an action can be determined + * via comparing SVNEvent.getAction() with + * SVNEventAction.COMMIT_-like constants. + */ + SVNEventAction action = event.getAction(); + String trace = null; + if (action == SVNEventAction.COMMIT_COMPLETED) { + trace = "Complete "; + } else if (action == SVNEventAction.COMMIT_MODIFIED) { + trace = "Sending "; + } else if (action == SVNEventAction.COMMIT_DELETED) { + trace = "Deleting "; + } else if (action == SVNEventAction.COMMIT_REPLACED) { + trace = "Replacing "; + } else if (action == SVNEventAction.COMMIT_DELTA_SENT) { + trace = "Transmitting file data...."; + } else if (action == SVNEventAction.COMMIT_ADDED) { + /* + * Gets the MIME-type of the item. + */ + String mimeType = event.getMimeType(); + if (SVNProperty.isBinaryMimeType(mimeType)) { + /* + * If the item is a binary file + */ + trace = "Adding (bin) "; + } else { + trace = "Adding "; + } + } + + if (trace != null) { + logInfo(trace, event); + return true; + } + + return false; + } + + public boolean handleEventUpdate(SVNEvent event, double progress) { + /* + * Gets the current action. An action is represented by + * SVNEventAction. In case of an update an action can be determined + * via comparing SVNEvent.getAction() and + * SVNEventAction.UPDATE_-like constants. + */ + SVNEventAction action = event.getAction(); + String pathChangeType = null; + String trace = null; + if (action == SVNEventAction.UPDATE_ADD) { + /* + * the item was added + */ + pathChangeType = "A"; + } else if (action == SVNEventAction.UPDATE_DELETE) { + /* + * the item was deleted + */ + pathChangeType = "D"; + } else if (action == SVNEventAction.UPDATE_UPDATE) { + + /* + * Find out in details what state the item is (after having been + * updated). + * + * Gets the status of file/directory item contents. It is + * SVNStatusType who contains information on the state of an + * item. + */ + SVNStatusType contentsStatus = event.getContentsStatus(); + if (contentsStatus == org.tmatesoft.svn.core.wc.SVNStatusType.CHANGED) { + /* + * the item was modified in the repository (got the changes + * from the repository + */ + pathChangeType = "U"; + } else if (contentsStatus == org.tmatesoft.svn.core.wc.SVNStatusType.CONFLICTED) { + /* + * The file item is in a state of Conflict. That is, changes + * received from the repository during an update, overlap + * with local changes the user has in his working copy. + */ + pathChangeType = "C"; + } else if (contentsStatus == org.tmatesoft.svn.core.wc.SVNStatusType.MERGED) { + /* + * The file item was merGed (those changes that came from + * the repository did not overlap local changes and were + * merged into the file). + */ + pathChangeType = "G"; + } + + } else if (action == SVNEventAction.UPDATE_EXTERNAL) { + /* for externals definitions */ + trace = "Fetching external item into '" + + event.getFile().getAbsolutePath() + "'"; + trace += "\nExternal at revision " + event.getRevision(); + + } else if (action == SVNEventAction.UPDATE_COMPLETED) { + /* + * Updating the working copy is completed. Prints out the + * revision. + */ + trace = "At revision " + event.getRevision(); + } + + if (trace != null) { + logInfo(trace, event); + return true; + } + + if (pathChangeType != null) { + logInfo(trace, event); + return true; + + } + return false; + } + + protected void logInfo(String trace, SVNEvent event) { + final String anObject = event.getAction() + ""; + if (!"update_none".equals(anObject) + && !"status_completed".equals(anObject)) + log.debug("-- svn log on file [" + event.getPath() + + "] action [" + event.getAction() + "] : " + trace); + } + + public void handleEvent(SVNEvent event, double progress) + throws SVNException { + /* + * Gets the current action. An action is represented by + * SVNEventAction. + */ + if (handleEventWC(event, progress)) + return; + if (handleEventCommit(event, progress)) + return; + if (handleEventUpdate(event, progress)) + return; + + logInfo("unkown event ", event); + } + + public void checkCancelled() throws SVNCancelException { + + } + } +} Added: trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1 @@ +org.codelutin.util.LutinLogFactory \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/META-INF/services/org.codelutin.vcs.VCSHandlerProvider =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/META-INF/services/org.codelutin.vcs.VCSHandlerProvider (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/META-INF/services/org.codelutin.vcs.VCSHandlerProvider 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1 @@ +org.codelutin.vcs.SVNHandlerProvider \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/i18n/lutinvcs-provider-svn-en_GB.properties =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/i18n/lutinvcs-provider-svn-en_GB.properties (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/i18n/lutinvcs-provider-svn-en_GB.properties 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,3 @@ +lutinvcs.error.not.find.status=lutinvcs.error.not.find.status +lutinvcs.error.vcs.no.ssh.connection=lutinvcs.error.vcs.no.ssh.connection +lutinvcs.message.copy.revision=lutinvcs.message.copy.revision Added: trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/i18n/lutinvcs-provider-svn-fr_FR.properties =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/i18n/lutinvcs-provider-svn-fr_FR.properties (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/src/main/resources/i18n/lutinvcs-provider-svn-fr_FR.properties 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,3 @@ +lutinvcs.error.not.find.status= +lutinvcs.error.vcs.no.ssh.connection= +lutinvcs.message.copy.revision= Added: trunk/lutinvcs/lutinvcs-provider-svn/src/site/fr/rst/devel/index.rst =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/src/site/fr/rst/devel/index.rst (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/src/site/fr/rst/devel/index.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,5 @@ +========================== +Lutin vcs provider svn dev +========================== + +TODO Added: trunk/lutinvcs/lutinvcs-provider-svn/src/site/fr/rst/index.rst =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/src/site/fr/rst/index.rst (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/src/site/fr/rst/index.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,5 @@ +====================== +Lutin vcs provider svn +====================== + +TODO \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-provider-svn/src/site/fr/rst/todo.rst =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/src/site/fr/rst/todo.rst (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/src/site/fr/rst/todo.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,4 @@ +============================== +Lutinvcs - provider svn - TODO +============================== + Added: trunk/lutinvcs/lutinvcs-provider-svn/src/site/site_fr.xml =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/src/site/site_fr.xml (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/src/site/site_fr.xml 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<project name="simexplorer-si"> + + <skin> + <groupId>lutinlib</groupId> + <artifactId>lutin-site-skin</artifactId> + <version>0.1</version> + </skin> + + <bannerLeft> + <name>Système d'information - SimExplorer</name> + </bannerLeft> + + <bannerRight> + <src> + http://www.codelutin.com/images/lutinorange-codelutin.png + </src> + <href>http://www.codelutin.com</href> + </bannerRight> + + <poweredBy> + <logo href="http://docutils.sourceforge.net/rst.html" + img="/images/restructuredtext-logo.png" name="reStructuredText"/> + </poweredBy> + + <body> + <menu name="Common Links" inherit="top"/> + <menu ref="parent"/> + <menu ref="reports"/> + + <menu name="Liens"> + <item href="http://java.sun.com/j2se" + name="Le site Java de Sun"> + </item> + </menu> + + </body> +</project> Added: trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/FindTypeRepoTest.java =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/FindTypeRepoTest.java (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/FindTypeRepoTest.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,64 @@ +package org.codelutin.vcs.impl.svn; + +import junit.framework.TestCase; +import org.codelutin.vcs.VCSException; +import org.codelutin.vcs.VCSTypeRepo; + +/** + * User: tony + * Date: 5 d�c. 2007 + * Time: 22:28:50 + */ + +public class FindTypeRepoTest extends TestCase { + + static String hostname = "labs.libre-entreprise.org"; + + VCSTypeRepo result; + VCSTypeRepo vcsTypeRepo; + String path; + String version; + + public void testBrancheOk() throws VCSException { + vcsTypeRepo = VCSTypeRepo.BRANCH; + path = "svnroot/isis-fish-data"; + version = "3.1.0"; + result = SVNHelper.findTypeRepo(vcsTypeRepo, path, version, hostname); + assertEquals(VCSTypeRepo.BRANCH, result); + } + + public void testBrancheBad() throws VCSException { + vcsTypeRepo = VCSTypeRepo.BRANCH; + version = "3.0.0"; + path = "svnroot/isis-fish-data"; + result = SVNHelper.findTypeRepo(vcsTypeRepo, path, version, hostname); + assertEquals(VCSTypeRepo.HEAD, result); + try { + path = "svnroot/sis-fish-data"; + result = SVNHelper.findTypeRepo(vcsTypeRepo, path, version, hostname); + fail(); + } catch (Exception e) { + assertTrue(true); + } + } + + public void testHeadOk() throws VCSException { + vcsTypeRepo = VCSTypeRepo.HEAD; + path = "svnroot/isis-fish-data"; + version = "3.0.0"; + result = SVNHelper.findTypeRepo(vcsTypeRepo, path, version, hostname); + assertEquals(VCSTypeRepo.HEAD, result); + } + + public void testHeadBad() { + vcsTypeRepo = VCSTypeRepo.HEAD; + path = "svnroot/sis-fish-data"; + version = "3.0.0"; + try { + result = SVNHelper.findTypeRepo(vcsTypeRepo, path, version, hostname); + fail(); + } catch (Exception e) { + assertTrue(true); + } + } +} Added: trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/SVNHandlerTest.java =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/SVNHandlerTest.java (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/SVNHandlerTest.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,22 @@ +package org.codelutin.vcs.impl.svn; + +import org.codelutin.vcs.VCSHandlerTest; +import org.codelutin.vcs.VCSType; + +/** + * Test SVNHandler + * <p/> + * <br/> + * This test use junit_SVN.properties to load vcs configuration + * Please check everything is ok inside it before lanching test. + */ +public class SVNHandlerTest extends VCSHandlerTest { + + protected void setUpVars() { + vcsType = VCSType.SVN; + super.setUpVars(); + } + + // if you don't want to execute some incompatible test just override them + +} \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/SVNLogTest.java =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/SVNLogTest.java (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/SVNLogTest.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,338 @@ +package org.codelutin.vcs.impl.svn; + +import junit.framework.Assert; +import org.codelutin.vcs.MethodTest; +import org.codelutin.vcs.VCSException; +import org.codelutin.vcs.VCSLocalData; +import org.codelutin.vcs.VCSLocalDataContext; +import org.codelutin.vcs.VCSRuntimeException; +import org.codelutin.vcs.VCSTest; +import static org.codelutin.vcs.VCSType.SVN; +import org.tmatesoft.svn.core.SVNLogEntry; +import org.tmatesoft.svn.core.wc.SVNRevision; + +import java.io.File; +import java.util.List; + +public class SVNLogTest extends VCSTest { + static protected int start, last; + + static protected int[] interval; + + static protected SVNHandler svnhandler; + + static protected VCSLocalDataContext context; + + protected void setUpVars() { + VCSTest.vcsType = SVN; + VCSTest.resetConfiguration = true; + } + + @Override + protected void initConfig() throws Exception { + super.initConfig(); + + context = new VCSLocalDataContext(getLocalDatabaseFile()); + + // this is specific SVN test + Assert.assertTrue(VCSTest.handler instanceof SVNHandler); + svnhandler = (SVNHandler) VCSTest.handler; + + // init VCS (create remote repo + create working copy) + initVCS(); + + // add 4 files to repository + setCommand(0, 4, "add with commit"); + list = context.create(VCSLocalData.FILE, interval); + + VCSTest.handler.add(list, VCSLocalData.FILE.getCommitMessage("add", this)); + + } + + protected void tearDownVars() throws Exception { + VCSTest.resetConfiguration = null; + VCSTest.vcsType = null; + cleanAfterAll(); + } + + // ///////////////////////////////////////////////////////////////////////// + // / Demarrage du scenario + // ///////////////////////////////////////////////////////////////////////// + + List<File> list; + + @MethodTest + public void testLog() throws Exception { + + // at this point of the scenario, we only have a [0-3] + // (files/directories) left on local and remote + setCommand(0, 3, "log"); + list = context.getFile(VCSLocalData.FILE, interval); + + File f = list.get(0); + + List<SVNLogEntry> logEntries = svnhandler.getLog(SVNRevision.WORKING, + SVNRevision.HEAD, f); + + // we just have one revision on this file + Assert.assertEquals(0, logEntries.size()); + + for (SVNLogEntry logEntry : logEntries) { + System.out.println("logEntry " + logEntry.getAuthor() + " : Rev " + + logEntry.getRevision() + ", Msg '" + + logEntry.getMessage() + "' "); + } + SVNRevision revision1 = svnhandler.getRevision(f); + + System.out.println("==== Revision for file " + f + "(before all) : " + + revision1); + // modify file + modifyFile(f, 20); + + // commit it + VCSTest.handler.commit(this.getOneFileAsList(f), VCSLocalData.FILE.getCommitMessage( + "modif One", this)); + System.out.println("==== Revision for file " + f + "(after commit) : " + + svnhandler.getRevision(f)); + + logEntries = svnhandler + .getLog(SVNRevision.WORKING, SVNRevision.HEAD, f); + + // we just have always no revision for this file since working + // copy is last one + Assert.assertEquals(0, logEntries.size()); + + // go back to first revision + svnhandler.update(f, revision1); + + System.out.println("==== Revision for file " + f + "(" + + svnhandler.getRevision(f) + ") after going back to revision " + + revision1); + + logEntries = svnhandler + .getLog(SVNRevision.WORKING, SVNRevision.HEAD, f); + + // we just have one revision for this file (the last commit) + Assert.assertEquals(1, logEntries.size()); + for (SVNLogEntry logEntry : logEntries) { + System.out.println("logEntry " + logEntry.getAuthor() + " : Rev " + + logEntry.getRevision() + ", Msg '" + + logEntry.getMessage() + "' "); + } + + // a non existing file have no logs of course.... + File file = new File(getLocalDatabaseFile(), "nonExistingFile"); + + logEntries = svnhandler.getLog(SVNRevision.WORKING, SVNRevision.HEAD, + file); + Assert.assertEquals(0, logEntries.size()); + + try { + // now file exists, but still can not have some log entries since + // it is not versionned + file.createNewFile(); + logEntries = svnhandler.getLog(SVNRevision.WORKING, + SVNRevision.HEAD, file); + Assert.assertEquals(0, logEntries.size()); + } finally { + file.delete(); + } + } + + @MethodTest + public void testGetChangeLog() throws Exception { + + // at this point of the scenario, we only have a [0-3] + // (files/directories) left on local and remote + setCommand(0, 3, "changeLog"); + list = context.getFile(VCSLocalData.FILE, interval); + + File f = list.get(0); + SVNRevision revision1 = svnhandler.getRevision(f); + + System.out.println("==== Revision for file " + f + "(" + revision1 + + ") at init "); + + // this file hase two revision and on local we are on first revision + Assert.assertFalse(VCSTest.handler.isUpToDate(f)); + + List<SVNLogEntry> entries = svnhandler.getLog(SVNRevision.WORKING, + SVNRevision.HEAD, f); + + Assert.assertEquals(1, entries.size()); + + for (SVNLogEntry logEntry : entries) { + System.out.println("changeLogEntry " + logEntry.getAuthor() + + " : Rev " + logEntry.getRevision() + ", Msg '" + + logEntry.getMessage() + "' "); + } + + String changeLog; + changeLog = svnhandler.getChangeLog(f); + System.out.println("change log for file " + f + "\n" + changeLog); + + // update to head revision + svnhandler.update(f, SVNRevision.HEAD); + + Assert.assertTrue(VCSTest.handler.isUpToDate(f)); + + SVNRevision newRevision = svnhandler.getRevision(f); + + Assert.assertTrue(revision1.getNumber() < newRevision.getNumber()); + + entries = svnhandler.getLog(SVNRevision.WORKING, SVNRevision.HEAD, f); + + // should have no log entries since we have on local the last version + Assert.assertEquals(0, entries.size()); + + // since there no revision between working revision and remote revision + Assert.assertNull(svnhandler.getChangeLog(f)); + + // add a another revision + modifyFile(f, 40); + + VCSTest.handler.commit(getOneFileAsList(f), VCSLocalData.FILE.getCommitMessage("add a " + + "second revision", this)); + + // go back to first revision + svnhandler.update(f, revision1); + + entries = svnhandler.getLog(SVNRevision.WORKING, SVNRevision.HEAD, f); + + Assert.assertEquals(2, entries.size()); + + changeLog = svnhandler.getChangeLog(f); + System.out.println("change log for file (2 entries) : " + f + "\n" + + changeLog); + Assert.assertTrue(changeLog.contains("add a second revision")); + + // go back to first revision + svnhandler.update(f, revision1); + + // a non existing file have no logs of course.... + File file = new File(getLocalDatabaseFile(), "nonExistingFile"); + + changeLog = svnhandler.getChangeLog(file); + Assert.assertNull(changeLog); + + try { + // now file exists, but still can not have some log entries since + // it is not versionned + file.createNewFile(); + changeLog = svnhandler.getChangeLog(file); + Assert.assertNull(changeLog); + } finally { + file.delete(); + } + } + + @MethodTest + public void testGetDiff() throws Exception { + + // at this point of the scenario, we only have a [0-3] + // (files/directories) + // left on local and remote + setCommand(0, 3, "getDiff"); + list = context.getFile(VCSLocalData.FILE, interval); + + File f = list.get(0); + + // cas limites + try { + VCSTest.handler.getDiff(null); + Assert.fail(); + } catch (VCSRuntimeException e) { + Assert.assertTrue(true); + } + + // a non existing file have no logs of course.... + File file = new File(getLocalDatabaseFile(), "nonExistingFile"); + + try { + VCSTest.handler.getDiff(file); + Assert.fail(); + } catch (VCSException e) { + Assert.assertTrue(true); + } + + try { + // now file exists, but still can not have some log entries + // since it is not versionned + file.createNewFile(); + VCSTest.handler.getDiff(file); + Assert.fail(); + } catch (VCSException e) { + Assert.assertTrue(true); + } finally { + file.delete(); + } + + SVNRevision revision1 = svnhandler.getRevision(f); + + System.out.println("==== Revision for file " + f + "(" + revision1 + + ") at init "); + + String diff = VCSTest.handler.getDiff(f); + + System.out.println(" get diff for file " + f + " result : \n" + diff); + + VCSTest.handler.update(f); + + Object revision2 = VCSTest.handler.getRevision(f); + + // modify file + modifyFile(f, 43, 'b'); + + VCSTest.handler.commit(getOneFileAsList(f), VCSLocalData.FILE.getCommitMessage("second " + + "commit with more as", this)); + + // go back to first revision + VCSTest.handler.update(f, revision1); + + String diff2 = VCSTest.handler.getDiff(f); + + Assert.assertNotSame(diff, diff2); + + // we should have another diff + System.out.println(" get diff for file " + f + " result : \n" + diff2); + + VCSTest.handler.update(f, revision2); + + String diff3 = VCSTest.handler.getDiff(f); + + Assert.assertNotSame(diff3, diff2); + Assert.assertNotSame(diff, diff3); + + // we should have another diff + System.out.println(" get diff for file " + f + " result : \n" + diff3); + } + + // ///////////////////////////////////////////////////////////////////////// + // / methodes utiles + // ///////////////////////////////////////////////////////////////////////// + + public void cleanAfterAll() throws Exception { + + // delete remote directory + VCSTest.handler.deleteRemoteDir(VCSLocalData.DIRECTORY.getCommitMessage("deldir remote", + this), ""); + + // delete local working copy + VCSTest.handler.deleteWorkingCopy(); + + // assert local directory does not exists any longer + Assert.assertFalse(getLocalDatabaseFile().exists()); + + } + + protected void setCommand(int start, int last, String command) { + if (!(start == SVNLogTest.start && last == SVNLogTest.last)) { + SVNLogTest.start = start; + SVNLogTest.last = last; + SVNLogTest.interval = context.getIndex(start, last); + } + + VCSTest.log.info("[" + command + "] on interval [" + SVNLogTest.start + "," + + SVNLogTest.last + "]"); + } +} Added: trunk/lutinvcs/lutinvcs-provider-svn/src/test/resources/log4j.properties =================================================================== --- trunk/lutinvcs/lutinvcs-provider-svn/src/test/resources/log4j.properties (rev 0) +++ trunk/lutinvcs/lutinvcs-provider-svn/src/test/resources/log4j.properties 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,11 @@ +# 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.i18n=INFO +log4j.logger.org.codelutin.util=INFO +log4j.logger.org.codelutin.option=INFO Added: trunk/lutinvcs/lutinvcs-ui/.cvsignore =================================================================== --- trunk/lutinvcs/lutinvcs-ui/.cvsignore (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/.cvsignore 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,7 @@ +target +velocity.log +maven.log +.eclipse +.classpath +lutinutil.iml +lutinutil.ipr Added: trunk/lutinvcs/lutinvcs-ui/LICENSE.txt =================================================================== --- trunk/lutinvcs/lutinvcs-ui/LICENSE.txt (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/LICENSE.txt 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,280 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS Added: trunk/lutinvcs/lutinvcs-ui/changelog =================================================================== --- trunk/lutinvcs/lutinvcs-ui/changelog (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/changelog 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,57 @@ +ver-0-26 poussin 2007???? + * bug in concat(Object [] ...), better array type now work + * add unaccent in StringUtil + +ver-0-25 poussin 20070425 + * add StringUtil.toArrayXXX(String ... s) methodes + * use generic + +ver-0-24 poussin + * ArgumentsParser have 1 as repetitionMax by default + * ArgumentsParser use jdk 1.5 syntaxe (..., <>) + +ver-0-23 poussin 20061004 + * move i18n in lutinutil + * add method Resource.getConfigProperties(String, Properties) to chains + properties + +ver-0-22 poussin 20060913 + * use Generics in CategorisedListenerSet + * add org.codelutin.log package (LutinLog, ...) + * remove org.codelutin.util.Log + +ver-0-21 poussin 20060907 + + * Add TransformedList + * Add FileUtil.getTempFile(String):File + * add FileUtil.getFile():File that prompt user + * add FileUtil.getDirectory(): String that prompt user + * add FileUtil.copyRecursively(File, File, String ... patternFilter) + * add ZipUtil class to compress/uncompress zip file + * Transparente*Reference accept null object + +ver-0-17 thimel 20050610 + + * Ajout de BoundedList et BoundedListOutOfBoundsException + +ver-0-16 poussin 20050526 + + * Ajout de la methode getConfigProperties dans Resource + +ver-0-9 poussin 20040728 + + * Ajout de methode isJar, isZip, dans Resource + +ver-0-3 poussin 20040405 + + * utilisation de maven pour la gestion du projet + * Ajout de ExceptionUtil + +ver-0-2 poussin 20031021 + + * ajout du parser d'argument, ArgumentsParser + * ajout de StringUtil + +ver-0-1 + + * premier version contient seulement Resource Added: trunk/lutinvcs/lutinvcs-ui/pom.xml =================================================================== --- trunk/lutinvcs/lutinvcs-ui/pom.xml (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/pom.xml 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,89 @@ +<?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-jaxx-plugin</artifactId> + <version>0.2-SNAPSHOT</version> + <configuration> + <src>${maven.src.dir}/main/uimodel</src> + <out>${maven.src.dir}/main/java</out> + </configuration> + <executions> + <execution> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> + <dependencies> + <!--dependency> + <groupId>lutinlib</groupId> + <artifactId>lutinwidget</artifactId> + <version>0.10-SNAPSHOT</version> + </dependency--> + <dependency> + <groupId>lutinlib.vcs</groupId> + <!-- should be api depency, not core... --> + <artifactId>lutinvcs-core</artifactId> + <scope>compile</scope> + <version>0.1-SNAPSHOT</version> + </dependency> + </dependencies> + </plugin> + <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> + <!--Jaxx--> + <dependency> + <groupId>lutinlib</groupId> + <artifactId>jaxx</artifactId> + <version>1.0.4-SNAPSHOT</version> + <scope>compile</scope> + </dependency> + </dependencies> + +</project> Added: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/VCSRepositoryState.java =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/VCSRepositoryState.java (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/VCSRepositoryState.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,200 @@ +/* ##% +* 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.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.codelutin.vcs.ui.FileStateTableModel; + +import java.io.File; +import java.util.ArrayList; +import java.util.EnumSet; +import java.util.List; + +/** + * Permet de rechercher et conserve les differences entre le repository local et + * distant. + * + * @author poussin + * @author chemit + */ +public class VCSRepositoryState { + + /** to use log facility, just put in your code: log.info(\"...\"); */ + static protected final Log log = LogFactory.getLog(VCSRepositoryState.class); + + /** liste des �tats des fichiers scann�s */ + protected List<VCSFileState> states = new ArrayList<VCSFileState>(); + + /** tableau des model de table (un par �tat VCSState) */ + protected FileStateTableModel[] models; + + /** le r�pertoire racine du working copy local */ + protected File root; + + /** vcs states to be authorized in this model */ + protected VCSState[] acceptedStates; + + /** vcs actions to be authorized in this model */ + protected EnumSet<VCSAction> acceptedActions; + + /** vcs handler to use (lazy instanciation) */ + protected VCSHandler handler; + + public static final VCSState[] UPDATE_STATES = { + org.codelutin.vcs.VCSState.OUT_OF_DATE, + org.codelutin.vcs.VCSState.MODIFIED, + org.codelutin.vcs.VCSState.OUT_OF_DATE_AND_MODIFIED, + org.codelutin.vcs.VCSState.UNVERSIONNED, + org.codelutin.vcs.VCSState.MISSING + }; + + /** + * @param handler handlet to use + * @param root directory of root local working copy + * @param actions accepted actions + * @param modules la liste des modules a traiter + * @throws VCSException if any problem while building + */ + protected VCSRepositoryState(VCSHandler handler, File root, EnumSet<VCSAction> actions, File... modules) throws VCSException { + this.acceptedActions = actions; + this.root = root; + this.acceptedStates = UPDATE_STATES; + this.handler = handler; + // scan all modules + for (File mod : modules) { + states.addAll(doScan(mod, acceptedStates)); + } + } + + public VCSHandler getHandler() { + return handler; + } + + /** + * @param handler vcs handler to use for synch operation + * @throws VCSException if any problem while synchro + */ + public void doSynch(VCSHandler handler) throws VCSException { + long timestamp = System.nanoTime(); + for (VCSFileState fileState : states) { + fileState.doSynch(handler, timestamp); + } + } + + public File getRoot() { + return root; + } + + public List<VCSFileState> getStates() { + return states; + } + + public VCSState[] getAcceptedStates() { + return acceptedStates; + } + + public FileStateTableModel getModel(VCSState state) { + return getModels()[state.ordinal()]; + } + + + protected FileStateTableModel[] getModels() { + if (models == null) { + models = new FileStateTableModel[VCSState.values().length]; + } + return models; + } + + public void createUIModels() { + for (VCSState state : acceptedStates) { + getModels()[state.ordinal()] = new FileStateTableModel(VCSFileStateManager.filter(states, state), acceptedActions); + } + } + + public List<VCSFileState> selected(VCSState... wanted) { + if (wanted.length == 0) { + wanted = acceptedStates; + } + List<VCSFileState> result = new ArrayList<VCSFileState>(); + for (VCSState state : wanted) { + FileStateTableModel tableModel = getModel(state); + if (tableModel != null) { + result.addAll(tableModel.getSelected()); + } + } + return result; + } + + public void checkAll(boolean toUse, VCSState... wanted) { + if (wanted.length == 0) wanted = acceptedStates; + for (VCSState state : wanted) { + FileStateTableModel tableModel = getModel(state); + if (tableModel != null) { + tableModel.checkAll(0, toUse); + } + } + } + + public boolean isModelEmpty() { + for (VCSState state : acceptedStates) { + FileStateTableModel tableModel = getModel(state); + if (tableModel != null && tableModel.getRowCount() > 0) { + return false; + } + } + return true; + } + + public int getModelSelectedSize() { + int result = 0; + for (VCSState state : acceptedStates) { + result += getModelSelectedSize(state); + } + return result; + } + + public boolean isModelEmpty(VCSState state) { + FileStateTableModel tableModel = getModel(state); + return !(tableModel != null && tableModel.getRowCount() > 0); + } + + public int getModelSize(VCSState state) { + FileStateTableModel tableModel = getModel(state); + return tableModel == null ? 0 : tableModel.getRowCount(); + } + + public int getModelSelectedSize(VCSState state) { + FileStateTableModel tableModel = getModel(state); + return tableModel == null ? 0 : tableModel.getSelectedSize(); + } + + private List<VCSFileState> doScan(File module, VCSState... acceptedStates) + throws VCSException { + // obtain list of all VCSFileState found in module directory + List<VCSFileState> states; + states = VCSFileStateManager.doScan(getHandler(), module, true, acceptedStates); + return states; + } + + public EnumSet<VCSAction> getAcceptedActions() { + return acceptedActions; + } +} Added: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/AbstractTableModel.java =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/AbstractTableModel.java (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/AbstractTableModel.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,190 @@ +/* +* ##% 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.ui; + +import static org.codelutin.i18n.I18n._; + +import static java.lang.Boolean.TRUE; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** TODO-TC */ +@org.codelutin.i18n.I18nable +public abstract class AbstractTableModel<D> extends javax.swing.table.AbstractTableModel { + + + protected final FieldAccess<D>[] modelAccess; + protected List<D> data; + + protected final int nbOptions; + protected Map<D, Boolean>[] options; + protected final String[] optionNames; + protected final Class[] optionClass; + protected boolean[] optionChecks; + + private static final long serialVersionUID = 4697917831388337369L; + + @SuppressWarnings({"unchecked"}) + protected AbstractTableModel( + List<D> data, FieldAccess<D>[] modelAccess, + Class[] optionsClass, String[] optionsNames) throws RuntimeException { + if (optionsClass.length != optionsNames.length) + throw new RuntimeException(_("lutinvcs.error.fieldmodel.unmatchin.options")); + + this.data = data; + this.optionClass = optionsClass; + this.optionNames = optionsNames; + this.modelAccess = modelAccess; + this.nbOptions = optionsClass.length; + this.options = new Map[this.nbOptions]; + this.optionChecks = new boolean[this.nbOptions]; + } + + protected AbstractTableModel(List<D> data, FieldAccess<D>[] modelAccess, + Class optionsClass, String optionsNames) { + this(data, modelAccess, new Class[]{optionsClass}, + new String[]{optionsNames}); + } + + protected AbstractTableModel(List<D> data, FieldAccess<D>[] modelAccess) { + this(data, modelAccess, new Class[0], new String[0]); + } + + protected Map<D, Boolean> getOptionMap(int rowindex) { + if (rowindex >= nbOptions) return null; + Map<D, Boolean> map = options[rowindex]; + if (map == null) + map = options[rowindex] = new LinkedHashMap<D, Boolean>(); + return map; + } + + /** + * @param index option index + * @return Returns the selected for an option. + */ + public List<D> getSelected(int index) { + List<D> result = new ArrayList<D>(); + Map<D, Boolean> option = nbOptions == 0 ? null : options[index]; + if (index >= nbOptions || option == null) return result; + for (Map.Entry<D, Boolean> item : option.entrySet()) + if (java.lang.Boolean.TRUE.equals(item.getValue())) + result.add(item.getKey()); + return result; + } + + public int getSelectedSize(int index) { + int result = 0; + Map<D, Boolean> option = nbOptions == 0 ? null : options[index]; + if (index >= nbOptions || option == null) return result; + for (Map.Entry<D, Boolean> item : option.entrySet()) + if (java.lang.Boolean.TRUE.equals(item.getValue())) + result++; + return result; + } + + public List<D> getData() { + return data; + } + + public int getColumnCount() { + return modelAccess.length + nbOptions; + } + + public int getRowCount() { + return data.size(); + } + + public void checkAll() { + if (nbOptions != 1) return; + for (int i = 0; i < nbOptions; i++) checkAll(i); + } + + @Override + public Class<?> getColumnClass(int columnIndex) { + Class result; + if (columnIndex < nbOptions) { + + result = this.optionClass[columnIndex]; + } else { + result = FieldAccessManager.getFieldClass(modelAccess[columnIndex - nbOptions]); + } + return result; + } + + @Override + public String getColumnName(int columnIndex) { + String result; + if (columnIndex < nbOptions) + result = this.optionNames[columnIndex]; + else + result = FieldAccessManager.getFieldName(modelAccess[columnIndex - nbOptions]); + return result; + } + + @Override + public boolean isCellEditable(int rowIndex, int columnIndex) { + return columnIndex < nbOptions; + } + + @Override + public void setValueAt(Object aValue, int rowIndex, int columnIndex) { + D item = data.get(rowIndex); + if (columnIndex < nbOptions) + setOptionValueAt(item, aValue, columnIndex); + // read only data + } + + public Object getValueAt(int rowIndex, int columnIndex) { + D item = data.get(rowIndex); + if (columnIndex < nbOptions) + return getOptionValueAt(item, columnIndex); + return modelAccess[columnIndex - nbOptions].getValue(item); + } + + protected void setOptionValueAt(D item, Object aValue, int index) { + getOptionMap(index).put(item, TRUE.equals(aValue)); + } + + protected void checkAll(int index, boolean value) { + if (index >= nbOptions || nbOptions > 1) return; + for (int i = 0; i < getRowCount(); i++) + setValueAt(value, i, index); + } + + protected void checkAll(int index) { + if (index >= nbOptions || nbOptions > 1) return; + checkAll(index, optionChecks[index] = !optionChecks[index]); + } + + protected Boolean getOptionValueAt(D item, int index) { + return getOptionMap(index).get(item); + } + + protected FieldAccess[] getFiedAccess() { + return modelAccess; + } + + public void reset(List<D> states) { + data.clear(); + data.addAll(states); + } +} \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/FieldAccess.java =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/FieldAccess.java (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/FieldAccess.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,31 @@ +/* +* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin, +* Benjamin Poussin, Tony Chemit +* +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* ##% */ +package org.codelutin.vcs.ui; + +/** + * A simple contract for a field access in vcs ui, says a cell + * + * @author chemit + */ +public interface FieldAccess<D> { + + Object getValue(D item); + +} Added: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/FieldAccessManager.java =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/FieldAccessManager.java (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/FieldAccessManager.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,154 @@ +/* +* ##% 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.ui; + +import org.apache.commons.logging.Log; +import static org.apache.commons.logging.LogFactory.getLog; +import static org.codelutin.i18n.I18n._; + +/** + * Class pour gérer un cache de {@link FieldAccessEntry} indexés à partir de + * {@link FieldAccess}. + * + * @author chemit + */ +@org.codelutin.i18n.I18nable +public class FieldAccessManager { + + /** to use log facility, just put in your code: log.info(\"...\"); */ + static private Log log = getLog(FieldAccessManager.class); + + /** cache of registred FiledModelEntry associated to a FieldAccess */ + static protected java.util.Map<FieldAccess, FieldAccessEntry> cache; + + /** + * Register a FieldAccess in the cache + * + * @param constant the constant to be used + * @param libelle name of the field (libelle to display in row header) + * @param clazz class of the object used for this field + */ + public static <D> void registerFieldAccess(FieldAccess<D> constant, String libelle, Class clazz) { + checkAlreadyRegistredEntry(constant); + FieldAccessEntry<D> entry = new FieldAccessEntry<D>(constant, libelle, clazz); + log.debug(entry); + getCache().put(constant, entry); + } + + /** + * Obtain the class of a field via his constant type safe value + * + * @param constant the constant to be used + * @return the class defined for the field + */ + public static <D> Class getFieldClass(FieldAccess<D> constant) { + FieldAccessEntry entry = getEntry(constant, true); + return entry == null ? null : entry.getClazz(); + } + + /** + * Obtain the libelle of a field via his constant type safe value + * + * @param constant the constant to be used + * @return the libelle defined for the field + */ + public static <D> String getFieldName(FieldAccess<D> constant) { + FieldAccessEntry entry = getEntry(constant, true); + return entry == null ? null : entry.getLibelle(); + } + + /** + * Obtain for a item the value of his field via his constant type safe value + * + * @param constant the constant to be used + * @param item the item to be inspect + * @return the class defined for the field + */ + public static <D> Object getFieldValue(FieldAccess<D> constant, D item) { + FieldAccessEntry<D> entry = getEntry(constant, true); + return entry == null ? null : entry.getValue(item); + } + + @SuppressWarnings({"unchecked"}) + protected static <D> FieldAccessEntry<D> getEntry(FieldAccess<D> constant, boolean safe) { + FieldAccessEntry<D> entry = getCache().get(constant); + checkExistingEntry(constant, safe, entry); + return entry; + } + + private static <D> void checkExistingEntry(FieldAccess<D> constant, boolean safe, FieldAccessEntry<D> entry) { + if (safe && entry == null) { + throw new RuntimeException(_("lutinvcs.error.fieldmodel.not.registred", constant)); + } + } + + private static <D> void checkAlreadyRegistredEntry(FieldAccess<D> constant) throws RuntimeException { + FieldAccessEntry<D> entry = getEntry(constant, false); + if (entry != null) { + throw new RuntimeException(_("lutinvcs.error.fieldmodel.already.registred", constant)); + } + } + + + private static java.util.Map<FieldAccess, FieldAccessEntry> getCache() { + if (cache == null) + cache = new java.util.HashMap<FieldAccess, FieldAccessEntry>(); + return cache; + } + + protected static class FieldAccessEntry<D> implements FieldAccess<D> { + + private final String libelle; + private final Class clazz; + private final FieldAccess<D> constant; + + FieldAccessEntry(FieldAccess<D> constant, String libelle, Class clazz) { + this.constant = constant; + // keep only translated libelle + this.libelle = _(libelle); + this.clazz = clazz; + } + + public String getLibelle() { + return libelle; + } + + public Class getClazz() { + return clazz; + } + + public Object getValue(D item) { + return constant.getValue(item); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(this.getClass().getSimpleName()); + sb.append('@').append(Math.abs(hashCode())); + sb.append(" [").append(constant).append("] [").append(libelle).append("] ["); + sb.append(clazz).append(']'); + return sb.toString(); + } + } + + protected FieldAccessManager() { + } + +} \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/FieldModelUtil.java =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/FieldModelUtil.java (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/FieldModelUtil.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,121 @@ +/* +* ##% 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.ui; + +import static org.codelutin.i18n.I18n._; +import org.codelutin.vcs.VCSFileState; + +import java.io.File; + +@org.codelutin.i18n.I18nable +public class FieldModelUtil { + + + static public ModuleFile<String> createModuleFileTableModel(java.util.List<String> data) { + return new ModuleFile<String>(SimpleModuleFileAccess.getAcces(), data); + } + + static public ModuleFile<String> createModuleFileTableModelWithSelect(java.util.List<String> data) { + return new ModuleFile<String>(SimpleModuleFileAccess.getAcces(), data, Boolean.class, _("lutinvcs.select")); + } + + static public <D> ModuleFile<D> createModuleFileTableModelWithSelect(FieldAccess<D>[] model, java.util.List<D> data) { + return new ModuleFile<D>(model, data, Boolean.class, _("lutinvcs.select")); + } + + static public <D> ModuleFile<D> createModuleFileTableModel(FieldAccess<D>[] model, java.util.List<D> data) { + return new ModuleFile<D>(model, data); + } + + public static class ModuleFile<D> extends AbstractTableModel<D> { + private static final long serialVersionUID = 4067521432762944991L; + + protected ModuleFile(FieldAccess<D>[] model, java.util.List<D> data, Class klazz, String select) { + super(data, model, klazz, select); + } + + protected ModuleFile(FieldAccess<D>[] model, java.util.List<D> data) { + super(data, model); + } + } + + + public static enum SimpleModuleFileWithActionAccess implements FieldAccess<VCSFileState> { + ACTION(_("lutinvcs.action"), String.class) { + public Object getValue(VCSFileState item) { + return item.getAction().getLibelle(); + } + }, + MODULE(_("lutinvcs.module"), String.class) { + public Object getValue(VCSFileState item) { + return item.getModuleName(); + } + }, + NAME(_("lutinvcs.file"), String.class) { + public Object getValue(VCSFileState item) { + return item.getModuleRelativeFileName(); + } + }; + + SimpleModuleFileWithActionAccess(String libelle, Class clazz) { + FieldAccessManager.registerFieldAccess(this, libelle, clazz); + } + } + + public static enum SimpleModuleFileAccess implements FieldAccess<String> { + + MODULE(_("lutinvcs.module"), String.class) { + public Object getValue(String item) { + return item.contains(java.io.File.separator) ? item.substring( + 0, item.lastIndexOf(java.io.File.separator)) : item; + } + }, + NAME(_("lutinvcs.file"), String.class) { + public Object getValue(String item) { + return item.contains(java.io.File.separator) ? item + .substring(item.lastIndexOf(java.io.File.separator) + 1) + : ""; + } + }; + + SimpleModuleFileAccess(String libelle, Class clazz) { + FieldAccessManager.registerFieldAccess(this, libelle, clazz); + } + + public static FieldAccess<String>[] getAcces() { + return values(); + } + + } + + public static enum SimpleFileAccess implements FieldAccess<File> { + + NAME(_("lutinvcs.file"), File.class) { + public Object getValue(File item) { + return item.getAbsolutePath(); + } + }; + + SimpleFileAccess(String libelle, Class clazz) { + FieldAccessManager.registerFieldAccess(this, libelle, clazz); + } + } + +} \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/FileStateTableModel.java =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/FileStateTableModel.java (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/FileStateTableModel.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,234 @@ +/* +* ##% 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.ui; + +import static org.codelutin.i18n.I18n._; +import org.codelutin.vcs.VCSAction; +import org.codelutin.vcs.VCSFileState; +import org.codelutin.vcs.VCSState; + +import javax.swing.table.AbstractTableModel; +import static java.lang.Boolean.FALSE; +import static java.lang.Boolean.TRUE; +import java.util.ArrayList; +import java.util.EnumSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * TODO Use FieldAccessManager + * + * @author tchemit + * @see org.codelutin.vcs.ui.FieldAccessManager + * @see org.codelutin.vcs.ui.FieldModelUtil + * @see org.codelutin.vcs.ui.FieldAccess + */ + +@org.codelutin.i18n.I18nable +public class FileStateTableModel extends AbstractTableModel { + + private static final long serialVersionUID = 5764217576707763232L; + + public static enum FIELD_ACCESS { + MODULE(_("lutinvcs.module"), String.class) { + public Object getValue(VCSFileState item) { + return item.getModuleName(); + } + }, + NAME(_("lutinvcs.file"), String.class) { + public Object getValue(VCSFileState item) { + return item.getModuleRelativeFileName(); + } + }, + LOGDIFF(_("lutinvcs.logDiff"), String.class) { + public Object getValue(VCSFileState item) { + final String changeLog = item.getChangeLog(); + return changeLog == null ? "" : changeLog; + } + }, + REV(_("lutinvcs.rev"), Long.class) { + public Object getValue(VCSFileState item) { + return item.getRev(); + } + }; + + protected String columnName; + protected Class columnClass; + + FIELD_ACCESS(String columnName, Class columnClass) { + this.columnName = columnName; + this.columnClass = columnClass; + } + + public String getColumnName() { + return columnName; + } + + public Class getColumnClass() { + return columnClass; + } + + public abstract Object getValue(VCSFileState item); + } + + protected Map<VCSFileState, VCSAction> selected; + protected List<VCSFileState> data; + protected VCSState state; + protected List<VCSAction> actions; + + public FileStateTableModel(List<VCSFileState> data, EnumSet<VCSAction> actions) { + this.data = data; + this.selected = new HashMap<VCSFileState, VCSAction>(); + List<VCSAction> tmp = new ArrayList<VCSAction>(); + + if (!data.isEmpty()) { + // determine vcsstates used here for the moment a unique type + state = data.get(0).getState(); + + for (VCSAction action : state.getActions()) { + if (action.isVisible() && actions.contains(action)) { + tmp.add(action); + } + } + } + this.actions = tmp; + } + + /** @return Returns the selected. */ + public List<VCSFileState> getSelected() { + List<VCSFileState> result = new ArrayList<VCSFileState>(); + for (Map.Entry<VCSFileState, VCSAction> item : selected.entrySet()) + if (item.getValue() != null) { + item.getKey().setAction(item.getValue()); + result.add(item.getKey()); + } + return result; + } + + public int getSelectedSize() { + int result = 0; + for (Map.Entry<VCSFileState, VCSAction> item : selected.entrySet()) { + if (item.getValue() != null) { + result++; + } + } + return result; + } + + public List<VCSAction> getActions() { + return actions; + } + + public VCSAction getAction(int row) { + return selected.get(data.get(row)); + } + + /* (non-Javadoc) + * @see javax.swing.table.TableModel#getColumnCount() + */ + public int getColumnCount() { + return _FIELD_ACCESS.length + actions.size() - 2; + } + + /* (non-Javadoc) + * @see javax.swing.table.TableModel#getRowCount() + */ + public int getRowCount() { + return data.size(); + } + + /* (non-Javadoc) + * @see javax.swing.table.AbstractTableModel#getColumnClass(int) + */ + @Override + public Class<?> getColumnClass(int columnIndex) { + Class result; + if (columnIndex < actions.size()) { + result = Boolean.class; + } else { + result = _FIELD_ACCESS[columnIndex - actions.size()].getColumnClass(); + } + return result; + } + + /* (non-Javadoc) + * @see javax.swing.table.AbstractTableModel#getColumnName(int) + */ + @Override + public String getColumnName(int columnIndex) { + String result; + if (columnIndex < actions.size()) { + result = actions.get(columnIndex).getLibelle().substring(0, 1); + } else { + result = _FIELD_ACCESS[columnIndex - actions.size()].getColumnName(); + } + return result; + } + + /* (non-Javadoc) + * @see javax.swing.table.AbstractTableModel#isCellEditable(int, int) + */ + @Override + public boolean isCellEditable(int rowIndex, int columnIndex) { + return columnIndex < actions.size(); + } + + /* (non-Javadoc) + * @see javax.swing.table.AbstractTableModel#setValueAt(Object, int, int) + */ + @Override + public void setValueAt(Object aValue, int rowIndex, int columnIndex) { + if (columnIndex < actions.size()) { + VCSFileState item = data.get(rowIndex); + VCSAction action = actions.get(columnIndex); + final boolean b = TRUE.equals(aValue); + selected.put(item, b ? action : null); + } + } + + /* (non-Javadoc) + * @see javax.swing.table.TableModel#getValueAt(int, int) + */ + public Object getValueAt(int rowIndex, int columnIndex) { + VCSFileState item = data.get(rowIndex); + Object result; + if (getRowCount() == 0) return null; + if (columnIndex < actions.size()) { + result = selected.get(item); + VCSAction action = actions.get(columnIndex); + result = result == null || action != result ? FALSE : TRUE; + } else { + result = _FIELD_ACCESS[columnIndex - actions.size()].getValue(item); + } + + return result; + } + + + public void checkAll(int index, boolean value) { + if (actions.size() != 1 || index >= actions.size()) return; + //if (getActions().size() == 1) return; + // the only case we can automaticly check-uncheck items + for (int i = 0; i < getRowCount(); i++) setValueAt(value, i, index); + } + + private static final FIELD_ACCESS[] _FIELD_ACCESS = FIELD_ACCESS.values(); +} \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSUpdateDialog.java =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSUpdateDialog.java (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSUpdateDialog.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,496 @@ +package org.codelutin.vcs.ui; + +import org.codelutin.vcs.ui.*; +import java.awt.*; +import java.awt.event.*; +import java.beans.*; +import java.io.*; +import java.lang.*; +import java.util.*; +import javax.swing.*; +import javax.swing.border.*; +import javax.swing.event.*; +import jaxx.runtime.swing.JAXXButtonGroup; +import jaxx.runtime.swing.HBox; +import jaxx.runtime.swing.VBox; +import jaxx.runtime.swing.Table; +import static org.codelutin.i18n.I18n._; +import static jaxx.runtime.UIHelper.createImageIcon; + +public class VCSUpdateDialog extends javax.swing.JDialog implements jaxx.runtime.JAXXObject { + private org.codelutin.vcs.ui.VCSUpdateDialog $JDialog0 = this; protected org.codelutin.vcs.ui.VCSUpdateDialog get$JDialog0() {return $JDialog0;} + protected javax.swing.DefaultListModel listModel; public javax.swing.DefaultListModel getListModel() {return listModel;} + protected org.codelutin.vcs.ui.VCSFileStateTableModel allModel; public org.codelutin.vcs.ui.VCSFileStateTableModel getAllModel() {return allModel;} + protected org.codelutin.vcs.ui.VCSFileStateTableModel localModel; public org.codelutin.vcs.ui.VCSFileStateTableModel getLocalModel() {return localModel;} + protected org.codelutin.vcs.ui.VCSFileStateTableModel remoteModel; public org.codelutin.vcs.ui.VCSFileStateTableModel getRemoteModel() {return remoteModel;} + protected java.awt.CardLayout cardLayout; public java.awt.CardLayout getCardLayout() {return cardLayout;} + protected javax.swing.JPopupMenu tablePopupMenu; public javax.swing.JPopupMenu getTablePopupMenu() {return tablePopupMenu;} + protected javax.swing.JMenuItem diff; public javax.swing.JMenuItem getDiff() {return diff;} + protected javax.swing.JMenuItem update; public javax.swing.JMenuItem getUpdate() {return update;} + protected javax.swing.JMenuItem commit; public javax.swing.JMenuItem getCommit() {return commit;} + protected javax.swing.JMenuItem revert; public javax.swing.JMenuItem getRevert() {return revert;} + private jaxx.runtime.swing.Table $Table2; protected jaxx.runtime.swing.Table get$Table2() {return $Table2;} + private javax.swing.JToolBar $JToolBar3; protected javax.swing.JToolBar get$JToolBar3() {return $JToolBar3;} + protected javax.swing.JButton refresh; public javax.swing.JButton getRefresh() {return refresh;} + protected javax.swing.JButton diffAll; public javax.swing.JButton getDiffAll() {return diffAll;} + protected javax.swing.JButton updateAll; public javax.swing.JButton getUpdateAll() {return updateAll;} + protected javax.swing.JButton commitAll; public javax.swing.JButton getCommitAll() {return commitAll;} + protected javax.swing.JButton revertAll; public javax.swing.JButton getRevertAll() {return revertAll;} + protected javax.swing.JPanel preview; public javax.swing.JPanel getPreview() {return preview;} + protected javax.swing.JScrollPane allContent; public javax.swing.JScrollPane getAllContent() {return allContent;} + protected javax.swing.JTable allTable; public javax.swing.JTable getAllTable() {return allTable;} + protected javax.swing.JScrollPane localContent; public javax.swing.JScrollPane getLocalContent() {return localContent;} + protected javax.swing.JTable localTable; public javax.swing.JTable getLocalTable() {return localTable;} + protected javax.swing.JScrollPane remoteContent; public javax.swing.JScrollPane getRemoteContent() {return remoteContent;} + protected javax.swing.JTable remoteTable; public javax.swing.JTable getRemoteTable() {return remoteTable;} + protected javax.swing.JButton quit; public javax.swing.JButton getQuit() {return quit;} + protected java.util.List<Object> $activeBindings = new ArrayList<Object>(); public java.util.List<Object> get$activeBindings() {return $activeBindings;} + protected java.util.Map<String,Object> $bindingSources = new HashMap<String,Object>(); public java.util.Map<String,Object> get$bindingSources() {return $bindingSources;} + java.util.Map $previousValues = new java.util.HashMap(); + private boolean allComponentsCreated; protected boolean getAllComponentsCreated() {return allComponentsCreated;} + protected Map<String,Object> $objectMap = new HashMap<String,Object>(); public Map<String,Object> get$objectMap() {return $objectMap;} + private static java.lang.String $jaxxObjectDescriptor = "\u001f\u008b\u0008\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u00adVMl\u001bE\u0014\u009e\u00b8\u00b1\u0013\u00e7\u00a7-$mA\u00a44\u0085\u001c@\u0015\u00eb4E\u00946QH\u00e2\u00105\u00c6IC\\\u00a0\u00c2\u00870\u00f1\u008e\u00ed)\u00e3\u009d\u00cd\u00ec\u00ac\u00ed\u0014\u0009UB\u0015\u0007\u0010\u00ea\u0089\u0003\u0008A\u00a5\n.\u001c+.\u001c\u00a0B\u0088\u0003\u0007\u00c4\u0095\u000b\u0097\u001e8\u0080\u0010\u00f7\n\u00f1fv\u00ed\u00b5\u0093\u00f5\u00c6\u00aa\u0089\u0094U\u00f2~\u00bey\u00ef\u00cd\u00b7\u00df\u00db\u00af\u00ffBqG\u00a0\u00d3\u00d7p\u00bdn\u0008\u00d7\u0092\u00b4B\u008c\u00cc\u00e2\u00d5\u00ab\u0097\u00b7\u00af\u0091\u0082\\&NAP[r\u00f1\u00c7\u00e6\u008d?\u0017\u00ee\u00ae\u00cf\u00c7P,\u008f\u0086\u00cd\u00a6\u00dd\u0091\u00e8\u00e9|V\u00a5\u00a7\u00fc\u00f4T\u009aWln\u0011\u00ab%{6\u008b\u0086\u001c\u00b9\u00cb\u0088S&DJt\u00cc\u00cb(8N*\u00d74\u00cf\u00d6mW4\u00d0\u009a\u00c5\u0084\u00a1}\u00f1\u00cf\u00df\u00b1[\u00e6\u008d\u00db1\u0084\u00ea6B\u00e8\u0009ha\u00f2\u00a0\u00acg\u00bf<\u00f5\u00cb\u00c2g7\u00ef\u00c4P\u0016\u00c5\u00a8)\u00d1\u00a3pR\u0015\u00a7\u0018\u00b6JP\u0086\u00a0V\u0009\u00ea\u001cU\u00b64\u00c3\u008e\u00b3\u008e+d\u0007\u00bd\u008b\u0006\u00b2(ac\u0001`\u0012=\u00d5}\u00ab\u001aC\u00e7\u00d7m\u0089\u0092S\u0099e\u008a\u0019/MK4\u00c5E\u00c9(p\u00930WR\u00cb\u00a8\u0016\u001c\u00c3\u00a5\u00c6\u00eb\u00e9\u00dck\u00b6\u0089%\u00f1\u00e2l[''$\u001a\u009b\u00cai\u00ecU\u008bJp\u00d1\u00ebD\u009c\u0095\u00e8\u0094\u00ee\u00b7\u0000\u0005PF\u0084\u00b1/$\u00c8O2\u00ea\u00c85u\u009cD\u0013\u00aa\u00bb\u00ba\u00e1\u00d4\u00a0Yc\u0099\u0014\u00b1\u00cbd\u00b6\u00e1\u000eR\u00061c~\u00c6\u0099N\u00c5\u00ae\u00c0\u00b99\u0009\u00f5^\u00c1\u00db\u008c\u00ec\u0001\u0018b\u00bc\u0080=\u0008e\u0019\u000f<\u00c3\u0082T\u00b8$a\u00ae\u00a1\u0002\u0016f\u0016\u00efr\u0017&=\u00a6*5pM\u001a\u00e9\u00a65\u0008=,\u00d5\u00a1\u001b\u00dcv\u00ed5b\u00b9\u0012\u001dom,\u00d3t\u0004\u0019\u00fd&-\u0016\u0081ymq*dU\u0092\u008a\u008a\u0099h\u0086&\\}\u000f\u00ea\u00bf\u00d3{<0\u00ef\n\u0095a\u001eA\u00aaD\u0084y\u0006\u00a6\u00f4\u0080f$z\u00ac\u008d\u00a2^\u0009\u00da\u00a7\"\u0093\u00c1\u0018\u00a62W8gKX\u009c\u0093h\u00bc\u00ad^\u00df\u00ae\u0002\u009f\u0009\u000e\u0010\u00a4(\u00e0\u0015\u00f2g\u00d6\u000c^\u00821rK\u0005\u009d\u0009b\u00d5\u0014\u0016\u0099\u009e\u00fct\u00bb+\u00e9u\u00dd\u00c1\u00e95\u00de\u00c1\u00e9\u00f5\u001e\u00ee\u001c\u00b0\u00c1KI\r^\u00b7\u00f6+\u00c2\u0096G\u0080\u00a0\u0091!`]\u009a[R\u00bfi'\u00da\u00a2\u0081\u00de\u009c1\u0095\u00a3b/H4\u00e2U\u00eb\u00d9[i\u00ab\u0007\u00ba\u00f7\u00b0\u00e6\u0094\u00e7\u0080\u0080^\u00a665\u0012G4]\u00fd\u00b3\u0095m>\u00ea\u0018\u008f\u00dcM\u00cc%\u00f5X\u000e\u0007\u001e\u00f5\u00d8\u00de-\u00b2\u00ffr\u00b4Cg\u00c2\u00a1\u00fbw\\\u008f\u0089\u00d3\u00fe\u0014\u0085\u00ba\u00a5\u0009\u008ec\u0004\u00aaz\u00e4\u00deW?}\u00f0\u00fe\u00cd\u00ad\u0018\u00ea\u00cb\u00a3\u00b8p\u00c1,\u00d1\u00d1| \u00c0\u009b`\u00f2\u00a4\u00d7\u00b7j\u0000m\u00fd\u00fc\u00bdO\u00aa\u001f\u00df\u00fd\u00eeb\u00ab\u00ce\u008e\u00b6\u0085|3\u00ff\u00ed\u0003~?\u00fe\u000e\u00ac\u0005\u00d0=[p\u001b\u0088@\u00d5\u0011G<q\u0005\u00d1`\u00a95l\u00cf\u00e6Q\u00d2!\u000cv\u008a\u00de\u0019\u00e3-\u0005\u00e4|3\u0014\u0001\u00f8\u008f\u00e8\u00f7^\u00a5\u0019\u0097\u00b0S\u0086\u00d4\u00f8\u00c0o\u00f7~8\u00fe\u00d6\u00af\u0087PlE\u00cd\u001e\u009b+X\u00c5\u00af\u00a2\u00a4,+\u00e2sf\u00d6\u00ed\u0097\u0016\u0090\u00fa\u0019\u00a9\r\u00c2\u00f3(\u00fc\u00c6\u0081\u0098E^p\u001d\u008f\u0010\u00f1\"f\u000eQ6@\u0090\u00ed\u00b6\u0004\u00b7\u00f1\u008e\u00dbj\u00a8`Q\u00a2\u0096D} \u00d7\u00a3\u00db\\\u0098Dl`0\u0010\u00b3\u0011T\u0087\u0081\u008d\u00b7\u000c\u00ac\u00d9\u00c5\u00cf\u00b7>\\\u009b\u00f8\u00e8\u00e4\u00f9\u00c6\u00d0\u00fa\u00bc\u00a6\u00f6\u0084=\u00b9\u00fei\u00d2yp\u00fe\u00df\u0018\u008a\u00bf\u0089\u0012\u00d4b\u00d4\"z-\u00f9\u001b't\r\r\u00db\u000eqM\u001el\u0096\u00b0]\u0083`\u00db\u000c6\u0094\u00c2\u00d7\u00bf7\u00f43\u00bfoF\u0087\u001e\u00b6w\u0005W\u00d2\u00cd\u00a9\u00bf\u00a8:s\u00c0\u0017\u009c\u0003\u008e\u00ec\u0083Hb\u00a9\u00f9\u0003\\\u00bf\u0014n8Z\u00b2\u00a9\u00cd\u00ff\u000f^<\u00d3\u00b2\u000e\"\u00b0\u00802\u0096|\u00ce\u0081\r\n\u0003\u00b8\u0010\u0002e\u00ab\u00e2\u009c\n(M\u000e\u0082\"\u00e1b\u00b0\u00a7\u00b0+\u00f9&Qxj\u00e3\u0081\u00ac)\u00c3\u0096\u00d0\u0096-\u00b85\u00b9U\u00e0\u00cc\u00ad\u00c0\u00b8\u00c7\u0004\u00afy\u00ec\u00a0\u00dc\u0002-\u00e5\u00b5\u00c8\u0081\u00ab:\u00f6\u00c9BD%'\u0094DS\u00d0-Oq\u0080\u001b\u001b\u009c\u00d1\u00c2\u00aeD\u00b1\u0019\u00b8\u00e8\u00c7\u00cb\\\u00d0\u00eb\u00d0{X\u00c0\u00b9\u00b3\u001d\n\u00d8/b\u0011\u00a3=fz\u00df\u001bi\u00c6\u001dr\u0019\u0084\u0002\u00abNA\u00aa\u00e7<\u00faOb\u0009\u001fa\u00db\u00ae$\u00f3\u00fb\u008e\u00ebS\u00cf!\u00fb\u00e0\u00fbK\u0094\u0009-\u0095\u00b5.\u00de~x\u0094x\u0085\u009b\u0098\u00f5\n\"\u00a9\u00f4d\u00bc\u0017\u0090\u001a|\u00a9\u0096{\u0004i\u00bc \u00110'\u00bb\u0081\u00a1V\u0095\u00bf\r4B\u0087\u00e7\u00e0\u00da\u00f1\u00e46\u00b5L\u00d8\u00af\u001d\u00ae\u00ab\u001b\u00c8~I\u00eaQ\u0097\u0095:\u0010C\u0099\u008c@\u0098\u00e9\u0019\u00e1\u00f9\u009e\u0011^\u00e8\u0019\u00e1\u00c5n\u00a8\u00cf\u00f4G\u00b2\u00f2\u001f\u008er\u00b1K\u00ea{\u001ff\u001d@\u0016\u00bbaJ\u0095:t;\u0092\u00fc/w5\u0093\u00df#\n\u00b9\u00d4\u0015\u00c2\u00fd\u0088\u001a^\u00e9\u00b9\u0086\u00f5n\u00ee\u0005kI\u008f@y\u00b5g~(\u0084\u00ff\u0000]\u00eb\u00d5\u00e7\u00cc\u000f\u0000\u0000"; protected java.lang.String get$jaxxObjectDescriptor() {return $jaxxObjectDescriptor;} + + /* begin raw body code */ + Action quitAction ; + JRootPane rootPane; + /* end raw body code */ + public VCSUpdateDialog() { + $initialize(); + } + + private void $initialize() { + $objectMap.put("$JDialog0", this); + rootPane = getRootPane(); + + createListModel(); + createAllModel(); + createLocalModel(); + createRemoteModel(); + createCardLayout(); + createTablePopupMenu(); + createDiff(); + createUpdate(); + createCommit(); + createRevert(); + + $Table2 = new jaxx.runtime.swing.Table(); + $Table2.setName("$Table2"); + $objectMap.put("$Table2", $Table2); + $JToolBar3 = new javax.swing.JToolBar(); + $JToolBar3.setName("$JToolBar3"); + $JToolBar3.setFocusable(false); + $JToolBar3.setFloatable(false); + $JToolBar3.setOpaque(false); + $JToolBar3.setMargin(new Insets(0, 0, 0, 0)); + $JToolBar3.setBorderPainted(false); + $objectMap.put("$JToolBar3", $JToolBar3); + createRefresh(); + createDiffAll(); + createUpdateAll(); + createCommitAll(); + createRevertAll(); + createPreview(); + createAllContent(); + createAllTable(); + createLocalContent(); + createLocalTable(); + createRemoteContent(); + createRemoteTable(); + createQuit(); + $JDialog0.setName("$JDialog0"); + $JDialog0.setDefaultCloseOperation(2); + jaxx.runtime.Util.setComponentHeight($JDialog0,300); + + $JDialog0.setModal(true); + $JDialog0.setTitle(_("lutinutil.config.title")); + jaxx.runtime.Util.setComponentWidth($JDialog0,500); + + + + rootPane.setDefaultButton(quit);quitAction = new AbstractAction(quit.getText()) { + private static final long serialVersionUID = -869095664995763057L; + public void actionPerformed(ActionEvent e) { + dispose(); + } + };rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"),"quit");rootPane.getActionMap().put("quit", quitAction); + $completeSetup(); + } + + protected void createListModel() { + listModel = new javax.swing.DefaultListModel(); + $objectMap.put("listModel", listModel); + } + + protected void createAllModel() { + allModel = new org.codelutin.vcs.ui.VCSFileStateTableModel(); + $objectMap.put("allModel", allModel); + } + + protected void createLocalModel() { + localModel = new org.codelutin.vcs.ui.VCSFileStateTableModel(); + $objectMap.put("localModel", localModel); + } + + protected void createRemoteModel() { + remoteModel = new org.codelutin.vcs.ui.VCSFileStateTableModel(); + $objectMap.put("remoteModel", remoteModel); + } + + protected void createCardLayout() { + cardLayout = new java.awt.CardLayout(); + $objectMap.put("cardLayout", cardLayout); + } + + protected void createTablePopupMenu() { + tablePopupMenu = new javax.swing.JPopupMenu(); + tablePopupMenu.setName("tablePopupMenu"); + tablePopupMenu.setEnabled(false); + $objectMap.put("tablePopupMenu", tablePopupMenu); + } + + protected void createDiff() { + diff = new javax.swing.JMenuItem(); + diff.setName("diff"); + $objectMap.put("diff", diff); + } + + protected void createUpdate() { + update = new javax.swing.JMenuItem(); + update.setName("update"); + $objectMap.put("update", update); + } + + protected void createCommit() { + commit = new javax.swing.JMenuItem(); + commit.setName("commit"); + $objectMap.put("commit", commit); + } + + protected void createRevert() { + revert = new javax.swing.JMenuItem(); + revert.setName("revert"); + $objectMap.put("revert", revert); + } + + protected void createRefresh() { + refresh = new javax.swing.JButton(); + refresh.setName("refresh"); + refresh.setText(_("lutinvcs.action.refresh")); + refresh.setOpaque(false); + refresh.setMargin(new Insets(0, 0, 0, 0)); + refresh.setBorderPainted(false); + $objectMap.put("refresh", refresh); + } + + protected void createDiffAll() { + diffAll = new javax.swing.JButton(); + diffAll.setName("diffAll"); + diffAll.setText(_("lutinvcs.action.diffAll")); + diffAll.setOpaque(false); + diffAll.setMargin(new Insets(0, 0, 0, 0)); + diffAll.setBorderPainted(false); + $objectMap.put("diffAll", diffAll); + } + + protected void createUpdateAll() { + updateAll = new javax.swing.JButton(); + updateAll.setName("updateAll"); + updateAll.setText(_("lutinvcs.action.updateAll")); + updateAll.setOpaque(false); + updateAll.setMargin(new Insets(0, 0, 0, 0)); + updateAll.setBorderPainted(false); + $objectMap.put("updateAll", updateAll); + } + + protected void createCommitAll() { + commitAll = new javax.swing.JButton(); + commitAll.setName("commitAll"); + commitAll.setText(_("lutinvcs.action.commitAll")); + commitAll.setOpaque(false); + commitAll.setMargin(new Insets(0, 0, 0, 0)); + commitAll.setBorderPainted(false); + $objectMap.put("commitAll", commitAll); + } + + protected void createRevertAll() { + revertAll = new javax.swing.JButton(); + revertAll.setName("revertAll"); + revertAll.setText(_("lutinvcs.action.revertAll")); + revertAll.setOpaque(false); + revertAll.setMargin(new Insets(0, 0, 0, 0)); + revertAll.setBorderPainted(false); + $objectMap.put("revertAll", revertAll); + } + + protected void createPreview() { + preview = new javax.swing.JPanel(); + preview.setName("preview"); + preview.setLayout((cardLayout)); + $objectMap.put("preview", preview); + } + + protected void createAllContent() { + allContent = new javax.swing.JScrollPane(); + allContent.setName("allContent"); + allContent.setVerticalScrollBarPolicy(20); + allContent.setHorizontalScrollBarPolicy(31); + $objectMap.put("allContent", allContent); + } + + protected void createAllTable() { + allTable = new javax.swing.JTable(); + allTable.setName("allTable"); + allTable.setAutoResizeMode(3); + allTable.setRowSelectionAllowed(false); + $objectMap.put("allTable", allTable); + } + + protected void createLocalContent() { + localContent = new javax.swing.JScrollPane(); + localContent.setName("localContent"); + localContent.setVisible(false); + localContent.setVerticalScrollBarPolicy(20); + localContent.setHorizontalScrollBarPolicy(31); + $objectMap.put("localContent", localContent); + } + + protected void createLocalTable() { + localTable = new javax.swing.JTable(); + localTable.setName("localTable"); + localTable.setAutoResizeMode(3); + localTable.setRowSelectionAllowed(false); + $objectMap.put("localTable", localTable); + } + + protected void createRemoteContent() { + remoteContent = new javax.swing.JScrollPane(); + remoteContent.setName("remoteContent"); + remoteContent.setVisible(false); + remoteContent.setVerticalScrollBarPolicy(20); + remoteContent.setHorizontalScrollBarPolicy(31); + $objectMap.put("remoteContent", remoteContent); + } + + protected void createRemoteTable() { + remoteTable = new javax.swing.JTable(); + remoteTable.setName("remoteTable"); + remoteTable.setAutoResizeMode(3); + remoteTable.setRowSelectionAllowed(false); + $objectMap.put("remoteTable", remoteTable); + } + + protected void createQuit() { + quit = new javax.swing.JButton(); + quit.setName("quit"); + quit.setText(_("lutinutil.common.quit")); + quit.setOpaque(false); + quit.setMargin(new Insets(0, 0, 0, 0)); + quit.setBorderPainted(false); + $objectMap.put("quit", quit); + } + + protected void addChildrenToListModel() { + + } + + protected void addChildrenToAllModel() { + + } + + protected void addChildrenToLocalModel() { + + } + + protected void addChildrenToRemoteModel() { + + } + + protected void addChildrenToCardLayout() { + + } + + protected void addChildrenToTablePopupMenu() { + if (allComponentsCreated) { + tablePopupMenu.add(diff); + tablePopupMenu.add(update); + tablePopupMenu.add(commit); + tablePopupMenu.add(revert); + } + } + + protected void addChildrenToDiff() { + + } + + protected void addChildrenToUpdate() { + + } + + protected void addChildrenToCommit() { + + } + + protected void addChildrenToRevert() { + + } + + protected void addChildrenToRefresh() { + + } + + protected void addChildrenToDiffAll() { + + } + + protected void addChildrenToUpdateAll() { + + } + + protected void addChildrenToCommitAll() { + + } + + protected void addChildrenToRevertAll() { + + } + + protected void addChildrenToPreview() { + if (allComponentsCreated) { + preview.add(allContent, "all"); + preview.add(localContent, "local"); + preview.add(remoteContent, "remote"); + } + } + + protected void addChildrenToAllContent() { + if (allComponentsCreated) { + allContent.getViewport().add(allTable); + } + } + + protected void addChildrenToAllTable() { + + } + + protected void addChildrenToLocalContent() { + if (allComponentsCreated) { + localContent.getViewport().add(localTable); + } + } + + protected void addChildrenToLocalTable() { + + } + + protected void addChildrenToRemoteContent() { + if (allComponentsCreated) { + remoteContent.getViewport().add(remoteTable); + } + } + + protected void addChildrenToRemoteTable() { + + } + + protected void addChildrenToQuit() { + + } + + private void $completeSetup() { + allComponentsCreated = true; + $JDialog0.getContentPane().add($Table2); + + + addChildrenToListModel(); + + addChildrenToAllModel(); + + addChildrenToLocalModel(); + + addChildrenToRemoteModel(); + + addChildrenToCardLayout(); + + addChildrenToTablePopupMenu(); + + addChildrenToDiff(); + + addChildrenToUpdate(); + + addChildrenToCommit(); + + addChildrenToRevert(); + + $Table2.add($JToolBar3, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0)); + $Table2.add(preview, new GridBagConstraints(0, 1, 1, 1, 2.0, 1.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0)); + $Table2.add(quit, new GridBagConstraints(0, 2, 2, 1, 0.0, 0.0, 10, 1, new Insets(3, 3, 3, 3), 0, 0)); + + $JToolBar3.add(refresh); + $JToolBar3.add(diffAll); + $JToolBar3.add(updateAll); + $JToolBar3.add(commitAll); + $JToolBar3.add(revertAll); + + addChildrenToRefresh(); + + addChildrenToDiffAll(); + + addChildrenToUpdateAll(); + + addChildrenToCommitAll(); + + addChildrenToRevertAll(); + + addChildrenToPreview(); + + addChildrenToAllContent(); + + addChildrenToAllTable(); + + addChildrenToLocalContent(); + + addChildrenToLocalTable(); + + addChildrenToRemoteContent(); + + addChildrenToRemoteTable(); + + addChildrenToQuit(); + + tablePopupMenu.setInvoker((allTable)); + allTable.setModel((allModel)); + localTable.setModel((localModel)); + remoteTable.setModel((remoteModel)); + quit.setAction((quitAction)); + } + + public void applyDataBinding(String $binding) { + processDataBinding($binding); + } + + public void removeDataBinding(String $binding) { + + } + + public void processDataBinding(String dest) { + processDataBinding(dest, false); + } + + public void processDataBinding(String $dest, boolean $force) { + + } + + public java.lang.Object getObjectById(String id) { + return $objectMap.get(id); + } + + public static jaxx.runtime.JAXXObjectDescriptor $getJAXXObjectDescriptor() { + return jaxx.runtime.Util.decodeCompressedJAXXObjectDescriptor($jaxxObjectDescriptor); + } + + public void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue) { + super.firePropertyChange(propertyName, oldValue, newValue); + } + +} Added: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/package.html =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/package.html (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/package.html 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,6 @@ +<html> +<body> +<h1>Lutin vcs ui package</h1> +TODO +</body> +</html> \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1 @@ +org.codelutin.util.LutinLogFactory \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/i18n/lutinvcs-ui-en_GB.properties =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/main/resources/i18n/lutinvcs-ui-en_GB.properties (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/main/resources/i18n/lutinvcs-ui-en_GB.properties 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,16 @@ +lutinutil.common.quit= +lutinutil.config.title= +lutinvcs.action=Action +lutinvcs.action.commitAll= +lutinvcs.action.diffAll= +lutinvcs.action.refresh= +lutinvcs.action.revertAll= +lutinvcs.action.updateAll= +lutinvcs.error.fieldmodel.already.registred=FieldAccess [{0}] is already registred +lutinvcs.error.fieldmodel.not.registred=could not found a matching entry in cache for [{0}] +lutinvcs.error.fieldmodel.unmatchin.options=you can not defined a such model with no the same number of optionClass and optionNames +lutinvcs.file=File +lutinvcs.logDiff=show diff +lutinvcs.module=Module +lutinvcs.rev=Revision +lutinvcs.select=Select Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/i18n/lutinvcs-ui-fr_FR.properties =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/main/resources/i18n/lutinvcs-ui-fr_FR.properties (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/main/resources/i18n/lutinvcs-ui-fr_FR.properties 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,16 @@ +lutinutil.common.quit=quitter +lutinutil.config.title= +lutinvcs.action=Action +lutinvcs.action.commitAll=tout commiter +lutinvcs.action.diffAll=voir tous les diffs +lutinvcs.action.refresh=rafraichir +lutinvcs.action.revertAll=annuler les modifications +lutinvcs.action.updateAll=tout mettre \u00E0 jour +lutinvcs.error.fieldmodel.already.registred=FieldAccess [{0}] is already registred +lutinvcs.error.fieldmodel.not.registred=could not found a matching entry in cache for [{0}] +lutinvcs.error.fieldmodel.unmatchin.options= +lutinvcs.file=Fichier +lutinvcs.logDiff=LogDiff +lutinvcs.module=Module +lutinvcs.rev=R\u00E9vision +lutinvcs.select=S\u00E9lectionner Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/AddRemove_C32.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/AddRemove_C32.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/advanced.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/advanced.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/autoRefresh.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/autoRefresh.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/autorefresh-icon.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/autorefresh-icon.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/clearFilter.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/clearFilter.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/commit.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/commit.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/compileSingle.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/compileSingle.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/conflicts-badge.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/conflicts-badge.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/cut.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/cut.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/diff-next.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/diff-next.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/diff-prev.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/diff-prev.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/diff.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/diff.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/diff_file_16.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/diff_file_16.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/envelope_small.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/envelope_small.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/export.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/export.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/filter.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/filter.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/find_next.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/find_next.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/find_previous.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/find_previous.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/find_selection.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/find_selection.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/generalOptions.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/generalOptions.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/import-elements.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/import-elements.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/local_vs_local.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/local_vs_local.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/locally_mod.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/locally_mod.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/loop.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/loop.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/modified-badge.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/modified-badge.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/newFile24.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/newFile24.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/password_field_32.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/password_field_32.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/paste.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/paste.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/recent_messages.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/recent_messages.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/recent_msgs.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/recent_msgs.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/refresh.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/refresh.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/remote_vs_local.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/remote_vs_local.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/remote_vs_remote.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/remote_vs_remote.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/rollback.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/rollback.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/save.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/save.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/save24.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/save24.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/search_types.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/search_types.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/search_types_disabled.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/search_types_disabled.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/server.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/server.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/update.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/update.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/versioning-view.png =================================================================== (Binary files differ) Property changes on: trunk/lutinvcs/lutinvcs-ui/src/main/resources/icons/versioning-view.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lutinvcs/lutinvcs-ui/src/main/uimodel/org/codelutin/vcs/ui/VCSUpdateDialog.jaxx =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/main/uimodel/org/codelutin/vcs/ui/VCSUpdateDialog.jaxx (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/main/uimodel/org/codelutin/vcs/ui/VCSUpdateDialog.jaxx 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,64 @@ +<JDialog title='lutinutil.config.title' modal='true' + defaultCloseOperation='DISPOSE_ON_CLOSE' width='500' height='300'> + <style source="common.css"/> + <script> + + Action quitAction ; + + JRootPane rootPane = getRootPane(); + rootPane.setDefaultButton(quit); + quitAction = new AbstractAction(quit.getText()) { + private static final long serialVersionUID = -869095664995763057L; + public void actionPerformed(ActionEvent e) { + dispose(); + } + }; + rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"),"quit"); + rootPane.getActionMap().put("quit", quitAction); + </script> + <DefaultListModel id='listModel'/> + <org.codelutin.vcs.ui.VCSFileStateTableModel id="allModel"/> + <org.codelutin.vcs.ui.VCSFileStateTableModel id="localModel"/> + <org.codelutin.vcs.ui.VCSFileStateTableModel id="remoteModel"/> + <java.awt.CardLayout id='cardLayout'/> + + <JPopupMenu id="tablePopupMenu" invoker='{allTable}' enabled='false'> + <JMenuItem id='diff'/> + <JMenuItem id='update'/> + <JMenuItem id='commit'/> + <JMenuItem id='revert'/> + </JPopupMenu> + <Table> + <row fill='both'> + <cell fill='both' weightx='1'> + <JToolBar> + <JButton id='refresh' text="lutinvcs.action.refresh"/> + <JButton id='diffAll' text="lutinvcs.action.diffAll"/> + <JButton id='updateAll' text="lutinvcs.action.updateAll"/> + <JButton id='commitAll' text="lutinvcs.action.commitAll"/> + <JButton id='revertAll' text="lutinvcs.action.revertAll"/> + </JToolBar> + </cell> + </row> + <row fill='both'> + <cell fill='both' weighty='1' weightx='2'> + <JPanel id='preview' layout='{cardLayout}'> + <JScrollPane id='allContent' styleClass='updateScroll' constraints='"all"'> + <JTable id="allTable" model="{allModel}" styleClass='updateTable'/> + </JScrollPane> + <JScrollPane id='localContent' styleClass='updateScroll' visible='false' constraints='"local"'> + <JTable id="localTable" model="{localModel}" styleClass='updateTable'/> + </JScrollPane> + <JScrollPane id='remoteContent' styleClass='updateScroll' visible='false' constraints='"remote"'> + <JTable id="remoteTable" model="{remoteModel}" styleClass='updateTable'/> + </JScrollPane> + </JPanel> + </cell> + </row> + <row> + <cell columns='2' fill='both'> + <JButton id='quit' text='lutinutil.common.quit' action='{quitAction}'/> + </cell> + </row> + </Table> +</JDialog> Added: trunk/lutinvcs/lutinvcs-ui/src/main/uimodel/org/codelutin/vcs/ui/common.css =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/main/uimodel/org/codelutin/vcs/ui/common.css (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/main/uimodel/org/codelutin/vcs/ui/common.css 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,36 @@ +JToolBar { + floatable:false; + focusable:false; + opaque:false; + margin:0; + borderPainted:false; +} + +JButton { + opaque:false; + borderPainted:false; + /*enabled:false;*/ + margin:0; +} + +JMenuItem { + enabled:true; +} + +JMenu { + enabled:true; +} + +.smallSize { + font-size:9; +} + +.updateTable { + rowSelectionAllowed:false; + autoResizeMode:auto_resize_last_column; +} + +.updateScroll { + verticalScrollBarPolicy:20; + horizontalScrollBarPolicy:31; +} \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-ui/src/site/fr/rst/devel/index.rst =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/site/fr/rst/devel/index.rst (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/site/fr/rst/devel/index.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,5 @@ +================ +Lutin vcs ui dev +================ + +TODO Added: trunk/lutinvcs/lutinvcs-ui/src/site/fr/rst/index.rst =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/site/fr/rst/index.rst (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/site/fr/rst/index.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,5 @@ +============ +Lutin vcs ui +============ + +TODO \ No newline at end of file Added: trunk/lutinvcs/lutinvcs-ui/src/site/fr/rst/todo.rst =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/site/fr/rst/todo.rst (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/site/fr/rst/todo.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,4 @@ +==================== +Lutinvcs - ui - TODO +==================== + Added: trunk/lutinvcs/lutinvcs-ui/src/site/site_fr.xml =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/site/site_fr.xml (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/site/site_fr.xml 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<project name="simexplorer-si"> + + <skin> + <groupId>lutinlib</groupId> + <artifactId>lutin-site-skin</artifactId> + <version>0.1</version> + </skin> + + <bannerLeft> + <name>Système d'information - SimExplorer</name> + </bannerLeft> + + <bannerRight> + <src> + http://www.codelutin.com/images/lutinorange-codelutin.png + </src> + <href>http://www.codelutin.com</href> + </bannerRight> + + <poweredBy> + <logo href="http://docutils.sourceforge.net/rst.html" + img="/images/restructuredtext-logo.png" name="reStructuredText"/> + </poweredBy> + + <body> + <menu name="Common Links" inherit="top" /> + <menu ref="parent" /> + <menu ref="reports" /> + + <menu name="Liens"> + <item href="http://java.sun.com/j2se" + name="Le site Java de Sun"> + </item> + </menu> + </body> +</project> Added: trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,24 @@ +/** + * # #% 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; + +/** @author chemit */ +public class UITest { + + public static void main(String[] args) { + VCSUpdateDialog dialog =new VCSUpdateDialog(); + dialog.setVisible(true); + } +} Added: trunk/lutinvcs/lutinvcs-ui/src/test/resources/log4j.properties =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/test/resources/log4j.properties (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/test/resources/log4j.properties 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,11 @@ +# 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.i18n=INFO +log4j.logger.org.codelutin.util=INFO +log4j.logger.org.codelutin.option=INFO Added: trunk/lutinvcs/lutinvcs.ipr =================================================================== --- trunk/lutinvcs/lutinvcs.ipr (rev 0) +++ trunk/lutinvcs/lutinvcs.ipr 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,527 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project relativePaths="true" version="4"> + <component name="AntConfiguration"> + <defaultAnt bundledAnt="true" /> + </component> + <component name="BuildJarProjectSettings"> + <option name="BUILD_JARS_ON_MAKE" value="false" /> + </component> + <component name="CCaseConfig"> + <option name="checkoutReserved" value="false" /> + <option name="markExternalChangeAsUpToDate" value="true" /> + <option name="checkInUseHijack" value="true" /> + <option name="useUcmModel" value="true" /> + <option name="isOffline" value="false" /> + <option name="synchOutside" value="false" /> + <option name="isHistoryResticted" value="true" /> + <option name="useIdenticalSwitch" value="true" /> + <option name="synchActivitiesOnRefresh" value="true" /> + <option name="lastScr" value="" /> + <option name="scrTextFileName" value="" /> + <option name="historyRevisionsNumber" value="4" /> + </component> + <component name="ChangesViewManager" flattened_view="true" show_ignored="false" /> + <component name="CodeStyleProjectProfileManger"> + <option name="PROJECT_PROFILE" /> + <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" /> + </component> + <component name="CodeStyleSettingsManager"> + <option name="PER_PROJECT_SETTINGS" /> + <option name="USE_PER_PROJECT_SETTINGS" value="false" /> + </component> + <component name="CompilerConfiguration"> + <option name="DEFAULT_COMPILER" value="Javac" /> + <option name="DEPLOY_AFTER_MAKE" value="0" /> + <resourceExtensions> + <entry name=".+\.(properties|xml|html|dtd|tld)" /> + <entry name=".+\.(gif|png|jpeg|jpg)" /> + </resourceExtensions> + <wildcardResourcePatterns> + <entry name="?*.properties" /> + <entry name="?*.xml" /> + <entry name="?*.gif" /> + <entry name="?*.png" /> + <entry name="?*.jpeg" /> + <entry name="?*.jpg" /> + <entry name="?*.html" /> + <entry name="?*.dtd" /> + <entry name="?*.tld" /> + </wildcardResourcePatterns> + </component> + <component name="CreatePatchCommitExecutor"> + <option name="PATCH_PATH" value="" /> + <option name="REVERSE_PATCH" value="false" /> + </component> + <component name="DaemonCodeAnalyzer"> + <disable_hints /> + </component> + <component name="DebuggerManager"> + <breakpoint_any> + <breakpoint> + <option name="NOTIFY_CAUGHT" value="true" /> + <option name="NOTIFY_UNCAUGHT" value="true" /> + <option name="ENABLED" value="false" /> + <option name="LOG_ENABLED" value="false" /> + <option name="LOG_EXPRESSION_ENABLED" value="false" /> + <option name="SUSPEND_POLICY" value="SuspendAll" /> + <option name="COUNT_FILTER_ENABLED" value="false" /> + <option name="COUNT_FILTER" value="0" /> + <option name="CONDITION_ENABLED" value="false" /> + <option name="CLASS_FILTERS_ENABLED" value="false" /> + <option name="INSTANCE_FILTERS_ENABLED" value="false" /> + <option name="CONDITION" value="" /> + <option name="LOG_MESSAGE" value="" /> + </breakpoint> + <breakpoint> + <option name="NOTIFY_CAUGHT" value="true" /> + <option name="NOTIFY_UNCAUGHT" value="true" /> + <option name="ENABLED" value="false" /> + <option name="LOG_ENABLED" value="false" /> + <option name="LOG_EXPRESSION_ENABLED" value="false" /> + <option name="SUSPEND_POLICY" value="SuspendAll" /> + <option name="COUNT_FILTER_ENABLED" value="false" /> + <option name="COUNT_FILTER" value="0" /> + <option name="CONDITION_ENABLED" value="false" /> + <option name="CLASS_FILTERS_ENABLED" value="false" /> + <option name="INSTANCE_FILTERS_ENABLED" value="false" /> + <option name="CONDITION" value="" /> + <option name="LOG_MESSAGE" value="" /> + </breakpoint> + </breakpoint_any> + <breakpoint_rules /> + <ui_properties /> + </component> + <component name="DependenciesAnalyzeManager"> + <option name="myForwardDirection" value="false" /> + </component> + <component name="DependencyValidationManager"> + <option name="SKIP_IMPORT_STATEMENTS" value="false" /> + </component> + <component name="EclipseCompilerSettings"> + <option name="DEBUGGING_INFO" value="true" /> + <option name="GENERATE_NO_WARNINGS" value="true" /> + <option name="DEPRECATION" value="false" /> + <option name="ADDITIONAL_OPTIONS_STRING" value="" /> + <option name="MAXIMUM_HEAP_SIZE" value="128" /> + </component> + <component name="EclipseEmbeddedCompilerSettings"> + <option name="DEBUGGING_INFO" value="true" /> + <option name="GENERATE_NO_WARNINGS" value="true" /> + <option name="DEPRECATION" value="false" /> + <option name="ADDITIONAL_OPTIONS_STRING" value="" /> + <option name="MAXIMUM_HEAP_SIZE" value="128" /> + </component> + <component name="EntryPointsManager"> + <entry_points version="2.0" /> + </component> + <component name="ErrorTreeViewConfiguration"> + <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" /> + <option name="HIDE_WARNINGS" value="false" /> + </component> + <component name="FindManager"> + <FindUsagesManager> + <setting name="OPEN_NEW_TAB" value="false" /> + </FindUsagesManager> + </component> + <component name="HierarchyBrowserManager"> + <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" /> + <option name="SORT_ALPHABETICALLY" value="false" /> + <option name="HIDE_CLASSES_WHERE_METHOD_NOT_IMPLEMENTED" value="false" /> + </component> + <component name="IdProvider" IDEtalkID="4ECC62A3B07FAAFA72C396FC7186A6C1" /> + <component name="InspectionProjectProfileManager"> + <option name="PROJECT_PROFILE" value="Project Default" /> + <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" /> + <scopes /> + <profiles> + <profile version="1.0" is_locked="false"> + <option name="myName" value="Project Default" /> + <option name="myLocal" value="false" /> + <inspection_tool class="NonSerializableWithSerialVersionUIDField" level="WARNING" enabled="true" /> + <inspection_tool class="NonSerializableFieldInSerializableClass" level="WARNING" enabled="true"> + <option name="superClassString" value="java.awt.Component" /> + </inspection_tool> + <inspection_tool class="SerializableHasSerialVersionUIDField" level="WARNING" enabled="true"> + <option name="superClassString" value="java.awt.Component" /> + </inspection_tool> + <inspection_tool class="ThrowableInstanceNeverThrown" level="WARNING" enabled="false" /> + </profile> + </profiles> + <list size="0" /> + </component> + <component name="JavacSettings"> + <option name="DEBUGGING_INFO" value="true" /> + <option name="GENERATE_NO_WARNINGS" value="false" /> + <option name="DEPRECATION" value="true" /> + <option name="ADDITIONAL_OPTIONS_STRING" value="" /> + <option name="MAXIMUM_HEAP_SIZE" value="128" /> + </component> + <component name="JavadocGenerationManager"> + <option name="OUTPUT_DIRECTORY" /> + <option name="OPTION_SCOPE" value="protected" /> + <option name="OPTION_HIERARCHY" value="true" /> + <option name="OPTION_NAVIGATOR" value="true" /> + <option name="OPTION_INDEX" value="true" /> + <option name="OPTION_SEPARATE_INDEX" value="true" /> + <option name="OPTION_DOCUMENT_TAG_USE" value="false" /> + <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" /> + <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" /> + <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" /> + <option name="OPTION_DEPRECATED_LIST" value="true" /> + <option name="OTHER_OPTIONS" value="" /> + <option name="HEAP_SIZE" /> + <option name="LOCALE" /> + <option name="OPEN_IN_BROWSER" value="true" /> + </component> + <component name="JikesSettings"> + <option name="JIKES_PATH" value="" /> + <option name="DEBUGGING_INFO" value="true" /> + <option name="DEPRECATION" value="true" /> + <option name="GENERATE_NO_WARNINGS" value="false" /> + <option name="IS_EMACS_ERRORS_MODE" value="true" /> + <option name="ADDITIONAL_OPTIONS_STRING" value="" /> + </component> + <component name="MavenBuilder"> + <option name="jreName" value="1.6" /> + <option name="runMavenInBackground" value="true" /> + <option name="useMavenEmbedder" value="false" /> + </component> + <component name="MavenImporterState"> + <option name="profiles"> + <set> + <option value="project" /> + </set> + </option> + </component> + <component name="ModuleEditorState"> + <option name="LAST_EDITED_MODULE_NAME" /> + <option name="LAST_EDITED_TAB_NAME" /> + </component> + <component name="Palette2"> + <group name="Swing"> + <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" /> + </item> + <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" /> + </item> + <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" /> + </item> + <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true"> + <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" /> + </item> + <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" /> + <initial-values> + <property name="text" value="Button" /> + </initial-values> + </item> + <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> + <initial-values> + <property name="text" value="RadioButton" /> + </initial-values> + </item> + <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> + <initial-values> + <property name="text" value="CheckBox" /> + </initial-values> + </item> + <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" /> + <initial-values> + <property name="text" value="Label" /> + </initial-values> + </item> + <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> + <preferred-size width="150" height="-1" /> + </default-constraints> + </item> + <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> + <preferred-size width="150" height="-1" /> + </default-constraints> + </item> + <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> + <preferred-size width="150" height="-1" /> + </default-constraints> + </item> + <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" /> + </item> + <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> + <preferred-size width="200" height="200" /> + </default-constraints> + </item> + <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> + <preferred-size width="200" height="200" /> + </default-constraints> + </item> + <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> + </item> + <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> + </item> + <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" /> + </item> + <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" /> + </item> + <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1"> + <preferred-size width="-1" height="20" /> + </default-constraints> + </item> + <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" /> + </item> + <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" /> + </item> + </group> + </component> + <component name="ProjectFileVersion" converted="true" /> + <component name="ProjectLevelVcsManager"> + <OptionsSetting value="true" id="Add" /> + <OptionsSetting value="true" id="Remove" /> + <OptionsSetting value="true" id="Checkout" /> + <OptionsSetting value="true" id="Update" /> + <OptionsSetting value="true" id="Status" /> + <OptionsSetting value="true" id="Edit" /> + <ConfirmationsSetting value="0" id="Add" /> + <ConfirmationsSetting value="0" id="Remove" /> + </component> + <component name="ProjectModuleManager"> + <modules> + <module fileurl="file://$PROJECT_DIR$/../../idea_files/lutinvcs.iml" filepath="$PROJECT_DIR$/../../idea_files/lutinvcs.iml" group="lutinvcs and modules" /> + <module fileurl="file://$PROJECT_DIR$/../../idea_files/lutinvcs-api.iml" filepath="$PROJECT_DIR$/../../idea_files/lutinvcs-api.iml" group="lutinvcs and modules" /> + <module fileurl="file://$PROJECT_DIR$/../../idea_files/lutinvcs-core.iml" filepath="$PROJECT_DIR$/../../idea_files/lutinvcs-core.iml" group="lutinvcs and modules" /> + <module fileurl="file://$PROJECT_DIR$/../../idea_files/lutinvcs-provider-cvs.iml" filepath="$PROJECT_DIR$/../../idea_files/lutinvcs-provider-cvs.iml" group="lutinvcs and modules" /> + <module fileurl="file://$PROJECT_DIR$/../../idea_files/lutinvcs-provider-svn.iml" filepath="$PROJECT_DIR$/../../idea_files/lutinvcs-provider-svn.iml" group="lutinvcs and modules" /> + <module fileurl="file://$PROJECT_DIR$/../../idea_files/lutinvcs-ui.iml" filepath="$PROJECT_DIR$/../../idea_files/lutinvcs-ui.iml" group="lutinvcs and modules" /> + </modules> + </component> + <component name="ProjectReloadState"> + <option name="STATE" value="0" /> + </component> + <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK"> + <output url="file://$PROJECT_DIR$/out" /> + </component> + <component name="ProjectView"> + <navigator proportions="" version="1" splitterProportion="0.5"> + <flattenPackages /> + <showMembers /> + <showModules /> + <showLibraryContents /> + <hideEmptyPackages /> + <abbreviatePackageNames /> + <showStructure /> + <autoscrollToSource /> + <autoscrollFromSource /> + <sortByType /> + </navigator> + </component> + <component name="PropertiesComponent"> + <property name="GoToFile.includeJavaFiles" value="false" /> + <property name="GoToClass.toSaveIncludeLibraries" value="false" /> + <property name="MemberChooser.sorted" value="false" /> + <property name="MemberChooser.showClasses" value="true" /> + <property name="GoToClass.includeLibraries" value="false" /> + <property name="MemberChooser.copyJavadoc" value="false" /> + </component> + <component name="ResourceManagerContainer"> + <option name="myResourceBundles"> + <value> + <list size="0" /> + </value> + </option> + </component> + <component name="RmicSettings"> + <option name="IS_EANABLED" value="false" /> + <option name="DEBUGGING_INFO" value="true" /> + <option name="GENERATE_NO_WARNINGS" value="false" /> + <option name="GENERATE_IIOP_STUBS" value="false" /> + <option name="ADDITIONAL_OPTIONS_STRING" value="" /> + </component> + <component name="RunManager"> + <configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false"> + <option name="MAIN_CLASS_NAME" /> + <option name="VM_PARAMETERS" /> + <option name="PROGRAM_PARAMETERS" /> + <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="ENABLE_SWING_INSPECTOR" value="false" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <module name="" /> + <envs /> + </configuration> + <configuration default="true" type="Remote" factoryName="Remote"> + <option name="USE_SOCKET_TRANSPORT" value="true" /> + <option name="SERVER_MODE" value="false" /> + <option name="SHMEM_ADDRESS" value="javadebug" /> + <option name="HOST" value="localhost" /> + <option name="PORT" value="5005" /> + </configuration> + <configuration default="true" type="Applet" factoryName="Applet"> + <module name="" /> + <option name="MAIN_CLASS_NAME" /> + <option name="HTML_FILE_NAME" /> + <option name="HTML_USED" value="false" /> + <option name="WIDTH" value="400" /> + <option name="HEIGHT" value="300" /> + <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" /> + <option name="VM_PARAMETERS" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + </configuration> + <configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false"> + <module name="" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="PACKAGE_NAME" /> + <option name="MAIN_CLASS_NAME" /> + <option name="METHOD_NAME" /> + <option name="TEST_OBJECT" value="class" /> + <option name="VM_PARAMETERS" /> + <option name="PARAMETERS" /> + <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <option name="ADDITIONAL_CLASS_PATH" /> + <option name="TEST_SEARCH_SCOPE"> + <value defaultName="wholeProject" /> + </option> + <envs /> + </configuration> + <list size="0" /> + <configuration name="<template>" type="WebApp" default="true" selected="false"> + <Host>localhost</Host> + <Port>5050</Port> + </configuration> + </component> + <component name="StarteamConfiguration"> + <option name="SERVER" value="" /> + <option name="PORT" value="49201" /> + <option name="USER" value="" /> + <option name="PASSWORD" value="" /> + <option name="PROJECT" value="" /> + <option name="VIEW" value="" /> + <option name="ALTERNATIVE_WORKING_PATH" value="" /> + <option name="LOCK_ON_CHECKOUT" value="false" /> + <option name="UNLOCK_ON_CHECKIN" value="false" /> + </component> + <component name="StructureViewFactory"> + <option name="AUTOSCROLL_MODE" value="true" /> + <option name="AUTOSCROLL_FROM_SOURCE" value="false" /> + <option name="ACTIVE_ACTIONS" value="" /> + </component> + <component name="SvnConfiguration"> + <option name="USER" value="" /> + <option name="PASSWORD" value="" /> + <option name="LAST_MERGED_REVISION" /> + <option name="UPDATE_RUN_STATUS" value="false" /> + <option name="UPDATE_RECURSIVELY" value="true" /> + <option name="MERGE_DRY_RUN" value="false" /> + <configuration useDefault="true">$PROJECT_DIR$/../../../.subversion</configuration> + </component> + <component name="TodoView"> + <todo-panel id="selected-file"> + <are-packages-shown value="false" /> + <are-modules-shown value="false" /> + <flatten-packages value="false" /> + <is-autoscroll-to-source value="true" /> + </todo-panel> + <todo-panel id="all"> + <are-packages-shown value="true" /> + <are-modules-shown value="false" /> + <flatten-packages value="false" /> + <is-autoscroll-to-source value="true" /> + </todo-panel> + <todo-panel id="default-changelist"> + <are-packages-shown value="false" /> + <are-modules-shown value="false" /> + <flatten-packages value="false" /> + <is-autoscroll-to-source value="false" /> + </todo-panel> + </component> + <component name="VcsDirectoryMappings"> + <mapping directory="" vcs="" /> + <mapping directory="$PROJECT_DIR$" vcs="svn" /> + </component> + <component name="VssConfiguration"> + <option name="CLIENT_PATH" value="" /> + <option name="SRCSAFEINI_PATH" value="" /> + <option name="USER_NAME" value="" /> + <option name="PWD" value="" /> + <CheckoutOptions> + <option name="COMMENT" value="" /> + <option name="DO_NOT_GET_LATEST_VERSION" value="false" /> + <option name="REPLACE_WRITABLE" value="false" /> + <option name="RECURSIVE" value="false" /> + </CheckoutOptions> + <CheckinOptions> + <option name="COMMENT" value="" /> + <option name="KEEP_CHECKED_OUT" value="false" /> + <option name="RECURSIVE" value="false" /> + </CheckinOptions> + <AddOptions> + <option name="STORE_ONLY_LATEST_VERSION" value="false" /> + <option name="CHECK_OUT_IMMEDIATELY" value="false" /> + </AddOptions> + <UndocheckoutOptions> + <option name="MAKE_WRITABLE" value="false" /> + <option name="REPLACE_LOCAL_COPY" value="2" /> + <option name="RECURSIVE" value="false" /> + </UndocheckoutOptions> + <GetOptions> + <option name="REPLACE_WRITABLE" value="0" /> + <option name="MAKE_WRITABLE" value="false" /> + <option name="ANSWER_NEGATIVELY" value="false" /> + <option name="ANSWER_POSITIVELY" value="false" /> + <option name="RECURSIVE" value="false" /> + <option name="VERSION" /> + </GetOptions> + </component> + <component name="WebServicesPlugin" addRequiredLibraries="true" /> +</project> + Added: trunk/lutinvcs/lutinvcs.iws =================================================================== --- trunk/lutinvcs/lutinvcs.iws (rev 0) +++ trunk/lutinvcs/lutinvcs.iws 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,1044 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project relativePaths="false" version="4"> + <component name="CCaseConfig"> + <option name="checkoutReserved" value="false" /> + <option name="markExternalChangeAsUpToDate" value="true" /> + <option name="checkInUseHijack" value="true" /> + <option name="useUcmModel" value="true" /> + <option name="isOffline" value="false" /> + <option name="synchOutside" value="false" /> + <option name="isHistoryResticted" value="true" /> + <option name="useIdenticalSwitch" value="true" /> + <option name="synchActivitiesOnRefresh" value="true" /> + <option name="lastScr" value="" /> + <option name="scrTextFileName" value="" /> + <option name="historyRevisionsNumber" value="4" /> + </component> + <component name="ChangeListManager"> + <list default="true" name="Default" comment=""> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/site/fr/rst/index.rst" afterPath="$PROJECT_DIR$/src/site/fr/rst/index.rst" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/site/fr/rst/devel/index.rst" afterPath="$PROJECT_DIR$/src/site/fr/rst/devel/index.rst" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/site/fr/rst/todo.rst" afterPath="$PROJECT_DIR$/src/site/fr/rst/todo.rst" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/site/site_fr.xml" afterPath="$PROJECT_DIR$/src/site/site_fr.xml" /> + </list> + <ignored path="lutinvcs.iws" /> + <ignored path=".idea/workspace.xml" /> + <ignored path="../lutinutil/target/" /> + </component> + <component name="ChangesViewManager" flattened_view="true" show_ignored="false" /> + <component name="Commander"> + <leftPanel /> + <rightPanel /> + <splitter proportion="0.5" /> + </component> + <component name="CompilerWorkspaceConfiguration"> + <option name="COMPILE_IN_BACKGROUND" value="true" /> + </component> + <component name="CreatePatchCommitExecutor"> + <option name="PATCH_PATH" value="" /> + <option name="REVERSE_PATCH" value="false" /> + </component> + <component name="DaemonCodeAnalyzer"> + <disable_hints /> + </component> + <component name="DebuggerManager"> + <breakpoint_any> + <breakpoint> + <option name="NOTIFY_CAUGHT" value="true" /> + <option name="NOTIFY_UNCAUGHT" value="true" /> + <option name="ENABLED" value="false" /> + <option name="LOG_ENABLED" value="false" /> + <option name="LOG_EXPRESSION_ENABLED" value="false" /> + <option name="SUSPEND_POLICY" value="SuspendAll" /> + <option name="COUNT_FILTER_ENABLED" value="false" /> + <option name="COUNT_FILTER" value="0" /> + <option name="CONDITION_ENABLED" value="false" /> + <option name="CLASS_FILTERS_ENABLED" value="false" /> + <option name="INSTANCE_FILTERS_ENABLED" value="false" /> + <option name="CONDITION" value="" /> + <option name="LOG_MESSAGE" value="" /> + </breakpoint> + <breakpoint> + <option name="NOTIFY_CAUGHT" value="true" /> + <option name="NOTIFY_UNCAUGHT" value="true" /> + <option name="ENABLED" value="false" /> + <option name="LOG_ENABLED" value="false" /> + <option name="LOG_EXPRESSION_ENABLED" value="false" /> + <option name="SUSPEND_POLICY" value="SuspendAll" /> + <option name="COUNT_FILTER_ENABLED" value="false" /> + <option name="COUNT_FILTER" value="0" /> + <option name="CONDITION_ENABLED" value="false" /> + <option name="CLASS_FILTERS_ENABLED" value="false" /> + <option name="INSTANCE_FILTERS_ENABLED" value="false" /> + <option name="CONDITION" value="" /> + <option name="LOG_MESSAGE" value="" /> + </breakpoint> + </breakpoint_any> + <breakpoint_rules /> + <ui_properties /> + </component> + <component name="ErrorTreeViewConfiguration"> + <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" /> + <option name="HIDE_WARNINGS" value="false" /> + </component> + <component name="FavoritesManager"> + <favorites_list name="lutinvcs" /> + </component> + <component name="FileEditorManager"> + <leaf> + <file leaf-file-name="pom.xml" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/pom.xml"> + <provider selected="true" editor-type-id="text-editor"> + <state line="218" column="26" selection-start="7953" selection-end="7953" vertical-scroll-proportion="0.4917647"> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="lutinvcs-provider-svn-en_GB.properties" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/lutinvcs-provider-svn/src/main/resources/i18n/lutinvcs-provider-svn-en_GB.properties"> + <provider selected="true" editor-type-id="text-editor"> + <state line="3" column="0" selection-start="198" selection-end="198" vertical-scroll-proportion="0.03815029"> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="pom.xml" pinned="false" current="true" current-in-tab="true"> + <entry file="file://$PROJECT_DIR$/lutinvcs-provider-svn/pom.xml"> + <provider selected="true" editor-type-id="text-editor"> + <state line="16" column="68" selection-start="603" selection-end="603" vertical-scroll-proportion="0.20705882"> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="lutinvcs-api-en_GB.properties" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/lutinvcs-api/src/main/resources/i18n/lutinvcs-api-en_GB.properties"> + <provider selected="true" editor-type-id="text-editor"> + <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="lutinvcs-core-en_GB.properties" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties"> + <provider selected="true" editor-type-id="text-editor"> + <state line="5" column="22" selection-start="356" selection-end="356" vertical-scroll-proportion="0.06358381"> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="lutinvcs-core-fr_FR.properties" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties"> + <provider selected="true" editor-type-id="text-editor"> + <state line="5" column="22" selection-start="359" selection-end="359" vertical-scroll-proportion="0.06358381"> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="VCSUpdateDialog.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSUpdateDialog.java"> + <provider selected="true" editor-type-id="text-editor"> + <state line="34" column="33" selection-start="2337" selection-end="2337" vertical-scroll-proportion="0.24588235"> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="VCSUpdateDialog.jaxx" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/lutinvcs-ui/src/main/uimodel/org/codelutin/vcs/ui/VCSUpdateDialog.jaxx"> + <provider selected="true" editor-type-id="text-editor"> + <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="pom.xml" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/lutinvcs-ui/pom.xml"> + <provider selected="true" editor-type-id="text-editor"> + <state line="50" column="19" selection-start="1863" selection-end="1863" vertical-scroll-proportion="0.41764706"> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="UITest.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java"> + <provider selected="true" editor-type-id="text-editor"> + <state line="24" column="0" selection-start="990" selection-end="990" vertical-scroll-proportion="0.1398844"> + <folding /> + </state> + </provider> + </entry> + </file> + </leaf> + </component> + <component name="FindManager"> + <FindUsagesManager> + <setting name="OPEN_NEW_TAB" value="false" /> + </FindUsagesManager> + </component> + <component name="HierarchyBrowserManager"> + <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" /> + <option name="SORT_ALPHABETICALLY" value="false" /> + <option name="HIDE_CLASSES_WHERE_METHOD_NOT_IMPLEMENTED" value="false" /> + </component> + <component name="MavenCore"> + <option name="localRepository" value="/var/local/m2/repository" /> + <option name="mavenHome" value="/usr/local/java/apache-maven-2.0.8" /> + <option name="mavenSettingsFile" value="/usr/local/java/apache-maven-2.0.8/conf/settings.xml" /> + <option name="produceExceptionErrorMessages" value="true" /> + <option name="usePluginRegistry" value="true" /> + </component> + <component name="MavenImportPreferences"> + <option name="myImporterSettings"> + <MavenImporterSettings> + <option name="autoSync" value="true" /> + <option name="createModuleGroups" value="true" /> + <option name="dedicatedModuleDir" value="$PROJECT_DIR$/../../idea_files" /> + <option name="lookForNested" value="true" /> + </MavenImporterSettings> + </option> + </component> + <component name="MavenProjectNavigator"> + <option name="filterStandardPhases" value="true" /> + <option name="showIgnored" value="false" /> + </component> + <component name="MavenProjectsState"> + <option name="activeProfiles"> + <map> + <entry key="$PROJECT_DIR$/../jaxx/pom.xml"> + <value> + <set> + <option value="project" /> + </set> + </value> + </entry> + <entry key="$PROJECT_DIR$/../lutinutil/pom.xml"> + <value> + <set> + <option value="project" /> + </set> + </value> + </entry> + <entry key="$PROJECT_DIR$/pom.xml"> + <value> + <set> + <option value="project" /> + </set> + </value> + </entry> + </map> + </option> + </component> + <component name="MavenRunner"> + <option name="jreName" value="1.6" /> + <option name="runMavenInBackground" value="true" /> + <option name="useMavenEmbedder" value="false" /> + </component> + <component name="ModuleEditorState"> + <option name="LAST_EDITED_MODULE_NAME" /> + <option name="LAST_EDITED_TAB_NAME" /> + </component> + <component name="ProjectLevelVcsManager"> + <OptionsSetting value="true" id="Add" /> + <OptionsSetting value="true" id="Remove" /> + <OptionsSetting value="true" id="Checkout" /> + <OptionsSetting value="true" id="Update" /> + <OptionsSetting value="true" id="Status" /> + <OptionsSetting value="true" id="Edit" /> + <OptionsSetting value="true" id="Undo Check Out" /> + <OptionsSetting value="true" id="Get Latest Version" /> + <ConfirmationsSetting value="0" id="Add" /> + <ConfirmationsSetting value="0" id="Remove" /> + </component> + <component name="ProjectPane"> + <subPane> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs and modules" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs and modules" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs-provider-svn" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs and modules" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs-provider-svn" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-provider-svn" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs and modules" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs-provider-cvs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs and modules" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs-provider-cvs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-provider-cvs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs and modules" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs-provider-cvs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-provider-cvs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-provider-cvs/src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-provider-cvs/src/test" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs and modules" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs-provider-cvs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-provider-cvs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-provider-cvs/src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs and modules" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs-provider-cvs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-provider-cvs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-provider-cvs/src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-provider-cvs/src/main" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-provider-cvs/src/main/resources" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs and modules" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs-provider-cvs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-provider-cvs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-provider-cvs/src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-provider-cvs/src/main" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-provider-cvs/src/main/resources" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-provider-cvs/src/main/resources/i18n" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs and modules" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs-provider-cvs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-provider-cvs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-provider-cvs/src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-provider-cvs/src/main" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs and modules" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs-api" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs and modules" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs-api" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-api" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs and modules" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs-api" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-api" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-api/src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs and modules" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs-api" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-api" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-api/src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-api/src/main" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-api/src/main/resources" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs and modules" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs-api" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-api" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-api/src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-api/src/main" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-api/src/main/resources" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-api/src/main/resources/i18n" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs and modules" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs-api" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-api" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-api/src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/lutinvcs-api/src/main" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs and modules" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs and modules" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs and modules" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:/home/tony/PROJET/lutinlib/lutinvcs/src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + </subPane> + </component> + <component name="ProjectReloadState"> + <option name="STATE" value="0" /> + </component> + <component name="ProjectView"> + <navigator currentView="ProjectPane" proportions="0.16666667" version="1" splitterProportion="0.5"> + <flattenPackages ProjectPane="false" /> + <showMembers /> + <showModules /> + <showLibraryContents /> + <hideEmptyPackages ProjectPane="true" /> + <abbreviatePackageNames /> + <showStructure ProjectPane="false" /> + <autoscrollToSource /> + <autoscrollFromSource ProjectPane="true" /> + <sortByType ProjectPane="true" /> + </navigator> + </component> + <component name="PropertiesComponent"> + <property name="GoToFile.includeJavaFiles" value="false" /> + <property name="GoToClass.toSaveIncludeLibraries" value="false" /> + <property name="RunManagerConfig.showSettingsBeforeRunnig" value="false" /> + <property name="MemberChooser.sorted" value="false" /> + <property name="MemberChooser.showClasses" value="true" /> + <property name="GoToClass.includeLibraries" value="false" /> + <property name="MemberChooser.copyJavadoc" value="false" /> + </component> + <component name="RecentsManager"> + <key name="CopyClassDialog.RECENTS_KEY"> + <recent name="" /> + </key> + <key name="CreateClassDialog.RecentsKey"> + <recent name="org.codelutin.vcs" /> + </key> + <key name="MoveClassesOrPackagesDialog.RECENTS_KEY"> + <recent name="org.codelutin.vcs.ui" /> + <recent name="org.codelutin.vcs" /> + <recent name="org.codelutin.vcs.impl.cvs" /> + <recent name="org.codelutin.vcs.impl.svn" /> + <recent name="fr.ifremer.isisfish.versionning.vcsSvn" /> + </key> + </component> + <component name="RunManager" selected="Application.UITest"> + <configuration default="true" type="TestNG" factoryName="TestNG" enabled="false" merge="false"> + <module name="" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="SUITE_NAME" /> + <option name="PACKAGE_NAME" /> + <option name="MAIN_CLASS_NAME" /> + <option name="METHOD_NAME" /> + <option name="GROUP_NAME" /> + <option name="TEST_OBJECT" value="CLASS" /> + <option name="VM_PARAMETERS" /> + <option name="PARAMETERS" /> + <option name="WORKING_DIRECTORY" /> + <option name="OUTPUT_DIRECTORY" /> + <option name="ANNOTATION_TYPE" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <option name="ADDITIONAL_CLASS_PATH" /> + <option name="TEST_SEARCH_SCOPE"> + <value defaultName="wholeProject" /> + </option> + <option name="PROPERTIES_FILE" /> + <envs /> + <properties /> + <listeners /> + <method> + <option name="Make" value="true" /> + </method> + </configuration> + <configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false"> + <option name="MAIN_CLASS_NAME" /> + <option name="VM_PARAMETERS" /> + <option name="PROGRAM_PARAMETERS" /> + <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="ENABLE_SWING_INSPECTOR" value="false" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <module name="" /> + <envs /> + <method> + <option name="Make" value="true" /> + </method> + </configuration> + <configuration default="true" type="Remote" factoryName="Remote"> + <option name="USE_SOCKET_TRANSPORT" value="true" /> + <option name="SERVER_MODE" value="false" /> + <option name="SHMEM_ADDRESS" value="javadebug" /> + <option name="HOST" value="localhost" /> + <option name="PORT" value="5005" /> + </configuration> + <configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false"> + <module name="" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="PACKAGE_NAME" /> + <option name="MAIN_CLASS_NAME" /> + <option name="METHOD_NAME" /> + <option name="TEST_OBJECT" value="class" /> + <option name="VM_PARAMETERS" /> + <option name="PARAMETERS" /> + <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <option name="ADDITIONAL_CLASS_PATH" /> + <option name="TEST_SEARCH_SCOPE"> + <value defaultName="wholeProject" /> + </option> + <envs /> + <method> + <option name="Make" value="true" /> + </method> + </configuration> + <configuration default="true" type="Applet" factoryName="Applet"> + <module name="" /> + <option name="MAIN_CLASS_NAME" /> + <option name="HTML_FILE_NAME" /> + <option name="HTML_USED" value="false" /> + <option name="WIDTH" value="400" /> + <option name="HEIGHT" value="300" /> + <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" /> + <option name="VM_PARAMETERS" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + </configuration> + <configuration default="false" name="UITest" type="Application" factoryName="Application" enabled="false" merge="false"> + <option name="MAIN_CLASS_NAME" value="org.codelutin.vcs.ui.UITest" /> + <option name="VM_PARAMETERS" value="" /> + <option name="PROGRAM_PARAMETERS" value="" /> + <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/lutinvcs-ui" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" value="" /> + <option name="ENABLE_SWING_INSPECTOR" value="false" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <module name="lutinvcs-ui" /> + <envs /> + <RunnerSettings RunnerId="Run" /> + <ConfigurationWrapper RunnerId="Run" /> + <method> + <option name="Make" value="true" /> + </method> + </configuration> + <list size="1"> + <item index="0" class="java.lang.String" itemvalue="Application.UITest" /> + </list> + <configuration name="<template>" type="WebApp" default="true" selected="false"> + <Host>localhost</Host> + <Port>5050</Port> + </configuration> + </component> + <component name="StarteamConfiguration"> + <option name="SERVER" value="" /> + <option name="PORT" value="49201" /> + <option name="USER" value="" /> + <option name="PASSWORD" value="" /> + <option name="PROJECT" value="" /> + <option name="VIEW" value="" /> + <option name="ALTERNATIVE_WORKING_PATH" value="" /> + <option name="LOCK_ON_CHECKOUT" value="false" /> + <option name="UNLOCK_ON_CHECKIN" value="false" /> + </component> + <component name="StructureViewFactory"> + <option name="AUTOSCROLL_MODE" value="true" /> + <option name="AUTOSCROLL_FROM_SOURCE" value="false" /> + <option name="ACTIVE_ACTIONS" value="" /> + </component> + <component name="SvnConfiguration"> + <option name="USER" value="" /> + <option name="PASSWORD" value="" /> + <option name="LAST_MERGED_REVISION" /> + <option name="UPDATE_RUN_STATUS" value="false" /> + <option name="UPDATE_RECURSIVELY" value="true" /> + <option name="MERGE_DRY_RUN" value="false" /> + <configuration useDefault="true">$PROJECT_DIR$/../../../.subversion</configuration> + </component> + <component name="TodoView" selected-index="0"> + <todo-panel id="selected-file"> + <are-packages-shown value="false" /> + <are-modules-shown value="false" /> + <flatten-packages value="false" /> + <is-autoscroll-to-source value="true" /> + </todo-panel> + <todo-panel id="all"> + <are-packages-shown value="true" /> + <are-modules-shown value="false" /> + <flatten-packages value="false" /> + <is-autoscroll-to-source value="true" /> + </todo-panel> + <todo-panel id="default-changelist"> + <are-packages-shown value="false" /> + <are-modules-shown value="false" /> + <flatten-packages value="false" /> + <is-autoscroll-to-source value="false" /> + </todo-panel> + </component> + <component name="ToolWindowManager"> + <frame x="-1" y="25" width="1682" height="1030" extended-state="6" /> + <editor active="true" /> + <layout> + <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" /> + <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32932165" order="0" /> + <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="0" /> + <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="5" /> + <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32932165" order="8" /> + <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="10" /> + <window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="2" /> + <window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="1" /> + <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" /> + <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32932165" order="4" /> + <window_info id="TODO" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32965687" order="7" /> + <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" /> + <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="4" /> + <window_info id="Maven projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="FLOATING" visible="true" weight="0.32965687" order="2" x="2542" y="0" width="538" height="576" /> + <window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" /> + <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.38909313" order="0" /> + <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="5" /> + <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="6" /> + <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="13" /> + <window_info id="Duplicates" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="6" /> + <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32932165" order="9" /> + <window_info id="Maven Runner Output" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3654267" order="1" /> + <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="12" /> + <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" /> + <window_info id="Maven Importer Output" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32932165" order="8" /> + <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" /> + <window_info id="EJB" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="11" /> + </layout> + </component> + <component name="VcsManagerConfiguration"> + <option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" /> + <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" /> + <option name="PERFORM_UPDATE_IN_BACKGROUND" value="false" /> + <option name="PERFORM_COMMIT_IN_BACKGROUND" value="false" /> + <option name="PERFORM_EDIT_IN_BACKGROUND" value="true" /> + <option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" /> + <option name="FORCE_NON_EMPTY_COMMENT" value="false" /> + <option name="LAST_COMMIT_MESSAGE" /> + <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" /> + <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" /> + <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" /> + <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" /> + <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" /> + <option name="ACTIVE_VCS_NAME" /> + <option name="UPDATE_GROUP_BY_PACKAGES" value="false" /> + <option name="UPDATE_GROUP_BY_CHANGELIST" value="false" /> + <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" /> + <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" /> + </component> + <component name="VssConfiguration"> + <option name="CLIENT_PATH" value="" /> + <option name="SRCSAFEINI_PATH" value="" /> + <option name="USER_NAME" value="" /> + <option name="PWD" value="" /> + <CheckoutOptions> + <option name="COMMENT" value="" /> + <option name="DO_NOT_GET_LATEST_VERSION" value="false" /> + <option name="REPLACE_WRITABLE" value="false" /> + <option name="RECURSIVE" value="false" /> + </CheckoutOptions> + <CheckinOptions> + <option name="COMMENT" value="" /> + <option name="KEEP_CHECKED_OUT" value="false" /> + <option name="RECURSIVE" value="false" /> + </CheckinOptions> + <AddOptions> + <option name="STORE_ONLY_LATEST_VERSION" value="false" /> + <option name="CHECK_OUT_IMMEDIATELY" value="false" /> + </AddOptions> + <UndocheckoutOptions> + <option name="MAKE_WRITABLE" value="false" /> + <option name="REPLACE_LOCAL_COPY" value="2" /> + <option name="RECURSIVE" value="false" /> + </UndocheckoutOptions> + <GetOptions> + <option name="REPLACE_WRITABLE" value="0" /> + <option name="MAKE_WRITABLE" value="false" /> + <option name="ANSWER_NEGATIVELY" value="false" /> + <option name="ANSWER_POSITIVELY" value="false" /> + <option name="RECURSIVE" value="false" /> + <option name="VERSION" /> + </GetOptions> + </component> + <component name="antWorkspaceConfiguration"> + <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" /> + <option name="FILTER_TARGETS" value="false" /> + </component> + <component name="editorHistoryManager"> + <entry file="file://$PROJECT_DIR$/lutinvcs-api/src/main/resources/i18n/lutinvcs-api-fr_FR.properties"> + <provider selected="true" editor-type-id="text-editor"> + <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/lutinvcs-api/src/main/resources/i18n/lutinvcs-api-en_GB.properties"> + <provider selected="true" editor-type-id="text-editor"> + <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties"> + <provider selected="true" editor-type-id="text-editor"> + <state line="5" column="22" selection-start="356" selection-end="356" vertical-scroll-proportion="0.06358381"> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties"> + <provider selected="true" editor-type-id="text-editor"> + <state line="5" column="22" selection-start="359" selection-end="359" vertical-scroll-proportion="0.06358381"> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSUpdateDialog.java"> + <provider selected="true" editor-type-id="text-editor"> + <state line="34" column="33" selection-start="2337" selection-end="2337" vertical-scroll-proportion="0.24588235"> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/lutinvcs-ui/src/main/uimodel/org/codelutin/vcs/ui/VCSUpdateDialog.jaxx"> + <provider selected="true" editor-type-id="text-editor"> + <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/lutinvcs-ui/pom.xml"> + <provider selected="true" editor-type-id="text-editor"> + <state line="50" column="19" selection-start="1863" selection-end="1863" vertical-scroll-proportion="0.41764706"> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java"> + <provider selected="true" editor-type-id="text-editor"> + <state line="24" column="0" selection-start="990" selection-end="990" vertical-scroll-proportion="0.1398844"> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/pom.xml"> + <provider selected="true" editor-type-id="text-editor"> + <state line="218" column="26" selection-start="7953" selection-end="7953" vertical-scroll-proportion="0.4917647"> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/lutinvcs-provider-svn/src/main/resources/i18n/lutinvcs-provider-svn-en_GB.properties"> + <provider selected="true" editor-type-id="text-editor"> + <state line="3" column="0" selection-start="198" selection-end="198" vertical-scroll-proportion="0.03815029"> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/lutinvcs-provider-svn/pom.xml"> + <provider selected="true" editor-type-id="text-editor"> + <state line="16" column="68" selection-start="603" selection-end="603" vertical-scroll-proportion="0.20705882"> + <folding /> + </state> + </provider> + </entry> + </component> +</project> + Added: trunk/lutinvcs/pom.xml =================================================================== --- trunk/lutinvcs/pom.xml (rev 0) +++ trunk/lutinvcs/pom.xml 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,392 @@ +<?xml version="1.0" encoding="UTF-8"?> +<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> + + <!-- ************************************************************* --> + <!-- *** POM Relationships *************************************** --> + <!-- ************************************************************* --> + + <parent> + <groupId>lutinlib</groupId> + <artifactId>lutinproject</artifactId> + <version>2.3</version> + </parent> + + <groupId>lutinlib.vcs</groupId> + <artifactId>lutinvcs</artifactId> + + <modules> + <module>lutinvcs-api</module> + <module>lutinvcs-core</module> + <module>lutinvcs-provider-cvs</module> + <module>lutinvcs-provider-svn</module> + <module>lutinvcs-ui</module> + </modules> + + <!--dependencies> + <dependency> + <groupId>lutinlib</groupId> + <artifactId>lutinutil</artifactId> + <version>0.29-SNAPSHOT</version> + <scope>compile</scope> + </dependency> + </dependencies--> + + <!-- ************************************************************* --> + <!-- *** Project Information ************************************* --> + <!-- ************************************************************* --> + <name>Lutinvcs pom</name> + <version>0.1-SNAPSHOT</version> + <description>Versionning Concurrent System lutin library main pom</description> + <inceptionYear>2008</inceptionYear> + + <!-- Developpers, contributors... --> + + <!-- ************************************************************* --> + <!-- *** Build Settings ****************************************** --> + <!-- ************************************************************* --> + + <packaging>pom</packaging> + + <properties> + + <!-- id du projet du labs --> + <labs.id>12</labs.id> + + <labs.project>lutinutil</labs.project> + + <!-- current version --> + <current.version>0.1-SNAPSHOT</current.version> + + <!-- par defaut, mode non verbeux --> + <!--maven.verbose>false</maven.verbose--> + <!-- source base dir (ne respecte pas la convention maven2) --> + <!--maven.src.dir>${basedir}/src/main</maven.src.dir--> + <!-- compile with ? --> + <maven.compile.source>1.6</maven.compile.source> + <maven.compile.target>1.6</maven.compile.target> + <!-- compilation encondig --> + <!--maven.compile.encoding>ISO-8859-15</maven.compile.encoding--> + <!-- Lists URL --> + <labs.lists> + http://lists.labs.libre-entreprise.org/mailman/listinfo/lutinutil + </labs.lists> + + <!-- maven will suffix with /${pom.artifactId} --> + <maven.scm.developerConnection>scm:svn:svn+ssh://tchemit@${labs.host}/svnroot/buix/trunk</maven.scm.developerConnection> + + <!-- maven will suffix with /${pom.artifactId} --> + <maven.scm.connection>scm:svn:svn:anonymous@${labs.host}/svnroot/buix/trunk</maven.scm.connection> + + </properties> + + <profiles> + <profile> + <id>project</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <properties> + <!-- test (par defaut, on ne les execute pas) --> + <maven.test.skip>true</maven.test.skip> + <maven.reports.generate>false</maven.reports.generate> + </properties> + </profile> + <profile> + <id>tests</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <properties> + <!-- test (par defaut, on ne les execute pas) --> + <maven.test.skip>false</maven.test.skip> + <maven.reports.generate>false</maven.reports.generate> + </properties> + </profile> + <profile> + <id>site</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <properties> + <!-- test (par defaut, on ne les execute pas) --> + <maven.test.skip>false</maven.test.skip> + <maven.reports.generate>true</maven.reports.generate> + </properties> + </profile> + </profiles> + + + <!--issueManagement> + <system>gforge</system> + <url> + https://labs.libre-entreprise.org/tracker/?group_id=12 + </url> + </issueManagement--> + + <!--licenses> + <license> + <name>GPL</name> + <url>http://www.gnu.org/copyleft/gpl.html</url> + <distribution>repo</distribution> + </license> + </licenses--> + + <!--Source control management--> + <!--scm> + <connection> + scm:svn:svn://labs.libre-entreprise.org/svnroot/simexplorer-si + </connection> + <developerConnection> + scm:svn:svn+ssh://${username}@labs.libre-entreprise.org/svnroot/simexplorer-si + </developerConnection> + <url> + https://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/?root=simexplor... + </url> + </scm--> + + <!--organization> + <name>Codelutin</name> + <url>http://www.codelutin.com/</url> + </organization--> + + <build> + <plugins> + <!--plugin> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <skip>${maven.test.skip}</skip> + <excludes> + <exclude>**/*MassTestCase.java</exclude> + </excludes> + </configuration> + </plugin--> + <!--plugin> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>${maven.compile.source}</source> + <target>${maven.compile.target}</target> + <encoding>${maven.compile.encoding}</encoding> + </configuration> + </plugin--> + <!--plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <configuration> + <aggregate>true</aggregate> + <encoding>${maven.compile.encoding}</encoding> + </configuration> + <executions> + <execution> + <phase>verify</phase> + <goals> + <goal>jar</goal> + </goals> + </execution> + </executions> + </plugin--> + <!--plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <executions> + <execution> + <phase>verify</phase> + <goals> + <goal>jar</goal> + </goals> + </execution> + </executions> + </plugin--> + <plugin> + <groupId>lutinplugin</groupId> + <artifactId>maven-i18n-plugin</artifactId> + <configuration> + <bundles> + <param>fr_FR</param> + <param>en_GB</param> + </bundles> + <src>${maven.src.dir}/main/resources/i18n</src> + <defaultBasedir>${maven.src.dir}/main/java</defaultBasedir> + <keysModifier>false</keysModifier> + <keepBackup>false</keepBackup> + </configuration> + </plugin> + + <!--plugin> + <groupId>lutinplugin</groupId> + <artifactId>maven-jrst-plugin</artifactId> + <version>0.8.1-SNAPSHOT</version> + <executions> + <execution> + <phase>test</phase> + <goals> + <goal>jrst</goal> + </goals> + </execution> + </executions> + <configuration> + <inputEncoding>${maven.compile.encoding}</inputEncoding> + <outputEncoding>${maven.compile.encoding}</outputEncoding> + <directoryIn>${basedir}/src/site</directoryIn> + <directoryOut>${basedir}/target/generated-site/xdoc</directoryOut> + <verbose>${maven.verbose}</verbose> + <overwrite>true</overwrite> + </configuration> + </plugin--> + <!--plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <configuration> + <outputEncoding>${maven.compile.encoding}</outputEncoding> + <locales>fr</locales> + <siteDirectory>src/site</siteDirectory> + <generateReports>false</generateReports> + <xdocDirectory>${basedir}/target/generated-site/xdoc/fr/rst</xdocDirectory> + </configuration> + </plugin--> + </plugins> + </build> + + + + <!--repositories> + <repository> + <id>java.net</id> + <url>http://download.java.net/maven/2</url> + </repository> + <repository> + <id>codelutin-lib</id> + <url> + http://lutinbuilder.labs.libre-entreprise.org/maven2 + </url> + </repository> + </repositories> + + <pluginRepositories> + <pluginRepository> + <id>codelutin-plugin</id> + <url> + http://lutinbuilder.labs.libre-entreprise.org/maven2 + </url> + </pluginRepository> + </pluginRepositories--> + + <!--distributionManagement> + <repository> + <id>labs</id> + <url> + scp://labs.libre-entreprise.org/home/groups/lutinbuilder/htdocs/maven2 + </url> + </repository> + <site> + <id>labs</id> + <url> + scp://labs.libre-entreprise.org/home/groups/lutinvcs/htdocs/ + </url> + </site> + </distributionManagement--> + + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>lutinlib.vcs</groupId> + <artifactId>lutinvcs-api</artifactId> + <version>${current.version}</version> + </dependency> + <dependency> + <groupId>lutinlib.vcs</groupId> + <artifactId>lutinvcs-core</artifactId> + <version>${current.version}</version> + </dependency> + <dependency> + <groupId>lutinlib.vcs</groupId> + <artifactId>lutinvcs-ui</artifactId> + <version>${current.version}</version> + </dependency> + <dependency> + <groupId>lutinlib.vcs</groupId> + <artifactId>lutinvcs-provider-cvs</artifactId> + <version>${current.version}</version> + </dependency> + <dependency> + <groupId>lutinlib.vcs</groupId> + <artifactId>lutinvcs-provider-svn</artifactId> + <version>${current.version}</version> + </dependency> + <dependency> + <groupId>lutinlib.vcs</groupId> + <artifactId>lutinvcs-site</artifactId> + <version>${current.version}</version> + </dependency> + + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.3</version> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.1</version> + </dependency> + <!-- librairie des widgets lutin --> + <dependency> + <groupId>lutinlib</groupId> + <artifactId>lutinwidget</artifactId> + <version>0.10-SNAPSHOT</version> + <scope>compile</scope> + </dependency> + <!-- librairie Jaxx --> + <dependency> + <groupId>lutinlib</groupId> + <artifactId>jaxx</artifactId> + <version>1.0.4-SNAPSHOT</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.netbeans.lib</groupId> + <artifactId>cvsclient</artifactId> + <version>20051129</version> + </dependency> + <dependency> + <groupId>sshtools</groupId> + <artifactId>j2ssh-common</artifactId> + <version>0.2.2</version> + </dependency> + <dependency> + <groupId>sshtools</groupId> + <artifactId>j2ssh-core</artifactId> + <version>0.2.2</version> + </dependency> + <dependency> + <groupId>org.tmatesoft</groupId> + <artifactId>svnkit</artifactId> + <version>1.1.2</version> + </dependency> + <!-- Plugins --> + <dependency> + <groupId>lutinplugin</groupId> + <artifactId>maven-i18n-plugin</artifactId> + <version>0.2-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>lutinplugin</groupId> + <artifactId>maven-jaxx-plugin</artifactId> + <version>0.2-SNAPSHOT</version> + </dependency> + </dependencies> + </dependencyManagement> + + <!-- the project is a module in a labs project (lutinutil), so we have to override + this property (see in the parent pom for more explanation) + --> + <scm> + <developerConnection>${maven.scm.developerConnection}</developerConnection> + <!--url>${maven.scm.url}</url--> + </scm> + +</project> Added: trunk/lutinvcs/src/site/fr/rst/devel/index.rst =================================================================== --- trunk/lutinvcs/src/site/fr/rst/devel/index.rst (rev 0) +++ trunk/lutinvcs/src/site/fr/rst/devel/index.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,5 @@ +==================== +Lutin vcs libray dev +==================== + +TODO Added: trunk/lutinvcs/src/site/fr/rst/index.rst =================================================================== --- trunk/lutinvcs/src/site/fr/rst/index.rst (rev 0) +++ trunk/lutinvcs/src/site/fr/rst/index.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,5 @@ +================ +Lutin vcs libray +================ + +TODO \ No newline at end of file Added: trunk/lutinvcs/src/site/fr/rst/todo.rst =================================================================== --- trunk/lutinvcs/src/site/fr/rst/todo.rst (rev 0) +++ trunk/lutinvcs/src/site/fr/rst/todo.rst 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,4 @@ +=============== +Lutinvcs - TODO +=============== + Added: trunk/lutinvcs/src/site/site_fr.xml =================================================================== --- trunk/lutinvcs/src/site/site_fr.xml (rev 0) +++ trunk/lutinvcs/src/site/site_fr.xml 2008-03-31 17:02:25 UTC (rev 234) @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<project name="simexplorer-si"> + + <skin> + <groupId>lutinlib</groupId> + <artifactId>lutin-site-skin</artifactId> + <version>0.1</version> + </skin> + + <bannerLeft> + <name>Librairie Codelutin Versionning Concurrent System</name> + </bannerLeft> + + <bannerRight> + <src> + http://www.codelutin.com/images/lutinorange-codelutin.png + </src> + <href>http://www.codelutin.com</href> + </bannerRight> + + <poweredBy> + <logo href="http://docutils.sourceforge.net/rst.html" + img="/images/restructuredtext-logo.png" name="reStructuredText"/> + </poweredBy> + + <body> + <links> + <item name="Code Lutin" href="http://www.codelutin.com/"/> + <item name="Labs" href="http://labs.libre-entreprise.org/"/> + <item name="[fr" + href="http://lutinlib.labs.libre-entreprise.org/lutinvcs/index.html"/> + <item name="en]" + href="http://lutinlib.labs.libre-entreprise.org/lutinvcs/en/index.html"/> + </links> + + <menu name="Utilisation"> + <item href="/index.html" name="Présentation"/> + <item href="/todo.html" name="Reste à faire"/> + </menu> + + + + <menu ref="modules" /> + + <menu name="Développement"> + <item href="/devel/index.html" + name="Présentation"> + </item> + </menu> + + <menu name="Liens"> + <item href="http://java.sun.com/j2se" + name="Le site Java de Sun"> + </item> + <item href="https://labs.libre-entreprise.org/projects/buix/" + name="buix"> + </item> + </menu> + + <menu ref="reports" /> + + </body> +</project>
participants (1)
-
tchemit@users.labs.libre-entreprise.org