[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [Subclipse-users] updating current directory from ant svn task on Windows

From: Eduard Kotysh <nutellaboi_at_gmail.com>
Date: 2007-03-23 20:37:33 CET

Hey Mark,

I have compared the 4 major environment variables from Ant's point of view
vs user environment: PATH, JAVA_HOME, ANT_HOME, CLASSPATH and didn't notice
anything major except Ant is trying to be smart and antify the ANT_HOME
depending on the platform by changing slashes.

I did several more experiments and here are some interesting results:

In DOS command prompt, from C:\tsunami\svn\build directory:

svn up -r HEAD . OK
svn up -r HEAD C:\tsunami\svn\build FAILS

so if I give a fully qualified path, something behaves differently than if I
give the current directory!

From cygwin however, both work:

svn up -r HEAD . OK
svn up -r HEAD C:\tsunami\svn\build OK

I then thought that DOS cmd locks the directory and did a little test. I
created a temp directory, cd'd into it, and then tried to delete it.
Both, DOS prompt and cygwin locked the directory and prevented me from
deleting it, so that theory didn't stand...

Second set of experiments:

We know that when we execute svn ant task like this, it fails:

                <svn javahl="false">
                        <update dir="." recurse="false" />
                </svn>

Well, if I execute it as plain executable and pass it . instead of fully
qualified path, it works:

                <exec executable="svn">
                        <arg line="up -r HEAD . --non-interactive"/>
                </exec>

This result right there makes me think that svn ant task implementation is
buggy.

Let me know what you think
Thanks

-Eduard

On 3/22/07, Eduard Kotysh <nutellaboi@gmail.com> wrote:
>
> That's a good idea, let me try that and I'll post the results.
>
> Thanks
>
> Ed
>
>
> On 3/22/07, Mark Phippard <markphip@gmail.com> wrote:
> >
> > On 3/22/07, Eduard Kotysh < nutellaboi@gmail.com> wrote:
> > >
> > > Mark, thanks for reply. I tried running: svn up -r HEAD
> > > c:\tsunami\svn\ed\build --non-interactive by hand and it succeeded no
> > > problem.
> > > I also tried running it under ant as an executable like this:
> > >
> > > <exec executable="svn">
> > > <arg line="up -r HEAD c:\tsunami\svn\ed\build
> > > --non-interactive"/>
> > > </exec>
> > >
> > > And that gave an error (same error as before, Working copy locked)
> > > which makes me conclude this is an Ant bug because error happens only when
> > > run under Ant environment.
> > >
> > > You also did point out an interesting thing about -N, indeed it
> > > doesn't show up even during successful run.
> > >
> > > Do you think I should bring this up at Ant's mailing list?
> > >
> >
> > I wonder if the environment is different when the command is run via
> > Java? I do not know how you could check that though. Maybe instead of
> > running svn.exe, run a .bat file that printed out all of the environment
> > variables? Not that I know how to do that.
> >
> >
> >
> > --
> > Thanks
> >
> > Mark Phippard
> > http://markphip.blogspot.com/
> >
>
>
Received on Fri Mar 23 20:37:45 2007

This is an archived mail posted to the Subclipse Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.