Search This Blog

Sunday, February 24, 2008

build.xml for An Apache ant way for a management console for SVN

Here it is. The one which i have written till now. it is not complete yet. still, if anyone wanna have a look at it. Please do so, and if you have any bright ideas please let me know.....
so here you go

 

 

<project name = "SVN Management tool" default="manage">

    <taskdef name="antform" classname="com.sardak.antform.AntForm" classpathref="classpath"/>
    <taskdef name="if" classname="net.sf.antcontrib.logic.IfTask" classpathref="classpath"/>
    <path id = "classpath">
        <fileset dir="lib">
            <include name="*.jar"/>
        </fileset>
    </path>
    <property name="repo" value="E:\repos"/>
    <target name="manage">
        <antform title="MANAGE SVN" lookAndFeel="com.sun.java.swing.plaf.windows.WindowsLookAndFeel" showwhenempty="yes">
        <ButtonBar>
            <button label="Create Repository" target="newrepo"/>
        </ButtonBar>
        <ButtonBar>
            <button label="Generate Config" target="config"/>
        </ButtonBar>
        <ButtonBar>
            <button label="Generate ACL" target="acl"/>
        </ButtonBar>
        <ButtonBar>
            <button label="Exit" target="exit"/>
        </ButtonBar>
        <controlbar/>
        </antform>
    </target>

    <target name="newrepo">
        <antform title="Create New Repository" lookAndFeel="com.sun.java.swing.plaf.windows.WindowsLookAndFeel" showwhenempty="yes">
            <textProperty label="Enter new repository name" property="reponame" Required="yes"/>
        <ButtonBar>
            <button label="Create" target="createrepo"/>
            <button label="Back" target="manage"/>
            <button label="Exit" target="exit"/>
        </ButtonBar>
        <controlbar/>
        </antform>
    </target>

    <target name="exit">
        <echo message="Bye Bye"/>
    </target>

    <target name="createrepo">
        <echo message="${reponame}"/>
        <echo message="Checking if the repository already exists"/>
        <available file="${repo}/${reponame}" type="dir" property="repo.present"/>
        <if>
        <equals arg1="${repo.present}" arg2="true"/>
            <then>
                <echo message="Repository with the name already exists"/>
                <property name="repo.present" value="false"/>
                <antform title="Repository Already Exists" lookAndFeel="com.sun.java.swing.plaf.windows.WindowsLookAndFeel" showwhenempty="yes">
                    <ButtonBar>
                        <button label="Ok" target="manage"/>
                        <button label="Exit" target="exit"/>
                    </ButtonBar>
                    <controlbar/>
                </antform>
            </then>
            <else>
                <echo message="creating repository ${reponame}"/>
                <exec executable="svnadmin">
                    <arg value="create"/>
                    <arg value="${repo}\${reponame}"/>
                </exec>
                <available file="${repo}/${reponame}" type="dir" property="repo.present"/>
                <if>
                    <equals arg1="${repo.present}" arg2="true"/>
                    <then>
                        <echo message="Creation of repository ${reponame} successful"/>
                    </then>
                    <else>
                        <echo message="Creation of repositoru ${reponame} failed"/>
                    </else>
                </if>
            </else>
        </if>
    </target>

    <target name="config">
        <antform title="Generate Config" lookAndFeel="com.sun.java.swing.plaf.windows.WindowsLookAndFeel" showwhenempty="yes">
            <textProperty label="Generate For repository : " property="repoconf" Required="yes"/>
            <ButtonBar>
                <button label="Generate" target="config-generator"/>
                <button label="Back" target="manage"/>
                <button label="Exit" target="exit"/>
            </ButtonBar>
            <controlbar/>
        </antform>
    </target>

    <target name="config-generator">
        <exec executable="php">
            <arg value="conf.php"/>
            <arg value="${repoconf}"/>
        </exec>
    </target>

    <target name="acl">
        <antform title="Generate ACL" lookAndFeel="com.sun.java.swing.plaf.windows.WindowsLookAndFeel" showwhenempty="yes">
            <textProperty label="AccessControl For repository : " property="acllist" Required="yes"/>
            <textProperty label="User's list (seperated by space : " property="aclusers" Required="yes"/>
            <ButtonBar>
                <button label="Generate" target="acl-generator"/>
                <button label="Back" target="manage"/>
                <button label="Exit" target="exit"/>
            </ButtonBar>
            <controlbar/>
        </antform>
    </target>

    <target name="acl-generator">
        <exec executable="php">
            <arg value="acl.php"/>
            <arg value="${acllist}"/>
            <arg value="${aclusers}"/>
        </exec>
    </target>

    <target name="users">
        <antform title="Create / Modify user login credentials" lookAndFeel="com.sun.java.swing.plaf.windows.WindowsLookAndFeel" showwhenempty="yes">
            <textProperty label="Enter TMC Number" property="tmc" Required="yes"/>
            <ButtonBar>
                <button label="Create/Modify" target="createmodify"/>
                <button label="Back" target="manage"/>
                <button label="exit" target="exit"/>
            </ButtonBar>
            <controlbar/>
        </antform>
    </target>

    <target name="createmodify">
        <echo message="Creating / Modifying ${tmc}'s Login Credentials"/>
        <exec executable="htpasswd">
            <arg value="-m"/>
            <arg value="d:\svn-auth-file-test"/>
            <arg value="$tmc"/>
        </exec>
    </target>
</project>

An Apache ant way for a management console for SVN

Hmmm, long time been lazy. i been doin nothing other than just working on some dimensions..... But came the saturday(yesterday) and i was stranded, coz i had time with me. Free Time. something, which i did not have for the past few weeks. Well anyway, since being not doing anything was a bit sick, i decided to study the ant manual and learn few more things... and suddenly out of no where, a bulb lit up and an idea came. why not develop a management console kinda thing for SVN, coz the guyz back at office are not gonna be as techie and... and... something like an aspiring geek (like me). so why not develop a GUI kinda stuff for them. and why not use ANT for it. i know, it may be a wrong idea, or even suicide......, but who cares, to play with nature is the work of scientists. so there i went on work and did a pretty decent job at hand. but i know it is not complete yet. am still working on ways to make it perfect. Still there are loop holes. and stuff. I'll put in the raw code which i have so that if there are any one who wanna help me out or do stuff, then please help me out, coz i do not know ant that very well.

Though ant itself has some thing to address issues with svn i could not get to it. also there was no manual or something from which i can learn which i was unable to find......

I had to also use php for writing the configuration files..(to know the setup which i use for svn server you can check out the post here)... i think this part with php is pretty much solved, but still there is an issue send parameters to the php program from ant.... will soon solve 'em....
Will post the build file and the php progs soon.......

----------------
Now playing: Instrumental - Matrix Theme
via FoxyTunes

Saturday, February 16, 2008

Migration 2.4.2

Hmm,

2.4 seems to be like a dirty trick. But it crossed the first step successfully. the editor opened successfully. but when trying to create a child it cracks. Need to check. logs indicate a datatype mismatch problem. let's check it out.

----------------
Now playing: MegaDeath - Duke Nukem Theme
via FoxyTunes

Migration 2.4.1

A minor version change in the migration process. yes, now i am trying to migrate it to version 2.4. It did not work out of the box with 2.3 release. so now am trying to check with 2.4

It's funny. how something which works in a lower version fails to work in the newer one. is all things built in such a way that they leave support for something which they built in a few version ago. or is all applications supposed to give such problems on migration.

As far as i know, migration means pain!!!!!!!!!

----------------
Now playing: Linkin Park - Cure for the Itch
via FoxyTunes

Friday, February 15, 2008

Migration 2.3.4

All Dbqueries are throwing error. The same error which occured when we startd to try to fix the problem which has led to this migration thingy.......

Now i am trying to install the 2.4 release and let's try to migrate it to it. and see what will happen... Let the games begin......

----------------
Now playing: - HIP HIP HOORAY
via FoxyTunes

Migration 2.3.3

Hmmm, server starts without any probs, i was too nervous and started to acces without deploying anything in the server, in the nick of the moment i stopped and deployed everything. Now am gonna access it. and check the flow. hope everything works


----------------
Now playing: Dhoom - Dhoom majaadhan
via FoxyTunes

Migration 2.3.2

Hmmm, installed version 2.3 with all upgrade packs. also copied all the files which had fixes (as much as i can remember). saved all the required models. Now i am gonna start the new server.
Hope everything goes well. i have my fingers crossed!!!!!


----------------
Now playing: Dhoom - Kaadhala Saadhala
via FoxyTunes

Migration 2.3.1

Installation of 2.3 release with all upgrade packs done.
Beginning importing of models from old to new development environment

----------------
Now playing: TamilBeat.Com - Saroja Saman Nikalo
via FoxyTunes

Migration 2.3

Yesterday, They kept a big aapu for me. I will have to migrate the so and so application to another version. aaana yendha version, nobody knows. so i am going to try to migrate to 2.3 release and also to 2.4 release.

Now installing 2.3 release.

Will report back with any further developments.

----------------
Now playing: TamilBeat.Com - World Cup Jejikka
via FoxyTunes

somethings which happened. when offline.

Am posting from office!!! :(

Feb 3rd.

It's February. And my system is back, alive, super kool. It is that time of year, when my system breaks the hibernation of winter and starts to work properly again. It has been two months, since it had stopped to work properly. The same happened last year too, but again, why bother when it is working again. Hanh....

Meanwhile a lot of things happened in the last two months. Though system was there with me for a while in December, but in January, it was not the case. and a lot happened. Like Anitha's Sapadu poduthal, a new year, Citi Projects, me becoming permanent, again setting up the svn server (this time in windows), disconnecting from TATA Indicom Broadcom service Provider. now i have signed up with Airtel, but the connection is not up yet, and satish came back from qatar for holidays (or should i say leave).

All 3 Os's are running again, kewl. But i ain't finding time to sit in my computer to write to you, to my friends, to everyone. now i am going to write and save it my mobile and also in my system, so the next time i get access to a system with net, i'll try to post it.

It's late. will write again later 4 sure. Till then bye.


Feb 4th.


Ah! Traveling by bus. Wat a nice experience. I had missed it for a long time. Traveling in a bus, sitting by a window and enjoying, watching outside, at night. It is such a wonderful experience. It’s been a really long time since I had traveled by bus to any where. It was a really nice experience which brought back lot of old memories. The memories of traveling to college from Madipakkam to Camp Road, the days before Internet access. It was a really wonderful experience. I had a chance today and I grabbed it. I don’t know when I am gonna get this experience again!!...



Feb 6th.

Am gonna handle the next section of the proj for the Naragavangi.
Kewl isn't it.
it is a bit frightening,
what the fuck!!! why the hell are u afraid of challenges,
it is not challenges that i am afraid of, but the responsibility.
It is the challenges that are important, reposibilities will be filled up automatically.

Hmmm. Satish is leaving for qatar saturday morning 3 am. I the whole one month that he was here, i didn't visit his house, and i couldn't make time so as to he can visit mine. What the big hell am i working for. Now he will come back only after 2 years. till then again we will have to talk via phones and emalis and chats only.