Announcement

Collapse
No announcement yet.

How to query a repository based on properties?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to query a repository based on properties?

    I am a newbie to Subversion, and I wonder wheter it is possible to query a repository for files, or for file revisions, that have a particular property set.
    Specifically, I would like to retrieve the files revisions where, for example, "property1" is set to value "value".
    Is it possible, using the svn, svnlook or svadmin command lines?

  • #2
    Each revision has a set of directories and files starting at the repository root. Any specific account can be provided limited access (RW, R, None) to any and all of that via Path Based AuthZ. There is even a way to specify AuthZ so that an account will not have access to the repository root and some set of directories down to a point where access is granted (to use this scenario the user of that account must know the path down to that point even though they do not have access - strange but true). So a lot of your answer requires specific assumptions about just which account and which access.

    Let's take the easy case: full access (either R or RW) to the entire repo.

    Then it is easy to check out a working copy by specifying a specific revision (or HEAD), get a list of the files in the tree and then query each for a specific property and then check if it has a specific value.

    That's one way.

    You could also write a script to use the "svn ls" command to obtain a listing of all files and directories using -R (recursive) and specifying a specific revision. Take that list and once again and use "svn proplist" to enable checking for a specific value.

    Comment


    • #3
      Thanks for the answer.

      Comment

      Working...
      X