[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: Mark Phippard <markphip_at_gmail.com>
Date: 2007-03-22 21:05:36 CET

On 3/22/07, Eduard Kotysh <nutellaboi@gmail.com> wrote:
>
> I believe I ran into a bug today. I wrote an ant svn task that simply
> updates the current directory.
> Here is the code inside my build.xml:
>
> <?xml version="1.0"?>
>
> <project name="test" basedir="." default="update">
>
> <!-- setup for the svn task -->
> <taskdef resource="svntask.properties" classpath="/c/tsunami/ant/apache-
> ant-1.7.0/dist/lib/svnant.jar"/>
>
> <target name="update" description="run SVN update">
> <svn javahl="false">
> <update dir="." recurse="false" />
> </svn>
> </target>
>
> </project>
>
> If I run ant -f build.xml in that directory, I get:
>
> Resulting Output:
>
> $ ant -f build.xml
> Buildfile: build.xml
>
> update:
> [svn] Using command line interface
> Svn : Updating
> up -r HEAD c:\tsunami\svn\ed\build --non-interactive
> svn: Working copy 'c:\tsunami\svn\ed\build' locked
> svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for
> details)
>
> BUILD FAILED
> c:\tsunami\svn\ed\build\build.xml:9: Cannot update dir
> c:\tsunami\svn\ed\build
>
> Total time: 0 seconds
>
> If I do svn stat, I don't see any outstanding locks, and svn cleanup
> doesn't do anything.
>
> If I go up a directory and run ant -f build/build.xml it works every time.
>
> I'm not sure what's going on, but sure looks like a bug and I don't like
> the workaround of going up a directory and running it from there.
>
> This error has been noted by another user last year, here is the post
> (although he suspected the whitespace in the path were causing the issue,
> but that's clearly not the case here because my path is just
> c:\tsunami\svn\ed\build):
> http://svn.haxx.se/subusers/archive-2006-10/0195.shtml
>
> Note: this is only problem on Windows running under either cygwin or plain
> command line
>
> Any help or ideas guys? Thank you
>

It would just be using your command line svn.exe and running the command
shown. All of that output would be stuff emitted from svn.exe. I would
think you could recreate the problem by opening a command window and running
the same command.

svn up -r HEAD c:\tsunami\svn\ed\build --non-interactive

Your goal should be to recreate it using just the plain old command line
because then you could report it on the Subversion users@ list and possibly
get a better explanation or even get someone to agree it is a bug.

One thing that does look odd is that you said recurse false, so the command
should also have the -N option. That being said the command logged in the
output is not the actual command line, just a marker we add so you know what
is being done. It is possible, there is just a bug in the output and the -N
is passed to the command line. Still, even if it was not passed, you would
expect the command to recurse, not fail. So try to recreate.

-- 
Thanks
Mark Phippard
http://markphip.blogspot.com/
Received on Thu Mar 22 21:05:47 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.