No announcement yet.

How to find the location of Subversion repository in Linux

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to find the location of Subversion repository in Linux


    One of the developer have created a repository in Linux server and is checking out the code from repository through TortoiseSVN by giving repository path 'svn://<server-name>/<project reponame>'. He left now and no documentation is available.

    I have logged in to that server as root and run find command for the directory <project reponame>. And i don't see any.

    Could some one help me out what i should check to find the physical location of that repository in Linux server.

    But i am also able to checkout the code from that server with specifying the above url in my TortoiseSVN client.


  • #2
    Hi Palki

    Interesting... I think that the developer will have started svnserve with the "--root" ("-r") option to specify the root of all repositories (hence you can specify the repository name immediately after the server name). I'd guess that the developer set up svnserve to start automatically when the server starts, so take a look at the server's init scripts - the location will depend on your operating system but may be at, for example, /etc/init.d/svnserve. The init script for svnserve (if it exists) will specify the root of all repositories using the "--root" argument.

    If that doesn't work you could try "locate ${REPOSITORY_NAME}", though that could be tricky if the repository name is something common.

    Finally - can you simply ask the developer? If the repository is important have they documented it? If not, why not? If the repository is not important can you simply ignore it (probably best to kill the svnserve process on that server)?

    John Niven


    • #3
      Thanks John.

      Developer who had done that had left the team and no body have any idea about it.
      But i am not able to find 'svnserve' directory under /etc/init.d
      and i am not able to see the repository with 'locate <repository_name>'.

      But i see following when i search for svn.
      find / -type d -name "*svn*"

      In case if i has to freshly start settingup 'subversion server'. Can you please tell me tell me the steps and the default locations where i should install it. The OS is RedHat linux Enterprise 3.

      Thanks alot for your help



      • #4
        Look for a directory called "revprops". This is one of the child directories of any repository database.

        If that doesn't work, look for a file with a name starting with "pre-commit". There's a pre-commit.tmpl created by default in every repository's hooks directory.

        You won't get step by step handholding here. Installation/configuration is very well documented in the Subversion book,
        I am neither an employee nor customer of WANDisco.


        • #5
          Find your repository

          Hi palki,
          What i did is to enter into the project directory, inside the .svn there is a file called entries.

          there you can find the repository..

          example; $cat myproject/.svn/entries

          I find the repository there..

          Kind Regards,


          • #6
            That will only tell you the URL. That information can be gleaned (the right way) from svn info.

            The OP was looking for help finding the repository on the server itself.
            I am neither an employee nor customer of WANDisco.


            • #7
              you can check how the 'svnserve' command was run in order to find the phyisical path:
              ps -A -f | grep svnserve

              Output will be something like:
              svnadmin 25926 16450 0 nov 15 ? 0:00 /usr/local/bin/svnserve -d -r /PATH/TO/REPOSITORIES/


              • #8
                Every repository contains a file called 'fs-type' apart from very old repositories created by Subversion 1.0. If you have a locate database then

                locate fs-type


                find / -type f -name fs-type