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

Re: Incorrect error message on svn copy? Advice?

From: Ryan Schmidt <subversion-2014_at_ryandesign.com>
Date: Wed, 21 May 2014 05:22:46 -0500

On May 20, 2014, at 17:02, Dan Ellis wrote:

> I'm wondering if I'm getting an incorrect error message...
>
> I'm attempting to copy a file from a working copy to the server, but using an incorrect case for one of the folders in the path. The paths all exist and everything works fine using correct case. In the example below, "FOO" exists on the server as "foo".
>
> (Case 1)
> c:\Project_files\sandbox>svn copy bar.c http://svr/repo/some_project/FOO/bar.c -m "text commit"
> Adding copy of bar.c
> svn: E155011: Commit failed (details follow):
> svn: E155011: File 'C:\Project_files\sandbox\bar.c' is out of date
> svn: E160013: File not found: transaction '4249-3lp', path '/some_project/FOO/bar.c'

You're trying to create something in the non-existent directory FOO, which is an error. It never gets to the point of calling your hook script. (The message might be clearer if it said "Directory not found: , path '/some_project/FOO'" instead of "File not found: , path '/some_project/FOO/bar.c'".)

> If I correctly use "foo" instead of "FOO", I get the expected response:
>
> (Case 2)
> c:\Project_files\sandbox>svn copy bar.c http://svr/repo/some_project/foo/bar.c -m "test commit"
> Adding copy of bar.c
>
> Committed revision 4249.

You've asked Subversion to create a file in an existing folder. No problem.

> If I use --parents to create the path (in case it doesn't exist):
>
> (Case 3)
> c:\Project_files\sandbox>svn copy --parents bar.c http://svr/repo/some_project/FOO/bar.c -m "test commit"
> Adding copy of bar.c
> svn: E165001: Commit failed (details follow):
> svn: E165001: Commit blocked by pre-commit hook (exit code 1) with output:
> ** ERROR-CASE: This repository is set to be case insensitive.
> ** ERROR-CASE: Clash: '/some_project/FOO' '/some_project/foo'

You've asked Subversion to create a directory FOO when a directory foo already exists, which would be fine, except your hook script prevents case collisions.

> It appears we are using a server-side script to prevent name clashes (since we are using windows clients) on our server in Case 3. Why would Case 3 get caught (--parents) but Case 1 seem to slip by this server side script and return a different error? I assume we're using the stock case-insensitive.py, but regardless, I don't understand the behavior difference.
>
> As I would expect, I cannot perform an "svn info" on the incorrect-cased path. I was hoping I could do an "svn info" to test/determine what the case corrected path is, but will have to try an "svn copy --parents" first and if it fails due to a case clash, retry with the returned clash info. Is there a better way to accomplish this? I do understand this is more of a corner use case, especially since Subversion is (properly IMO) designed around case sensitivity.

What exactly are you trying to accomplish? If the problem is that you don't know the names (or cases) of the directories in the repository, then you can use "svn ls" to find out.
Received on 2014-05-21 12:23:26 CEST

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

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