Mercurial > hg > mercurial
changeset 28:a7cab5083ada
libraries moved on top level, dummy implementation of agent side checkout interface
line wrap: on
line diff
--- a/build.xml Wed Jul 23 09:18:03 2008 +0400 +++ b/build.xml Wed Jul 23 09:32:14 2008 +0400 @@ -5,11 +5,19 @@ <property name="distPath" value="${basedir}/dist"/> <target name="dist" depends="all"> + <delete dir="${distPath}"/> <mkdir dir="${distPath}/unpacked"/> <jar destfile="${distPath}/unpacked/mercurial-common.jar" basedir="${mercurial-common.output.dir}"/> <jar destfile="${distPath}/unpacked/mercurial-server.jar" basedir="${mercurial-server.output.dir}"/> <jar destfile="${distPath}/unpacked/mercurial-agent.jar" basedir="${mercurial-agent.output.dir}"/> - <zip basedir="${distPath}/unpacked" destfile="${distPath}/mercurial.zip" includes="**/*"/> + <zip basedir="${distPath}/unpacked" destfile="${distPath}/mercurial-server.zip"> + <include name="mercurial-common.jar"/> + <include name="mercurial-server.jar"/> + </zip> + <zip basedir="${distPath}/unpacked" destfile="${distPath}/mercurial-agent.zip"> + <include name="mercurial-common.jar"/> + <include name="mercurial-agent.jar"/> + </zip> <zip basedir="${basedir}" destfile="${distPath}/mercurial-src.zip"> <exclude name=".hg/**"/> <exclude name="dist/**"/>
--- a/mercurial-agent/mercurial-agent.iml Wed Jul 23 09:18:03 2008 +0400 +++ b/mercurial-agent/mercurial-agent.iml Wed Jul 23 09:32:14 2008 +0400 @@ -8,6 +8,8 @@ </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="library" name="TeamCityAPI-agent" level="project" /> + <orderEntry type="module" module-name="mercurial-common" /> <orderEntryProperties /> </component> </module>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial-agent/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialAgentSideVcsSupport.java Wed Jul 23 09:32:14 2008 +0400 @@ -0,0 +1,33 @@ +/* + * Copyright 2000-2007 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package jetbrains.buildServer.buildTriggers.vcs.mercurial; + +import jetbrains.buildServer.agent.BuildProgressLogger; +import jetbrains.buildServer.agent.vcs.CheckoutOnAgentVcsSupport; +import jetbrains.buildServer.vcs.IncludeRule; +import jetbrains.buildServer.vcs.VcsException; +import jetbrains.buildServer.vcs.VcsRoot; + +import java.io.File; + +public class MercurialAgentSideVcsSupport implements CheckoutOnAgentVcsSupport { + public void updateSources(final BuildProgressLogger buildProgressLogger, final File file, final VcsRoot vcsRoot, final String s, final IncludeRule includeRule) throws VcsException { + } + + public String getName() { + return Constants.VCS_NAME; + } +}
--- a/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/Constants.java Wed Jul 23 09:18:03 2008 +0400 +++ b/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/Constants.java Wed Jul 23 09:32:14 2008 +0400 @@ -16,6 +16,7 @@ package jetbrains.buildServer.buildTriggers.vcs.mercurial; public interface Constants { + String VCS_NAME = "mercurial"; String REPOSITORY_PROP = "repositoryPath"; String HG_COMMAND_PATH_PROP = "hgCommandPath"; }
--- a/mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java Wed Jul 23 09:18:03 2008 +0400 +++ b/mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java Wed Jul 23 09:32:14 2008 +0400 @@ -175,7 +175,7 @@ } public String getName() { - return "mercurial"; + return Constants.VCS_NAME; } @Used("jsp")
--- a/mercurial.ipr Wed Jul 23 09:18:03 2008 +0400 +++ b/mercurial.ipr Wed Jul 23 09:32:14 2008 +0400 @@ -439,19 +439,19 @@ <component name="libraryTable"> <library name="TeamCityAPI-server"> <CLASSES> - <root url="jar://$PROJECT_DIR$/mercurial-server/lib/server-api.jar!/" /> + <root url="jar://$PROJECT_DIR$/lib/server-api.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES> - <root url="jar://$PROJECT_DIR$/mercurial-server/lib/src/openApi-source.jar!/" /> + <root url="jar://$PROJECT_DIR$/lib/src/openApi-source.jar!/" /> </SOURCES> </library> <library name="IDEA-openapi"> <CLASSES> - <root url="jar://$PROJECT_DIR$/mercurial-server/lib/resources_en.jar!/" /> - <root url="jar://$PROJECT_DIR$/mercurial-server/lib/util.jar!/" /> - <root url="jar://$PROJECT_DIR$/mercurial-server/lib/openapi.jar!/" /> - <root url="jar://$PROJECT_DIR$/mercurial-server/lib/annotations.jar!/" /> + <root url="jar://$PROJECT_DIR$/lib/util.jar!/" /> + <root url="jar://$PROJECT_DIR$/lib/openapi.jar!/" /> + <root url="jar://$PROJECT_DIR$/lib/resources_en.jar!/" /> + <root url="jar://$PROJECT_DIR$/lib/annotations.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -486,32 +486,41 @@ </library> <library name="TeamCity-impl"> <CLASSES> - <root url="jar://$PROJECT_DIR$/mercurial-server/lib/patches-impl.jar!/" /> + <root url="jar://$PROJECT_DIR$/lib/patches-impl.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> <library name="Log4j"> <CLASSES> - <root url="jar://$PROJECT_DIR$/mercurial-server/lib/log4j-1.2.12.jar!/" /> + <root url="jar://$PROJECT_DIR$/lib/log4j-1.2.12.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> <library name="GNU Trove"> <CLASSES> - <root url="jar://$PROJECT_DIR$/mercurial-server/lib/trove4j.jar!/" /> + <root url="jar://$PROJECT_DIR$/lib/trove4j.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> <library name="TeamCityAPI-common"> <CLASSES> - <root url="jar://$PROJECT_DIR$/mercurial-server/lib/common-api.jar!/" /> + <root url="jar://$PROJECT_DIR$/lib/common-api.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES> - <root url="jar://$PROJECT_DIR$/mercurial-server/lib/src/openApi-source.jar!/" /> + <root url="jar://$PROJECT_DIR$/lib/src/openApi-source.jar!/" /> + </SOURCES> + </library> + <library name="TeamCityAPI-agent"> + <CLASSES> + <root url="jar://$PROJECT_DIR$/lib/agent-api.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES> + <root url="jar://$PROJECT_DIR$/lib/src/openApi-source.jar!/" /> </SOURCES> </library> </component>
--- a/mercurial.xml Wed Jul 23 09:18:03 2008 +0400 +++ b/mercurial.xml Wed Jul 23 09:32:14 2008 +0400 @@ -46,14 +46,14 @@ <!-- Project Libraries --> <path id="library.teamcityapi-server.classpath"> - <pathelement location="${basedir}/mercurial-server/lib/server-api.jar"/> + <pathelement location="${basedir}/lib/server-api.jar"/> </path> <path id="library.idea-openapi.classpath"> - <pathelement location="${basedir}/mercurial-server/lib/resources_en.jar"/> - <pathelement location="${basedir}/mercurial-server/lib/util.jar"/> - <pathelement location="${basedir}/mercurial-server/lib/openapi.jar"/> - <pathelement location="${basedir}/mercurial-server/lib/annotations.jar"/> + <pathelement location="${basedir}/lib/util.jar"/> + <pathelement location="${basedir}/lib/openapi.jar"/> + <pathelement location="${basedir}/lib/resources_en.jar"/> + <pathelement location="${basedir}/lib/annotations.jar"/> </path> <path id="library.teamcity-testssupport.classpath"> @@ -73,19 +73,23 @@ </path> <path id="library.teamcity-impl.classpath"> - <pathelement location="${basedir}/mercurial-server/lib/patches-impl.jar"/> + <pathelement location="${basedir}/lib/patches-impl.jar"/> </path> <path id="library.log4j.classpath"> - <pathelement location="${basedir}/mercurial-server/lib/log4j-1.2.12.jar"/> + <pathelement location="${basedir}/lib/log4j-1.2.12.jar"/> </path> <path id="library.gnu_trove.classpath"> - <pathelement location="${basedir}/mercurial-server/lib/trove4j.jar"/> + <pathelement location="${basedir}/lib/trove4j.jar"/> </path> <path id="library.teamcityapi-common.classpath"> - <pathelement location="${basedir}/mercurial-server/lib/common-api.jar"/> + <pathelement location="${basedir}/lib/common-api.jar"/> + </path> + + <path id="library.teamcityapi-agent.classpath"> + <pathelement location="${basedir}/lib/agent-api.jar"/> </path> @@ -135,71 +139,6 @@ </target> - <!-- Module mercurial-agent --> - - <dirname property="module.mercurial-agent.basedir" file="${ant.file}"/> - - - - <property name="compiler.args.mercurial-agent" value="${compiler.args}"/> - - <property name="mercurial-agent.output.dir" value="${module.mercurial-agent.basedir}/mercurial-agent/classes"/> - <property name="mercurial-agent.testoutput.dir" value="${module.mercurial-agent.basedir}/mercurial-agent/classes"/> - - <path id="mercurial-agent.module.bootclasspath"> - <!-- Paths to be included in compilation bootclasspath --> - </path> - - <path id="mercurial-agent.module.classpath"/> - - <path id="mercurial-agent.runtime.module.classpath"> - <pathelement location="${mercurial-agent.output.dir}"/> - </path> - - - <patternset id="excluded.from.module.mercurial-agent"> - <patternset refid="ignored.files"/> - </patternset> - - <patternset id="excluded.from.compilation.mercurial-agent"> - <patternset refid="excluded.from.module.mercurial-agent"/> - </patternset> - - <path id="mercurial-agent.module.sourcepath"> - <dirset dir="${module.mercurial-agent.basedir}/mercurial-agent"> - <include name="src"/> - </dirset> - </path> - - - <target name="compile.module.mercurial-agent" depends="compile.module.mercurial-agent.production,compile.module.mercurial-agent.tests" description="Compile module mercurial-agent"/> - - <target name="compile.module.mercurial-agent.production" description="Compile module mercurial-agent; production classes"> - <mkdir dir="${mercurial-agent.output.dir}"/> - <javac destdir="${mercurial-agent.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true"> - <compilerarg line="${compiler.args.mercurial-agent}"/> - <bootclasspath refid="mercurial-agent.module.bootclasspath"/> - <classpath refid="mercurial-agent.module.classpath"/> - <src refid="mercurial-agent.module.sourcepath"/> - <patternset refid="excluded.from.compilation.mercurial-agent"/> - </javac> - - <copy todir="${mercurial-agent.output.dir}"> - <fileset dir="${module.mercurial-agent.basedir}/mercurial-agent/src"> - <patternset refid="compiler.resources"/> - <type type="file"/> - </fileset> - </copy> - </target> - - <target name="compile.module.mercurial-agent.tests" depends="compile.module.mercurial-agent.production" description="compile module mercurial-agent; test classes" unless="skip.tests"/> - - <target name="clean.module.mercurial-agent" description="cleanup module"> - <delete dir="${mercurial-agent.output.dir}"/> - <delete dir="${mercurial-agent.testoutput.dir}"/> - </target> - - <!-- Module mercurial-common --> <dirname property="module.mercurial-common.basedir" file="${ant.file}"/> @@ -270,6 +209,80 @@ </target> + <!-- Module mercurial-agent --> + + <dirname property="module.mercurial-agent.basedir" file="${ant.file}"/> + + + + <property name="compiler.args.mercurial-agent" value="${compiler.args}"/> + + <property name="mercurial-agent.output.dir" value="${module.mercurial-agent.basedir}/mercurial-agent/classes"/> + <property name="mercurial-agent.testoutput.dir" value="${module.mercurial-agent.basedir}/mercurial-agent/classes"/> + + <path id="mercurial-agent.module.bootclasspath"> + <!-- Paths to be included in compilation bootclasspath --> + </path> + + <path id="mercurial-agent.module.classpath"> + <path refid="library.teamcityapi-agent.classpath"/> + <pathelement location="${mercurial-common.output.dir}"/> + <path refid="library.teamcityapi-common.classpath"/> + <path refid="library.idea-openapi.classpath"/> + </path> + + <path id="mercurial-agent.runtime.module.classpath"> + <pathelement location="${mercurial-agent.output.dir}"/> + <path refid="library.teamcityapi-agent.classpath"/> + <pathelement location="${mercurial-common.output.dir}"/> + <path refid="library.teamcityapi-common.classpath"/> + <path refid="library.idea-openapi.classpath"/> + </path> + + + <patternset id="excluded.from.module.mercurial-agent"> + <patternset refid="ignored.files"/> + </patternset> + + <patternset id="excluded.from.compilation.mercurial-agent"> + <patternset refid="excluded.from.module.mercurial-agent"/> + </patternset> + + <path id="mercurial-agent.module.sourcepath"> + <dirset dir="${module.mercurial-agent.basedir}/mercurial-agent"> + <include name="src"/> + </dirset> + </path> + + + <target name="compile.module.mercurial-agent" depends="compile.module.mercurial-agent.production,compile.module.mercurial-agent.tests" description="Compile module mercurial-agent"/> + + <target name="compile.module.mercurial-agent.production" depends="compile.module.mercurial-common" description="Compile module mercurial-agent; production classes"> + <mkdir dir="${mercurial-agent.output.dir}"/> + <javac destdir="${mercurial-agent.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true"> + <compilerarg line="${compiler.args.mercurial-agent}"/> + <bootclasspath refid="mercurial-agent.module.bootclasspath"/> + <classpath refid="mercurial-agent.module.classpath"/> + <src refid="mercurial-agent.module.sourcepath"/> + <patternset refid="excluded.from.compilation.mercurial-agent"/> + </javac> + + <copy todir="${mercurial-agent.output.dir}"> + <fileset dir="${module.mercurial-agent.basedir}/mercurial-agent/src"> + <patternset refid="compiler.resources"/> + <type type="file"/> + </fileset> + </copy> + </target> + + <target name="compile.module.mercurial-agent.tests" depends="compile.module.mercurial-agent.production" description="compile module mercurial-agent; test classes" unless="skip.tests"/> + + <target name="clean.module.mercurial-agent" description="cleanup module"> + <delete dir="${mercurial-agent.output.dir}"/> + <delete dir="${mercurial-agent.testoutput.dir}"/> + </target> + + <!-- Module mercurial-server --> <dirname property="module.mercurial-server.basedir" file="${ant.file}"/> @@ -448,7 +461,7 @@ <!-- Perform any build initialization in this target --> </target> - <target name="clean" depends="clean.module.main, clean.module.mercurial-agent, clean.module.mercurial-common, clean.module.mercurial-server, clean.module.mercurial-tests" description="cleanup all"/> + <target name="clean" depends="clean.module.main, clean.module.mercurial-common, clean.module.mercurial-agent, clean.module.mercurial-server, clean.module.mercurial-tests" description="cleanup all"/> - <target name="all" depends="init, clean, compile.module.main, compile.module.mercurial-agent, compile.module.mercurial-common, compile.module.mercurial-server, compile.module.mercurial-tests" description="build all"/> + <target name="all" depends="init, clean, compile.module.main, compile.module.mercurial-common, compile.module.mercurial-agent, compile.module.mercurial-server, compile.module.mercurial-tests" description="build all"/> </project> \ No newline at end of file