Jaxx-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- 3898 discussions
[Buix-commits] r397 - in trunk/lutinvcs/lutinvcs-ui-jaxx: . src/main/uimodel/org/codelutin/vcs/ui
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 13:05:33 +0000 (Sun, 06 Apr 2008)
New Revision: 397
Modified:
trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx
Log:
new module : ui-pre-jaxx
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-06 13:05:15 UTC (rev 396)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-06 13:05:33 UTC (rev 397)
@@ -89,10 +89,15 @@
<scope>compile</scope>
</dependency>
<dependency>
+ <groupId>lutinlib.vcs</groupId>
+ <artifactId>lutinvcs-ui-pre-jaxx</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <!--dependency>
<groupId>lutinlib</groupId>
<artifactId>jaxx</artifactId>
<scope>compile</scope>
- </dependency>
+ </dependency-->
</dependencies>
</project>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx 2008-04-06 13:05:15 UTC (rev 396)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx 2008-04-06 13:05:33 UTC (rev 397)
@@ -7,10 +7,11 @@
import org.codelutin.vcs.ui.model.ConfirmUIModel ;
public JConfirmUI(AbstractConfirmUIHandler handler) {
+
super(handler,new ConfirmUIModel());
Action acceptAction= new AbstractAction("accept") {
- private static final long serialVersionUID = -869095664995763055L;
+ private static final long serialVersionUID = 1L;
public void actionPerformed(ActionEvent e) {
getHandler().doAction(getCommitMessage().getText(),getModel().getModel());
}
@@ -18,10 +19,12 @@
accept.setAction((acceptAction));
}
+ @Override
protected AbstractConfirmUIHandler getHandler() {
return (AbstractConfirmUIHandler) super.getHandler();
}
+ @Override
public ConfirmUIModel getModel() {
return (ConfirmUIModel) super.getModel();
}
@@ -80,3 +83,4 @@
</row>
</Table>
</org.codelutin.vcs.ui.AbstractUI>
+
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 13:05:15 UTC (rev 396)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 13:05:33 UTC (rev 397)
@@ -1,74 +1,14 @@
-<JDialog title='lutinvcs.diff.title' id='diffui' defaultCloseOperation='DISPOSE_ON_CLOSE'>
+<org.codelutin.vcs.ui.AbstractDiffUI title='lutinvcs.diff.title' id='diffui' defaultCloseOperation='DISPOSE_ON_CLOSE'>
<style source="common.css"/>
<script>
-
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
- import org.codelutin.vcs.ui.handler.AbstractDiffUIHandler;
- import org.codelutin.vcs.ui.VCSUIConstants;
- protected AbstractDiffUIHandler handler;
-
- public JTable getTable(String modelName) {
- return (JTable) get$objectMap().get(modelName+"Table");
+ public JDiffUI(org.codelutin.vcs.ui.handler.AbstractDiffUIHandler handler) {
+ super(handler,new org.codelutin.vcs.ui.model.DiffUIModel());
}
-
- @Override
- public void setVisible(boolean b) {
- if (getModel().getLocation() == null) {
- // first launch, no tab model selected,choose one
- allTab.doClick();
- }
- super.setVisible(b);
- }
-
- public JDiffUI(AbstractDiffUIHandler handler) {
- this.handler =handler;
- }
-
- protected AbstractDiffUIHandler getHandler() {
- return handler;
- }
-
- protected void setHandler(AbstractDiffUIHandler handler) {
- this.handler = handler;
- }
-
- protected void selectTab(VCSEntryLocation location) {
- getModel().setLocation(location);
- }
-
- protected void selectFile(JTable table) {
- //model.setFileModel(model.getModel().getData(table.getSelectionModel())[0]);
- }
-
- protected void doAction(VCSAction action) {
- model.doAction(action);
- }
-
- protected void gotoNextDiff() {
- handler.gotoNextDiff();
- }
-
- protected void gotoPreviousDiff() {
- handler.gotoPreviousDiff();
- }
-
- Action quitAction;
- JRootPane rootPane = diffui.getRootPane();
- //rootPane.setDefaultButton(quit);
- quitAction = new AbstractAction("quit") {
- private static final long serialVersionUID = -869095664995763057L;
- public void actionPerformed(ActionEvent e) {
- diffui.dispose();
- }
- };
- rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"),"quit");
- rootPane.getActionMap().put("quit", quitAction);
</script>
- <org.codelutin.vcs.ui.model.DiffUIModel id="model"/>
-
<java.awt.CardLayout id='cardLayout'/>
<Table>
@@ -78,15 +18,15 @@
<JToggleButton id='allTab' selected='true' buttonGroup='tabs' mnemonic="A"
toolTipText="lutinvcs.tabs.diff.tooltip.all"
icon='{createImageIcon("remote_vs_local.png")}'
- onActionPerformed='selectTab(VCSEntryLocation.ALL)'/>
+ onActionPerformed='setLocation(VCSEntryLocation.ALL)'/>
<JToggleButton id='localTab' selected='false' buttonGroup='tabs' mnemonic="L"
toolTipText="lutinvcs.tabs.diff.tooltip.local"
icon='{createImageIcon("local_vs_local.png")}'
- onActionPerformed='selectTab(VCSEntryLocation.LOCAL)'/>
+ onActionPerformed='setLocation(VCSEntryLocation.LOCAL)'/>
<JToggleButton id='remoteTab' selected='false' buttonGroup='tabs' mnemonic="R"
icon='{createImageIcon("remote_vs_remote.png")}'
toolTipText="lutinvcs.tabs.diff.tooltip.remote"
- onActionPerformed='selectTab(VCSEntryLocation.REMOTE)'/>
+ onActionPerformed='setLocation(VCSEntryLocation.REMOTE)'/>
<JButton id='nextDiff' toolTipText="lutinvcs.action.tooltip.nextDiff"
@@ -135,23 +75,5 @@
</JPanel>
</cell>
</row>
- <!--row>
- <cell fill='both'>
- <JToolBar>
- <Table insets='0,0,0,0'>
- <row fill='both' anchor='west'>
- <cell fill='both' weightx='2'>
- <JLabel id="label"/>
- </cell>
- </row>
- <row fill='both' anchor='east'>
- <cell fill='both'>
- <JProgressBar id="progress"/>
- </cell>
- </row>
- </Table>
- </JToolBar>
- </cell>
- </row-->
</Table>
-</JDialog>
+</org.codelutin.vcs.ui.AbstractDiffUI>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx 2008-04-06 13:05:15 UTC (rev 396)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx 2008-04-06 13:05:33 UTC (rev 397)
@@ -1,61 +1,23 @@
-<org.codelutin.vcs.ui.AbstractUI title='lutinvcs.synch.title' modal="true" defaultCloseOperation='DISPOSE_ON_CLOSE'>
+<org.codelutin.vcs.ui.AbstractSynchUI title='lutinvcs.synch.title' modal="true" id='synchui'
+ defaultCloseOperation='DISPOSE_ON_CLOSE'>
<style source="common.css"/>
<script>
-
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
- import org.codelutin.vcs.ui.handler.AbstractSynchUIHandler;
- import org.codelutin.vcs.ui.model.SynchUIModel;
- public JSynchUI(AbstractSynchUIHandler handler) {
- super(handler,new SynchUIModel());
+ public JSynchUI(org.codelutin.vcs.ui.handler.AbstractSynchUIHandler handler) {
+ super(handler,new org.codelutin.vcs.ui.model.SynchUIModel());
}
-
- @Override
- protected AbstractSynchUIHandler getHandler() {
- return (AbstractSynchUIHandler) handler;
- }
-
- @Override
- public SynchUIModel getModel() {
- return (SynchUIModel) super.getModel();
- }
-
- @Override
- public void setVisible(boolean b) {
- if (getModel().getModel().getLocation() == VCSEntryLocation.UNKNOW) {
- // first launch, no tab model selected,choose one
- allTab.doClick();
- }
- super.setVisible(b);
- }
- public JTable getTable(String modelName) {
- return (JTable) get$objectMap().get(modelName+"Table");
- }
-
- public JVCSPopup getPopup(String modelName) {
- return (JVCSPopup) get$objectMap().get(modelName+"Popup");
- }
-
- protected void setLocation(VCSEntryLocation location) {
- getModel().setLocation(location);
- }
-
- protected void doAllAction(VCSAction action) {
- getModel().doAllAction(action);
- }
+ add(table);
</script>
- <!--org.codelutin.vcs.ui.model.SynchUIModel id="model"/-->
-
<java.awt.CardLayout id='cardLayout'/>
- <JPopupMenu enabled='false'>
- </JPopupMenu>
+ <!--JPopupMenu enabled='false'/-->
<org.codelutin.vcs.ui.JVCSPopup id="allPopup"/>
<org.codelutin.vcs.ui.JVCSPopup id="localPopup"/>
<org.codelutin.vcs.ui.JVCSPopup id="remotePopup"/>
- <Table>
+ <Table id='table'>
<row fill='both'>
<cell fill='both' weightx='1'>
<JToolBar>
@@ -110,4 +72,4 @@
</cell>
</row>
</Table>
-</org.codelutin.vcs.ui.AbstractUI>
+</org.codelutin.vcs.ui.AbstractSynchUI>
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx 2008-04-06 13:05:15 UTC (rev 396)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx 2008-04-06 13:05:33 UTC (rev 397)
@@ -1,4 +1,4 @@
-<JPopupMenu>
+<org.codelutin.vcs.ui.AbstractVCSPopup>
<script>
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.ui.handler.VCSAbsractAction;
@@ -14,12 +14,12 @@
ActionEvent e = new ActionEvent( item,1,action.name());
dispatchAction.actionPerformed(e);
}
- add(refresh);
+ /*add(refresh);
add(diff);
add(update);
add(commit);
add(revert);
- add(delete);
+ add(delete);*/
</script>
<JMenuItem id='refresh' text='{_("lutinvcs.action.refresh")}' toolTipText='{_("lutinvcs.action.tooltip.refresh")}'
icon='{createImageIcon("autoRefresh.png")}' onActionPerformed='doAction(VCSAction.REFRESH,refresh)'/>
@@ -33,4 +33,4 @@
icon='{createImageIcon("rollback.png")}' onActionPerformed='doAction(VCSAction.REVERT,revert)'/>
<JMenuItem id='delete' text='{_("lutinvcs.action.delete")}' toolTipText='{_("lutinvcs.action.tooltip.delete")}'
icon='{createImageIcon("remove.png")}' onActionPerformed='doAction(VCSAction.DELETE,delete)'/>
-</JPopupMenu>
\ No newline at end of file
+</org.codelutin.vcs.ui.AbstractVCSPopup>
\ No newline at end of file
1
0
06 Apr '08
Author: tchemit
Date: 2008-04-06 13:05:15 +0000 (Sun, 06 Apr 2008)
New Revision: 396
Added:
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/LICENSE.txt
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/changelog
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/pom.xml
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/services/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/services/jaxx.spi.Initializer
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-fr_FR.properties
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pref-jaxx-en_GB.properties
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/devel/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/devel/index.rst
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/index.rst
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/todo.rst
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/site_fr.xml
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/test/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/test/java/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/test/java/org/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/test/java/org/codelutin/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/test/java/org/codelutin/vcs/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/test/resources/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/test/resources/log4j.properties
Log:
new module : ui-pre-jaxx
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/LICENSE.txt
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/LICENSE.txt (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/LICENSE.txt 2008-04-06 13:05:15 UTC (rev 396)
@@ -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-pre-jaxx/changelog
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/changelog (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/changelog 2008-04-06 13:05:15 UTC (rev 396)
@@ -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-pre-jaxx/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/pom.xml (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/pom.xml 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1,51 @@
+<?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-pre-jaxx</artifactId>
+ <name>Lutinvcs ui pre-jaxx</name>
+
+ <packaging>jar</packaging>
+ <version>0.1-SNAPSHOT</version>
+ <description>Lutin vcs library ui pre jaxx</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>
+ <dependency>
+ <groupId>lutinlib</groupId>
+ <artifactId>jaxx</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+</project>
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/services/jaxx.spi.Initializer
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/services/jaxx.spi.Initializer (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/services/jaxx.spi.Initializer 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1 @@
+org.codelutin.vcs.ui.VCSInitializer
\ No newline at end of file
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1 @@
+org.codelutin.util.LutinLogFactory
\ No newline at end of file
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-fr_FR.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-fr_FR.properties (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-fr_FR.properties 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1,4 @@
+lutinvcs.error.thread.action=
+lutinvcs.file=Fichier
+lutinvcs.module=Module
+lutinvcs.status=Status
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pref-jaxx-en_GB.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pref-jaxx-en_GB.properties (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pref-jaxx-en_GB.properties 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1,4 @@
+lutinvcs.error.thread.action=
+lutinvcs.file=File
+lutinvcs.module=Module
+lutinvcs.status=Status
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/devel/index.rst
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/devel/index.rst (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/devel/index.rst 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1,5 @@
+===================
+Lutin vcs core dev
+===================
+
+TODO
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/index.rst
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/index.rst (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/index.rst 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1,5 @@
+==============
+Lutin vcs core
+==============
+
+TODO
\ No newline at end of file
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/todo.rst
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/todo.rst (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/todo.rst 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1,4 @@
+======================
+Lutinvcs - core - TODO
+======================
+
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/site_fr.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/site_fr.xml (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/site_fr.xml 2008-04-06 13:05:15 UTC (rev 396)
@@ -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-pre-jaxx/src/test/resources/log4j.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/test/resources/log4j.properties (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/test/resources/log4j.properties 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1,9 @@
+# Global logging configuration
+log4j.rootLogger=ERROR, stdout
+# Console output...
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) %M - %m%n
+#log4j.appender.stdout.layout.ConversionPattern=%%c=%c %%C=%C %%d=%d %%F=%F %%l=%l %%L=%L %%m=%m %%M=%M %%p=%p %%r=%r %%t=%t %%x=%x %%X=%X
+# package level
+log4j.logger.org.codelutin=INFO
1
0
[Buix-commits] r395 - trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 13:03:34 +0000 (Sun, 06 Apr 2008)
New Revision: 395
Modified:
trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNProvider.java
Log:
static method
Modified: trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNProvider.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNProvider.java 2008-04-06 10:22:49 UTC (rev 394)
+++ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNProvider.java 2008-04-06 13:03:34 UTC (rev 395)
@@ -56,7 +56,7 @@
* @return <code>true</code> if connection is ok,<code>false</code> otherwise.
* @throws org.codelutin.vcs.VCSException if could not compute the SVNURL
*/
- public boolean testAnonymousConnection(String url) throws VCSException {
+ public static boolean testAnonymousConnection(String url) throws VCSException {
boolean result = true;
SVNRepository repository = getAnonymousConnection(url);
1
0
[Buix-commits] r394 - in trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs: event type
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 10:22:49 +0000 (Sun, 06 Apr 2008)
New Revision: 394
Added:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/package.html
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/package.html
Log:
javadoc
Added: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/package.html
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/package.html (rev 0)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/package.html 2008-04-06 10:22:49 UTC (rev 394)
@@ -0,0 +1,8 @@
+<html>
+<body>
+<h1>Lutin vcs api event</h1>
+Ensemble des events.
+<br/>
+On retrouve dans ce paquetage, tout ce qui concerne les �v�nements.
+</body>
+</html>
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/package.html (from rev 379, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/package.html)
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/package.html (rev 0)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/package.html 2008-04-06 10:22:49 UTC (rev 394)
@@ -0,0 +1,8 @@
+<html>
+<body>
+<h1>Lutin vcs api type</h1>
+Ensemble des types enum�r�s .
+<br/>
+On retrouve dans ce paquetage, uniquement des �num�rations.
+</body>
+</html>
\ No newline at end of file
1
0
[Buix-commits] r393 - in trunk/lutinvcs: lutinvcs-api/src/main/java/org/codelutin/vcs lutinvcs-api/src/main/java/org/codelutin/vcs/type lutinvcs-api/src/main/java/org/codelutin/vcs/util lutinvcs-core/src/main/java/org/codelutin/vcs lutinvcs-provider-svn/src/main/java/org/codelutin/vcs lutinvcs-ui/src/test/java/org/codelutin/vcs/ui
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 10:18:35 +0000 (Sun, 06 Apr 2008)
New Revision: 393
Removed:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSType.java
Modified:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionConfig.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/VCSConnexionConfigImpl.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFactory.java
trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNProvider.java
trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java
Log:
remove VCSType as an Enum, type of provider is a simple String, to allow using new provier without any change in api code :)
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionConfig.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionConfig.java 2008-04-06 10:11:00 UTC (rev 392)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexionConfig.java 2008-04-06 10:18:35 UTC (rev 393)
@@ -18,7 +18,6 @@
* ##% */
package org.codelutin.vcs;
-import org.codelutin.vcs.type.VCSType;
import org.codelutin.vcs.type.VCSTypeRepo;
import java.io.File;
@@ -33,7 +32,7 @@
public interface VCSConnexionConfig {
/** @return the type of vcs used */
- VCSType getType();
+ String getType();
/** @return <code>true</code> if ssh connexion is used */
boolean isUseSshConnexion();
@@ -81,7 +80,7 @@
void setRemotePath(String remotePath);
- void setType(VCSType type);
+ void setType(String type);
void setTypeRepo(VCSTypeRepo typeRepo);
Deleted: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSType.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSType.java 2008-04-06 10:11:00 UTC (rev 392)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSType.java 2008-04-06 10:18:35 UTC (rev 393)
@@ -1,31 +0,0 @@
-/* *##%
-* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
-* Benjamin Poussin, Tony Chemit
-*
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*##%*/
-package org.codelutin.vcs.type;
-
-/**
- * This type-safe class representing a type of vcs (SVN,CVS,...)
- *
- * @author chemit
- */
-public enum VCSType {
-
- CVS, SVN, MOCK
-
-}
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/VCSConnexionConfigImpl.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/VCSConnexionConfigImpl.java 2008-04-06 10:11:00 UTC (rev 392)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/VCSConnexionConfigImpl.java 2008-04-06 10:18:35 UTC (rev 393)
@@ -15,7 +15,6 @@
package org.codelutin.vcs.util;
import org.codelutin.vcs.VCSConnexionConfig;
-import org.codelutin.vcs.type.VCSType;
import org.codelutin.vcs.type.VCSTypeRepo;
import java.io.File;
@@ -23,7 +22,7 @@
/** @author chemit */
public class VCSConnexionConfigImpl implements VCSConnexionConfig {
- protected VCSType type;
+ protected String type;
protected boolean useSshConnexion;
protected String hostName;
protected File keyFile;
@@ -35,7 +34,7 @@
protected VCSTypeRepo typeRepo;
protected File localDatabasePath;
- public VCSType getType() {
+ public String getType() {
return type;
}
@@ -111,7 +110,7 @@
this.remotePath = remotePath;
}
- public void setType(VCSType type) {
+ public void setType(String type) {
this.type = type;
}
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFactory.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFactory.java 2008-04-06 10:11:00 UTC (rev 392)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFactory.java 2008-04-06 10:18:35 UTC (rev 393)
@@ -22,10 +22,10 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.codelutin.util.StringUtil;
+import org.codelutin.vcs.event.VCSConnexionEvent;
+import org.codelutin.vcs.event.VCSConnexionEventListener;
import org.codelutin.vcs.runner.VCSActionManager;
import org.codelutin.vcs.type.VCSConnexionMode;
-import org.codelutin.vcs.event.VCSConnexionEventListener;
-import org.codelutin.vcs.event.VCSConnexionEvent;
import java.util.ArrayList;
import java.util.List;
@@ -83,7 +83,7 @@
VCSProvider<?, ?> provider;
// obtain matching provider
- provider = factory.getProvider(config.getType().name().toUpperCase());
+ provider = factory.getProvider(config.getType().toUpperCase());
// delegate instanciation of connexion to provider
VCSConnexion connexion = provider.newConnection(mode, config);
Modified: trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNProvider.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNProvider.java 2008-04-06 10:11:00 UTC (rev 392)
+++ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNProvider.java 2008-04-06 10:18:35 UTC (rev 393)
@@ -43,6 +43,7 @@
private static boolean libraryInit;
public SVNProvider() {
+
super("SVN", SVNHandler.class, SVNConnexion.class);
setupLibrary();
@@ -107,6 +108,8 @@
public static SVNRepository getAnonymousConnection(String url) throws VCSException {
+ setupLibrary();
+
SVNURL testRepositoryURL;
try {
testRepositoryURL = SVNURL.parseURIEncoded(url);
@@ -157,28 +160,10 @@
}
}
- 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();
- }
-
/**
+ * TODO This method is specifi to IsisFish, must be removed from here.
+ * TODO Implement a IsisSVNProvider ?
+ *
* @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
@@ -231,4 +216,25 @@
log.info("required:" + typeRepo + " available:" + result);
return result;
}
+
+ 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();
+ }
}
Modified: trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java 2008-04-06 10:11:00 UTC (rev 392)
+++ trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java 2008-04-06 10:18:35 UTC (rev 393)
@@ -16,12 +16,11 @@
import org.codelutin.i18n.I18n;
import org.codelutin.vcs.VCSConnexion;
+import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.VCSFactory;
import org.codelutin.vcs.type.VCSConnexionMode;
import org.codelutin.vcs.type.VCSEntryLocation;
-import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSState;
-import org.codelutin.vcs.VCSFactory;
-import org.codelutin.vcs.type.VCSType;
import org.codelutin.vcs.ui.model.SynchUIModel;
import org.codelutin.vcs.util.VCSConnexionConfigImpl;
import org.codelutin.vcs.util.VCSEntryImpl;
@@ -58,7 +57,7 @@
public static VCSConnexion initVCS(File root) {
VCSConnexionConfigImpl config = new VCSConnexionConfigImpl();
- config.setType(VCSType.MOCK);
+ config.setType("MOCK");
config.setLocalDatabasePath(root);
VCSConnexion connexion = VCSFactory.newConnexion(VCSConnexionMode.ANONYMOUS, config);
connexion.init(config);
1
0
[Buix-commits] r392 - in trunk/lutinvcs: lutinvcs-api/src/main/java/org/codelutin/vcs/util lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock lutinvcs-provider-svn/src/main/java/org/codelutin/vcs lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 10:11:00 +0000 (Sun, 06 Apr 2008)
New Revision: 392
Added:
trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNEventLoggerHandler.java
Removed:
trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHelper.java
Modified:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSHandler.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSProvider.java
trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSConnexion.java
trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockConnexion.java
trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNProvider.java
trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNConnexion.java
trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/FindTypeRepoTest.java
Log:
remove SVNHelper (logic for connexion should be only in SVNConnexion) but for convience we put it in SVNProvider
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java 2008-04-06 10:00:07 UTC (rev 391)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java 2008-04-06 10:11:00 UTC (rev 392)
@@ -39,7 +39,6 @@
/** @author chemit */
public abstract class AbstractVCSConnexion<H extends VCSHandler> implements VCSConnexion<H> {
- /** to use log facility, just put in your code: log.info(\"...\"); */
static protected final Log log = LogFactory.getLog(AbstractVCSConnexion.class);
protected File localRoot;
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSHandler.java 2008-04-06 10:00:07 UTC (rev 391)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSHandler.java 2008-04-06 10:11:00 UTC (rev 392)
@@ -42,7 +42,6 @@
*/
public abstract class AbstractVCSHandler<C extends VCSConnexion> implements VCSHandler<C> {
- /** to use log facility, just put in your code: log.info(\"...\"); */
static protected final Log log = LogFactory.getLog(AbstractVCSHandler.class);
public static final String LOCAL_SEP = File.separator;
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSProvider.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSProvider.java 2008-04-06 10:00:07 UTC (rev 391)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSProvider.java 2008-04-06 10:11:00 UTC (rev 392)
@@ -20,6 +20,8 @@
import org.codelutin.vcs.VCSHandler;
import org.codelutin.vcs.VCSProvider;
import org.codelutin.vcs.type.VCSConnexionMode;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* base implementation of provider.
@@ -28,6 +30,8 @@
*/
public class AbstractVCSProvider<C extends VCSConnexion, H extends VCSHandler<C>> implements VCSProvider<C, H> {
+ static protected final Log log = LogFactory.getLog(AbstractVCSProvider.class);
+
/** name of ne provider */
protected final String name;
@@ -67,7 +71,10 @@
}
try {
connexion = connexionImpl.getConstructor(VCSConnexionMode.class, handlerImpl).newInstance(mode, handler);
+
+ // always init connexion from his config
connexion.init(config);
+
return connexion;
} catch (Exception e) {
throw new RuntimeException(_("lutinvcs.error.provider.init.connexion", connexionImpl, this, e.getCause()));
Modified: trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSConnexion.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSConnexion.java 2008-04-06 10:00:07 UTC (rev 391)
+++ trunk/lutinvcs/lutinvcs-provider-cvs/src/main/java/org/codelutin/vcs/impl/cvs/CVSConnexion.java 2008-04-06 10:11:00 UTC (rev 392)
@@ -16,6 +16,7 @@
import org.codelutin.vcs.VCSConnexionConfig;
import org.codelutin.vcs.VCSException;
+import org.codelutin.vcs.type.VCSConnectionState;
import org.codelutin.vcs.type.VCSConnexionMode;
import org.codelutin.vcs.util.AbstractVCSConnexion;
import org.netbeans.lib.cvsclient.CVSRoot;
@@ -35,6 +36,7 @@
public void init(VCSConnexionConfig config) {
//TODO
this.config = config;
+ this.state = VCSConnectionState.INIT;
}
public void testConnection() throws VCSException {
Modified: trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockConnexion.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockConnexion.java 2008-04-06 10:00:07 UTC (rev 391)
+++ trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockConnexion.java 2008-04-06 10:11:00 UTC (rev 392)
@@ -28,8 +28,8 @@
}
public void init(VCSConnexionConfig config) {
+ this.config = config;
state = VCSConnectionState.INIT;
- this.config = config;
}
public void testConnection() throws VCSException {
Modified: trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNProvider.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNProvider.java 2008-04-06 10:00:07 UTC (rev 391)
+++ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNProvider.java 2008-04-06 10:11:00 UTC (rev 392)
@@ -16,11 +16,23 @@
import org.codelutin.vcs.impl.svn.SVNConnexion;
import org.codelutin.vcs.impl.svn.SVNHandler;
+import org.codelutin.vcs.type.VCSTypeRepo;
+import org.codelutin.vcs.util.AbstractVCSHandler;
import org.codelutin.vcs.util.AbstractVCSProvider;
+import org.tmatesoft.svn.core.SVNException;
+import org.tmatesoft.svn.core.SVNNodeKind;
+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.ISVNOptions;
+import org.tmatesoft.svn.core.wc.SVNClientManager;
+import org.tmatesoft.svn.core.wc.SVNRevision;
+import org.tmatesoft.svn.core.wc.SVNWCUtil;
+import java.util.Arrays;
+
/**
* SVN Provider
*
@@ -28,17 +40,195 @@
*/
public class SVNProvider extends AbstractVCSProvider<SVNConnexion, SVNHandler> {
+ private static boolean libraryInit;
+
public SVNProvider() {
super("SVN", SVNHandler.class, SVNConnexion.class);
- // For using over http:// and https://
+ setupLibrary();
+ }
+
+ /**
+ * 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 org.codelutin.vcs.VCSException if could not compute the SVNURL
+ */
+ public 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 protected key file
+ * @param passphrase passphrase to use
+ * @return <code>true</code> if connection is ok,<code>false</code> otherwise.
+ * @throws org.codelutin.vcs.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 {
+
+ 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);
+ }
+ }
+
+ public static void setupLibrary() {
+ if (libraryInit) {
+ return;
+ }
+ libraryInit = true;
+ /*
+ * For using over http:// and https://
+ */
DAVRepositoryFactory.setup();
- // For using over svn:// and svn+xxx://
+ /*
+ * For using over svn:// and svn+xxx://
+ */
SVNRepositoryFactoryImpl.setup();
- // For using over file:///
+ /*
+ * For using over file:///
+ */
FSRepositoryFactory.setup();
}
+ /**
+ * @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 org.codelutin.vcs.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 = AbstractVCSHandler.getRemotePath(typeRepo, uncleanRemotePath);
+ String remoteDatabase = AbstractVCSHandler.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;
+ }
}
Modified: trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNConnexion.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNConnexion.java 2008-04-06 10:00:07 UTC (rev 391)
+++ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNConnexion.java 2008-04-06 10:11:00 UTC (rev 392)
@@ -18,6 +18,7 @@
import org.codelutin.vcs.VCSConnexionConfig;
import org.codelutin.vcs.VCSException;
import org.codelutin.vcs.VCSRuntimeException;
+import org.codelutin.vcs.SVNProvider;
import org.codelutin.vcs.type.VCSConnectionState;
import org.codelutin.vcs.type.VCSConnexionMode;
import org.codelutin.vcs.util.AbstractVCSConnexion;
@@ -90,19 +91,19 @@
// add our svn event logger TODO Remake this logger or use the
// DebugLog from svnkit ?
- ourClientManager.setEventHandler(new SVNHelper.SVNEventLoggerHandler());
+ ourClientManager.setEventHandler(new SVNEventLoggerHandler());
+ this.state = VCSConnectionState.INIT;
} catch (SVNException e) {
// TODO I18N
+ this.state = VCSConnectionState.ERROR;
+
throw new VCSRuntimeException("could not compute repository url ", e);
}
}
@Override
public void close() throws IllegalStateException {
- checkInit();
- if (!isOpen()) {
- return;
- }
+ checkOpen();
//TODO to be done
log.info(this);
}
@@ -130,7 +131,7 @@
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());
+ SVNProvider.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));
@@ -139,7 +140,7 @@
// do not use ssh connection
getConfig().setUseSshConnexion(false);
// try to test with a anonymous connection
- SVNHelper.testAnonymousConnection(repositoryURL.toString());
+ SVNProvider.testAnonymousConnection(repositoryURL.toString());
}
@@ -161,4 +162,5 @@
return repositoryURL;
}
+
}
Added: trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNEventLoggerHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNEventLoggerHandler.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNEventLoggerHandler.java 2008-04-06 10:11:00 UTC (rev 392)
@@ -0,0 +1,239 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. This program is
+ * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.impl.svn;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.tmatesoft.svn.core.SVNCancelException;
+import org.tmatesoft.svn.core.SVNException;
+import org.tmatesoft.svn.core.SVNProperty;
+import org.tmatesoft.svn.core.wc.ISVNEventHandler;
+import org.tmatesoft.svn.core.wc.SVNEvent;
+import org.tmatesoft.svn.core.wc.SVNEventAction;
+import org.tmatesoft.svn.core.wc.SVNStatusType;
+
+/**
+ * A svn logger
+ *
+ * @author chemit
+ */
+public 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 == SVNStatusType.CHANGED) {
+ /*
+ * the item was modified in the repository (got the changes
+ * from the repository
+ */
+ pathChangeType = "U";
+ } else if (contentsStatus == 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 == 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 {
+
+ }
+}
Deleted: trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHelper.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHelper.java 2008-04-06 10:00:07 UTC (rev 391)
+++ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNHelper.java 2008-04-06 10:11:00 UTC (rev 392)
@@ -1,461 +0,0 @@
-/* *##%
-* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
-* Benjamin Poussin, Tony Chemit
-*
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*##%*/
-package org.codelutin.vcs.impl.svn;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.codelutin.vcs.VCSException;
-import org.codelutin.vcs.util.AbstractVCSHandler;
-import org.codelutin.vcs.VCSRuntimeException;
-import org.codelutin.vcs.type.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 = AbstractVCSHandler.getRemotePath(typeRepo, uncleanRemotePath);
- String remoteDatabase = AbstractVCSHandler.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 {
-
- }
- }
-}
Modified: trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/FindTypeRepoTest.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/FindTypeRepoTest.java 2008-04-06 10:00:07 UTC (rev 391)
+++ trunk/lutinvcs/lutinvcs-provider-svn/src/test/java/org/codelutin/vcs/impl/svn/FindTypeRepoTest.java 2008-04-06 10:11:00 UTC (rev 392)
@@ -2,6 +2,7 @@
import junit.framework.TestCase;
import org.codelutin.vcs.VCSException;
+import org.codelutin.vcs.SVNProvider;
import org.codelutin.vcs.type.VCSTypeRepo;
/**
@@ -23,7 +24,7 @@
vcsTypeRepo = VCSTypeRepo.BRANCH;
path = "svnroot/isis-fish-data";
version = "3.1.0";
- result = SVNHelper.findTypeRepo(vcsTypeRepo, path, version, hostname);
+ result = SVNProvider.findTypeRepo(vcsTypeRepo, path, version, hostname);
assertEquals(VCSTypeRepo.BRANCH, result);
}
@@ -31,11 +32,11 @@
vcsTypeRepo = VCSTypeRepo.BRANCH;
version = "3.0.0";
path = "svnroot/isis-fish-data";
- result = SVNHelper.findTypeRepo(vcsTypeRepo, path, version, hostname);
+ result = SVNProvider.findTypeRepo(vcsTypeRepo, path, version, hostname);
assertEquals(VCSTypeRepo.HEAD, result);
try {
path = "svnroot/sis-fish-data";
- result = SVNHelper.findTypeRepo(vcsTypeRepo, path, version, hostname);
+ result = SVNProvider.findTypeRepo(vcsTypeRepo, path, version, hostname);
fail();
} catch (Exception e) {
assertTrue(true);
@@ -46,7 +47,7 @@
vcsTypeRepo = VCSTypeRepo.HEAD;
path = "svnroot/isis-fish-data";
version = "3.0.0";
- result = SVNHelper.findTypeRepo(vcsTypeRepo, path, version, hostname);
+ result = SVNProvider.findTypeRepo(vcsTypeRepo, path, version, hostname);
assertEquals(VCSTypeRepo.HEAD, result);
}
@@ -55,7 +56,7 @@
path = "svnroot/sis-fish-data";
version = "3.0.0";
try {
- result = SVNHelper.findTypeRepo(vcsTypeRepo, path, version, hostname);
+ result = SVNProvider.findTypeRepo(vcsTypeRepo, path, version, hostname);
fail();
} catch (Exception e) {
assertTrue(true);
1
0
[Buix-commits] r391 - in trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs: type util
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 10:00:07 +0000 (Sun, 06 Apr 2008)
New Revision: 391
Modified:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSConnectionState.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java
Log:
use UNDEFINED state, instead of null state to test if connexion was init
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSConnectionState.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSConnectionState.java 2008-04-06 09:57:57 UTC (rev 390)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSConnectionState.java 2008-04-06 10:00:07 UTC (rev 391)
@@ -31,7 +31,10 @@
/** connexion was not init */
UNDEFINED,
- /** connexion was init, but not opened (default state after instanciate a new connexion from {@link VCSProvider#newConnection(VCSConnexionMode, VCSConnexionConfig)} */
+ /**
+ * connexion was init, but not opened (default state after instanciate a new connexion from
+ * {@link VCSProvider#newConnection(VCSConnexionMode, VCSConnexionConfig)}
+ */
INIT,
/** connexion was successfull opened, via {@link VCSConnexion#open()} */
OPEN,
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java 2008-04-06 09:57:57 UTC (rev 390)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java 2008-04-06 10:00:07 UTC (rev 391)
@@ -56,6 +56,8 @@
this.mode = mode;
this.handler = handler;
this.handler.setConnexion(this);
+ // by default, state is undefined before init
+ state = VCSConnectionState.UNDEFINED;
}
public H getHandler() throws IllegalStateException {
@@ -259,7 +261,7 @@
}
protected void checkInit() throws IllegalStateException {
- if (state == null) {
+ if (state == VCSConnectionState.UNDEFINED) {
throw new IllegalStateException(_("lutinvcs.error.connexion.noinit", this));
}
}
1
0
[Buix-commits] r390 - in trunk/lutinvcs: lutinvcs-api/src/main/java/org/codelutin/vcs/event lutinvcs-api/src/main/java/org/codelutin/vcs/type lutinvcs-api/src/main/java/org/codelutin/vcs/util lutinvcs-core/src/main/java/org/codelutin/vcs lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 09:57:57 +0000 (Sun, 06 Apr 2008)
New Revision: 390
Added:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSConnectionState.java
Removed:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/ConnectionState.java
Modified:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/VCSConnexionEvent.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/VCSConnexionEventListener.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFactory.java
trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockConnexion.java
trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNConnexion.java
Log:
introduce VCSConnexionState instead of ConnexionState
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/VCSConnexionEvent.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/VCSConnexionEvent.java 2008-04-06 09:49:11 UTC (rev 389)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/VCSConnexionEvent.java 2008-04-06 09:57:57 UTC (rev 390)
@@ -15,26 +15,21 @@
package org.codelutin.vcs.event;
import org.codelutin.vcs.VCSConnexion;
+import org.codelutin.vcs.type.VCSConnectionState;
import java.util.EventObject;
/**
- * Events to be used while {@link org.codelutin.vcs.VCSHandler} life cycle.
+ * Events to be used while {@link VCSConnexion} life cycle.
*
* @author chemit
- * @see org.codelutin.vcs.VCSHandlerEventListener
- * @see org.codelutin.vcs.VCSHandler
*/
public class VCSConnexionEvent extends EventObject {
private static final long serialVersionUID = 1L;
- protected Type state;
+ protected VCSConnectionState state;
- public enum Type {
- OPEN, CLOSE
- }
-
/**
* Constructs a prototypical Event.
*
@@ -42,7 +37,7 @@
* @param type type of event
* @throws IllegalArgumentException if source is null.
*/
- public VCSConnexionEvent(VCSConnexion source, Type type) {
+ public VCSConnexionEvent(VCSConnexion source, VCSConnectionState type) {
super(source);
this.state = type;
}
@@ -52,7 +47,7 @@
return (VCSConnexion) super.getSource();
}
- public Type getState() {
+ public VCSConnectionState getState() {
return state;
}
}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/VCSConnexionEventListener.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/VCSConnexionEventListener.java 2008-04-06 09:49:11 UTC (rev 389)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/VCSConnexionEventListener.java 2008-04-06 09:57:57 UTC (rev 390)
@@ -26,13 +26,13 @@
*
* @param event current event
*/
- public void open(VCSConnexionEvent event);
+ public void onConnexionOpened(VCSConnexionEvent event);
/**
* call when vcs connexion was closed
*
* @param event current event
*/
- public void close(VCSConnexionEvent event);
+ public void onConnexionClosed(VCSConnexionEvent event);
}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/ConnectionState.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/ConnectionState.java 2008-04-06 09:49:11 UTC (rev 389)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/ConnectionState.java 2008-04-06 09:57:57 UTC (rev 390)
@@ -1,37 +0,0 @@
-/*
-* \#\#% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
-* Tony Chemit
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* \#\#% */
-package org.codelutin.vcs.type;
-
-/**
- * Une enumeration pour definir l'�tat du connexion � un serveur vcs.
- *
- * @author chemit
- */
-public enum ConnectionState {
- /** lorsque la connexion a �t� initialis�e (valid�e) mais pas ouverte */
- INIT,
- /** lorsque la connexion n'a pas encore initialis�e */
- UNDEFINED,
- /** lorsque la connexion est ok, mais que l'on est pas connect� */
- OFF_LINE,
- /** lorsque la connexion est �tablie avec succes */
- ON_LINE,
- /** lorsque la connexion a tent�e de s'initialiser sans succes */
- ERROR
-}
Copied: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSConnectionState.java (from rev 375, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/ConnectionState.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSConnectionState.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/VCSConnectionState.java 2008-04-06 09:57:57 UTC (rev 390)
@@ -0,0 +1,43 @@
+/*
+* \#\#% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
+* Tony Chemit
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+* \#\#% */
+package org.codelutin.vcs.type;
+
+import org.codelutin.vcs.VCSConnexion;
+import org.codelutin.vcs.VCSConnexionConfig;
+import org.codelutin.vcs.VCSProvider;
+
+/**
+ * All states of a {@link VCSConnexion}.
+ *
+ * @author chemit
+ */
+public enum VCSConnectionState {
+
+ /** connexion was not init */
+ UNDEFINED,
+ /** connexion was init, but not opened (default state after instanciate a new connexion from {@link VCSProvider#newConnection(VCSConnexionMode, VCSConnexionConfig)} */
+ INIT,
+ /** connexion was successfull opened, via {@link VCSConnexion#open()} */
+ OPEN,
+ /** connexion was successfull opened, via {@link VCSConnexion#close()} */
+ CLOSE,
+
+ /** connexion was not successfull opened, via {@link VCSConnexion#open()} */
+ ERROR
+}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java 2008-04-06 09:49:11 UTC (rev 389)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java 2008-04-06 09:57:57 UTC (rev 390)
@@ -20,12 +20,11 @@
import org.codelutin.util.ListenerSet;
import org.codelutin.vcs.VCSConnexion;
import org.codelutin.vcs.VCSConnexionConfig;
-import org.codelutin.vcs.event.VCSConnexionEvent;
-import org.codelutin.vcs.event.VCSConnexionEvent.Type;
-import org.codelutin.vcs.event.VCSConnexionEventListener;
import org.codelutin.vcs.VCSException;
import org.codelutin.vcs.VCSHandler;
-import org.codelutin.vcs.type.ConnectionState;
+import org.codelutin.vcs.event.VCSConnexionEvent;
+import org.codelutin.vcs.event.VCSConnexionEventListener;
+import org.codelutin.vcs.type.VCSConnectionState;
import org.codelutin.vcs.type.VCSConnexionMode;
import org.codelutin.vcs.type.VCSState;
@@ -46,7 +45,7 @@
protected File localRoot;
protected URI remoteRoot;
protected VCSConnexionMode mode;
- protected ConnectionState state;
+ protected VCSConnectionState state;
protected VCSConnexionConfig config;
protected H handler;
@@ -84,17 +83,17 @@
public boolean isOpen() throws IllegalStateException {
checkInit();
- return !hasFailed() && state == ConnectionState.ON_LINE;
+ return !hasFailed() && state == VCSConnectionState.OPEN;
}
public boolean isClosed() throws IllegalStateException {
checkInit();
- return !hasFailed() && state != ConnectionState.ON_LINE;
+ return !hasFailed() && state != VCSConnectionState.CLOSE;
}
public boolean hasFailed() throws IllegalStateException {
checkInit();
- return state == ConnectionState.ERROR;
+ return state == VCSConnectionState.ERROR;
}
public void addVCSConnexionEventListener(VCSConnexionEventListener l) {
@@ -246,16 +245,16 @@
}
protected void fireOpen() {
- VCSConnexionEvent e = new VCSConnexionEvent(this, Type.OPEN);
+ VCSConnexionEvent e = new VCSConnexionEvent(this, VCSConnectionState.OPEN);
for (VCSConnexionEventListener l : listeners) {
- l.open(e);
+ l.onConnexionOpened(e);
}
}
protected void fireClose() {
- VCSConnexionEvent e = new VCSConnexionEvent(this, Type.CLOSE);
+ VCSConnexionEvent e = new VCSConnexionEvent(this, VCSConnectionState.CLOSE);
for (VCSConnexionEventListener l : listeners) {
- l.close(e);
+ l.onConnexionClosed(e);
}
}
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFactory.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFactory.java 2008-04-06 09:49:11 UTC (rev 389)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFactory.java 2008-04-06 09:57:57 UTC (rev 390)
@@ -110,7 +110,7 @@
return connexions.toArray(new VCSConnexion[connexions.size()]);
}
- public void open(VCSConnexionEvent event) {
+ public void onConnexionOpened(VCSConnexionEvent event) {
// register connexion as active
connexions.add(event.getSource());
if (connexions.size() == 1) {
@@ -119,7 +119,7 @@
}
}
- public void close(VCSConnexionEvent event) {
+ public void onConnexionClosed(VCSConnexionEvent event) {
// remove connexion from active
connexions.remove(event.getSource());
if (connexions.isEmpty()) {
Modified: trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockConnexion.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockConnexion.java 2008-04-06 09:49:11 UTC (rev 389)
+++ trunk/lutinvcs/lutinvcs-provider-mock/src/main/java/org/codelutin/vcs/impl/mock/MockConnexion.java 2008-04-06 09:57:57 UTC (rev 390)
@@ -16,7 +16,7 @@
import org.codelutin.vcs.VCSConnexionConfig;
import org.codelutin.vcs.VCSException;
-import org.codelutin.vcs.type.ConnectionState;
+import org.codelutin.vcs.type.VCSConnectionState;
import org.codelutin.vcs.type.VCSConnexionMode;
import org.codelutin.vcs.util.AbstractVCSConnexion;
@@ -28,7 +28,7 @@
}
public void init(VCSConnexionConfig config) {
- state = ConnectionState.INIT;
+ state = VCSConnectionState.INIT;
this.config = config;
}
@@ -44,7 +44,7 @@
@Override
public void open() throws IllegalStateException {
checkInit();
- state = ConnectionState.ON_LINE;
+ state = VCSConnectionState.CLOSE;
fireOpen();
}
Modified: trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNConnexion.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNConnexion.java 2008-04-06 09:49:11 UTC (rev 389)
+++ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/impl/svn/SVNConnexion.java 2008-04-06 09:57:57 UTC (rev 390)
@@ -18,7 +18,7 @@
import org.codelutin.vcs.VCSConnexionConfig;
import org.codelutin.vcs.VCSException;
import org.codelutin.vcs.VCSRuntimeException;
-import org.codelutin.vcs.type.ConnectionState;
+import org.codelutin.vcs.type.VCSConnectionState;
import org.codelutin.vcs.type.VCSConnexionMode;
import org.codelutin.vcs.util.AbstractVCSConnexion;
import org.tmatesoft.svn.core.SVNException;
@@ -48,7 +48,7 @@
}
public void init(VCSConnexionConfig config) {
- state = ConnectionState.UNDEFINED;
+ state = VCSConnectionState.UNDEFINED;
this.config = config;
try {
1
0
[Buix-commits] r389 - trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 09:49:11 +0000 (Sun, 06 Apr 2008)
New Revision: 389
Modified:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntries.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntry.java
Log:
javadoc
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntries.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntries.java 2008-04-06 09:48:53 UTC (rev 388)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntries.java 2008-04-06 09:49:11 UTC (rev 389)
@@ -21,7 +21,11 @@
import javax.swing.ListSelectionModel;
import java.util.List;
-/** @author chemit */
+/**
+ * Contract of list of VCSEntry
+ *
+ * @author chemit
+ */
public interface VCSEntries {
/**
@@ -64,6 +68,25 @@
void refresh(List<VCSEntry> entries, long timestamp) throws IllegalStateException;
/**
+ * obtain the array of all {@link VCSAction} found in the given entries
+ *
+ * @param entries entries to scan
+ * @return array of {@link VCSAction} found in entires
+ */
+ VCSAction[] getActions(List<VCSEntry> entries);
+
+ /**
+ * obtain the array of all {@link VCSState} found in the given entries
+ *
+ * @param entries entries to scan
+ * @return array of {@link VCSState found in entires
+ */
+ VCSState[] getStates(List<VCSEntry> entries);
+
+ /** clear the internal list of entries. */
+ void clear();
+
+ /**
* obtain the list of all entries.
*
* @return list of all entries
@@ -115,11 +138,4 @@
* @return list of all entries for a given connexion
*/
List<VCSEntry> filter(VCSAction action, List<VCSEntry> entries);
-
- VCSAction[] getActions(List<VCSEntry> entries);
-
- VCSState[] getStates(List<VCSEntry> entries);
-
- /** clear the list of entries. */
- void clear();
}
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntry.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntry.java 2008-04-06 09:48:53 UTC (rev 388)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSEntry.java 2008-04-06 09:49:11 UTC (rev 389)
@@ -21,7 +21,11 @@
import java.io.File;
import java.io.Serializable;
-/** @author chemit */
+/**
+ * Contract of an entry in VCS (a file or a dir)
+ *
+ * @author chemit
+ */
public interface VCSEntry extends Serializable {
/**
1
0
[Buix-commits] r388 - in trunk/lutinvcs: lutinvcs-api/src/main/java/org/codelutin/vcs lutinvcs-api/src/main/java/org/codelutin/vcs/util lutinvcs-core/src/main/java/org/codelutin/vcs
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 09:48:53 +0000 (Sun, 06 Apr 2008)
New Revision: 388
Modified:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexion.java
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFactory.java
Log:
improve VCSConnexionConfig (add srttter to contract)
introduc event package to put all event stuff
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexion.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexion.java 2008-04-06 09:47:33 UTC (rev 387)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/VCSConnexion.java 2008-04-06 09:48:53 UTC (rev 388)
@@ -15,6 +15,7 @@
package org.codelutin.vcs;
import org.codelutin.vcs.type.VCSConnexionMode;
+import org.codelutin.vcs.event.VCSConnexionEventListener;
import java.io.File;
import java.net.URI;
Modified: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java 2008-04-06 09:47:33 UTC (rev 387)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/util/AbstractVCSConnexion.java 2008-04-06 09:48:53 UTC (rev 388)
@@ -20,9 +20,9 @@
import org.codelutin.util.ListenerSet;
import org.codelutin.vcs.VCSConnexion;
import org.codelutin.vcs.VCSConnexionConfig;
-import org.codelutin.vcs.VCSConnexionEvent;
-import org.codelutin.vcs.VCSConnexionEvent.Type;
-import org.codelutin.vcs.VCSConnexionEventListener;
+import org.codelutin.vcs.event.VCSConnexionEvent;
+import org.codelutin.vcs.event.VCSConnexionEvent.Type;
+import org.codelutin.vcs.event.VCSConnexionEventListener;
import org.codelutin.vcs.VCSException;
import org.codelutin.vcs.VCSHandler;
import org.codelutin.vcs.type.ConnectionState;
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFactory.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFactory.java 2008-04-06 09:47:33 UTC (rev 387)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSFactory.java 2008-04-06 09:48:53 UTC (rev 388)
@@ -24,6 +24,8 @@
import org.codelutin.util.StringUtil;
import org.codelutin.vcs.runner.VCSActionManager;
import org.codelutin.vcs.type.VCSConnexionMode;
+import org.codelutin.vcs.event.VCSConnexionEventListener;
+import org.codelutin.vcs.event.VCSConnexionEvent;
import java.util.ArrayList;
import java.util.List;
1
0