shashaDenovo
shashaDenovo

Reputation: 1638

Error in Svn Up : "svn: Server sent unexpected return value (403 Forbidden) in response to OPTIONS request for <URL>"

My OS Version:CentOS 6.0

My Svn Version:1.6.11

[shashaDenovo@shashaDenovo PRJ]$ svn info
Path: .
URL: http://xxx.xxx.x.xxx/projectPRJ/PRJ/trunk
Repository Root: http://xxx.xxx.x.xxx/projectPRJ
Repository UUID: some alph-numeric characters
Revision: 956
Node Kind: directory
Schedule: normal
Last Changed Author: shashaDenovo
Last Changed Rev: 956
Last Changed Date: 2012-02-16 17:18:04 +0530 (Thu, 16 Feb 2012)


My Project Dir Structure:
    PRJ
    ---srcDir
        ---dir_A
        ---dir_B
           -----dir1
                ----dir_@
                    -----file1.ext
                    -----file2.ext
                    -----file3.ext                
                ----dir_$
                    -----file4.ext
                    -----file5.ext
                    -----file6.ext
                ----dir_#
                    -----file7.ext                    
           -----dir2 
        ---dir_C

    ---libDir
    ---etcDir1
    ---etcDir2        

Problem:

In my project Some Time while doing svn up, I get conflict in some files, suppose I get conflict in file5.ext and then svn shows some options with tc, mc etc etc.

and if I want to keep either my or others conflict by using mc or tc and for that even though after double checking when I select mc or tc

And after committing the changes when I do svn up from my project root dir (i.e. PRJ here), it gives me following error message:-

[shashaDenovo@shashaDenovo PRJ]$ svn up  
svn: Server sent unexpected return value (403 Forbidden) in response to OPTIONS request for 'http://xxx.xxx.x.xxx/projectPRJ'

Any Suggestion why this behaviour of SVN ?

Upvotes: 3

Views: 8851

Answers (2)

0x4a6f4672
0x4a6f4672

Reputation: 28245

This error can happen if you checkout a SVN repository with a different account. The account data is stored to disk, and the next time you want to commit to a repository SVN may use the wrong account. It could help to specify the right account in the console or terminal:

svn commit -m "my message" --username my_username --password my_password

Upvotes: 2

shashaDenovo
shashaDenovo

Reputation: 1638

Solution: There is one obious solution is to delete the PRJ directory and do a fresh check-out.

But problem with this is, what if the time for a checkout runs around 2-3 hours, deleting and doing a complete new CO isn't a good option.

So what i did : i ran "for x inls; do echo Updating, $x; svn up $x; done" in parent dir of source-code files which i edited (i.e. dir1)

[shashaDenovo@shashaDenovo ~]$cd PRJ/srcDir/dir_B/dir1
[shashaDenovo@shashaDenovo dir1]$ for x in `ls`; do echo Updating, $x; svn up $x; done

Updating, dir_@
At revision 958.
Updating, dir_$
svn: Server sent unexpected return value (403 Forbidden) in response to OPTIONS request for 'http://XXX.XXX.X.XXX/projectPRJ'
Updating, dir_#
At revision 958.

From the output i came to know that some problem with "dir_$"

[shashaDenovo@shashaDenovo dir1]$ rm -fr dir_$
[shashaDenovo@shashaDenovo dir1]$ svn info             #you get URL from this command
[shashaDenovo@shashaDenovo dir1]$ svn co URL/dir_$
[shashaDenovo@shashaDenovo dir1]$ svn up

Its Done :)

However I deleted the corrupt folder in the file system and did checkout the directory with the problem. Although it does not really solved the error in a correct way but i saved my time :).

Note: You have to Check out the directory, you cannot check out file(it gives below error)

svn: URL 'http://xxx.xxx.x.xxx/projectPRJ/PRJ/trunk/srcDir/dir_B/dir1/dir_$/file5.ext' refers to a file, not a directory

If somebody has better idea, plz share.

Thanks

Upvotes: 4

Related Questions