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

Can't Lock Files When Using SVNServe (svn-win32-1.2.3)

From: Lancki, Ed <ed.lancki_at_lmco.com>
Date: 2006-01-20 16:32:05 CET

I am evaluating SVN for use with versioning binary files on Windows workstations over a network. I installed svn-win32-1.2.3 on a PC runniing Win XP Pro. To keep things simple, I used SVNServe and modified the svnserve.conf file to permit anonymous writes. For my experiment, I created a folder with a couple of text files in it to place under version control. Things seemed to work as described in the Version Control with Subversion For Subversion 1.2 book until I tried to lock a file. It appears that the server expects some authentication, in spite of the fact that I permitted anonymous writes. Furthermore, I was not prompted for a user ID or password, not did attempts at providing a user and password make any difference.
This is my first attempt at using version control S/W, so it is possible that the problem may be due to operator error. I have attached below, the steps that I went through to create a repository and interact with it.
Any advice that helps resolve the problem will be greatly appreciated. Thanks,
Ed Lancki
---------------------------------------------------------------------------------------------------------------------
Create the repository "xyzrep":
C:\Program Files\Subversion\bin>svnadmin create c:\xyzsvn\xyzrep --fs-type fsfs

Start SVNServe in a separate command window, setting the root to c:\xyzsvn:
C:\Program Files\Subversion\bin>svnserve -d -r C:\xyzsvn

I modified the following file to allow anonymous writes:
C:\xyzsvn\xyzrep\conf\svnserve.conf to remove hash before [general] and make anon_access = write
        [general]
        anon-access = write
        # auth-access = write
        # password-db = passwd
        # realm = My First Repository
                                                                                                                                

The network name of the workstation is kcct1n2.
Import a folder "xyz" into the repository called "xyzrep":
C:\>svn import -m "New import" xyz svn://kcct1n2/xyzrep
Adding xyz\xyzf1.txt
Adding xyz\xyzf2.txt

Committed revision 1.

Here is what the repository looks like:
C:\>tree xyzsvn /F
C:\XYZSVN
+---xyzrep
     format
     README.txt
    
    +---conf
     passwd
     svnserve.conf
    
    +---dav
    +---db
     current
     format
     fs-type
     uuid
     write-lock
    
     +---revprops
     0
     1
    
     +---revs
     0
     1
    
     +---transactions
    +---hooks
     post-commit.tmpl
     post-lock.tmpl
     post-revprop-change.tmpl
     post-unlock.tmpl
     pre-commit.tmpl
     pre-lock.tmpl
     pre-revprop-change.tmpl
     pre-unlock.tmpl
     start-commit.tmpl
    
    +---locks
            db-logs.lock
            db.lock

Make a new working folder called xyzwc3:
C:\>mkdir xyzwc3

Checkout a copy of everything in "xyzrep".
C:\>svn checkout svn://kcct1n2/xyzrep xyzwc3
A xyzwc3\xyzf1.txt
A xyzwc3\xyzf2.txt
Checked out revision 1.

Here is what the working folder looks like:
(temporarily unhide C:\XYZWC3\.svn so tree command will list it)
C:\>tree xyzwc3 /F
C:\XYZWC3
xyzf1.txt
xyzf2.txt

+---.svn
     empty-file
     entries
     format
     README.txt
    
    +---prop-base
     xyzf1.txt.svn-base
     xyzf2.txt.svn-base
    
    +---props
     xyzf1.txt.svn-work
     xyzf2.txt.svn-work
    
    +---text-base
     xyzf1.txt.svn-base
     xyzf2.txt.svn-base
    
    +---tmp
     +---prop-base
     +---props
     +---text-base
     +---wcprops
    +---wcprops

Try to lock one of the text files:
C:\>svn lock C:\XYZWC3\xyzf1.txt -m "try locking xyzf1.txt"
svn: Cannot lock path 'xyzf1.txt', no authenticated username available.

I experimented with changing the svnserve.conf file to permit both anonymous and authorized write access:
Edit C:\xyzsvn\xyzrep\conf\svnserve.conf to remove hash before auth-access and password-db.
        [general]
        anon-access = write
        auth-access = write
        password-db = passwd
        # realm = My First Repository

Try to lock one of the text files again:
C:\>svn lock C:\XYZWC3\xyzf1.txt -m "try locking xyzf1.txt"
svn: Authentication error from server: Must authenticate with listed mechanism

I was never prompted for a user ID or password.

Try to lock one of the text files again, using one of the users and passwords listed in the "password" file:
C:\>svn lock C:\XYZWC3\xyzf1.txt -m "try locking xyzf1.txt" --username harry --password harryssecret
svn: Authentication error from server: Must authenticate with listed mechanism

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jan 20 16:36:05 2006

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.