mac svn

svn admin

1.command introduction:   svnadmin command/path/to/repos [options] [args]

Available subcommands:

   crashtest

   create

   deltify

   dump

   help (?, h)

   hotcopy

   list-dblogs

   list-unused-dblogs

   load

   lslocks

   lstxns

   pack

   recover

   rmlocks

   rmtxns

   setlog

   setrevprop

   setuuid

   upgrade

   verify

                       svncommand [options] [args]


2.Procedures

  •       Find a path that you want to store the SVN project. Like /Users/<username>/foldername
  •       Use "svnadmin" to create a default SVN project

        svnadmin create /Users/<username>/<foldername>

        then you will find there is a svn directory created in you folder

  •      Change the authority of svn project

        edit file svnserve.conf,  delete the "#" before some lines. Lines as below should not be commented:

        #anon-access=read

        #auth-access=write

        #password-db=passwd

        #authz-db=authz

       edit file passwd, add your personal username and password in tab [users]

       edit file authz, config authority for your user

[groups]     #this line assigned user 'panjinya' as a member of group 'topgroup'

topgroup = panjinya

# harry_sally_and_joe = harry,sally,&joe


[/]         #this line means that users in group 'topgroup' will have read&write authority for the whole folder

@topgroup  = rw

  •        Start SVN server

       input  command in the terminal:   svnserve -d -r /Users/<foldername>/<yoursvnprojectname>

       or:                      svnserve -d -r /Users/<foldername>

       after inputing the command, if no warning in your terminal, the SVN server is started successfully!

  •       Stop svn server

3.use SVN to manage project

  •     checkout code from online svn address

    command:  svn checkout <svn url> --username <yourusername> --password <yourpassword> /Users/<foldername>/<yoursvnprojectname>

  •     update the latest code from svn

    Locate to your svn directory

    command:  svn update

  •     commit code from local project

    Locate to you svn directory

    command:  svn commit -m "yourfilename"


Troubleshooting

If you get a "Could not read response body: Connection reset by peer" error, the process for checkout or update will be interrupted.  Maybe there are too many connections to your SVN url, so your connection is stopped by server. But svn client still lock your project.

You can use command "svn cleanup" to unlock your project ,then use "svn update" to get latest code.



你可能感兴趣的:(mac svn)