No announcement yet.

Is there a way to query a repo for transctions from the CLI?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Is there a way to query a repo for transctions from the CLI?

    Running Subversion on an older RHEL5 VM. The developers are using newer version of TortoiseSVN to access the repo. And I'm aware of TortoiseSVN Project Manager, it can show a history of transactions.

    What I was really wondering, is if there is a way to get something like this from the CLI. I was trying to pull all transactions, for certain repos, for the year 2018 for my manager. I don't see a way to do this from svnadmin and I'll looked around the Red Bean book.

    Is there a way to do this or not possible?


  • #2
    Ignoring revision property changes, for the most part Subversion "transactions" are known as "revisions". The CLI "svn log" command will show you them.

    As far as revision properties are concerned - I don't even know if it is possible to track down revision property changes after the fact. In general, you have to enable revision property changes by implementing a hook and if you're already doing that then you should log each change somewhere that you can go back and see later if that is a requirement.


    • #3

      Your right, I need to have hooks enabled, along with logging. Which I don't have either.

      For logging, I found the following answer on logging from another website:


      This repo has been around for along time now, can I setup the logging now?

      Looking thru the redbean pdf, looks like I'm limited on the repo hooks command. I'll have to look more into this and if I have more question or not sure, I can post back.



      • #4
        You can setup logging whenever you choose. Assuming that every line added to the log file has a date-stamp (e.g. 2019-01-04T13:23:56 ...) then it will be clear when the logging started :-)

        And if you don't have a "rev-prop-change" hook today then just ignore the whole revision property issue since it can't have been happening (the default value is NOT to allow revision property changing - you must have a hook to enable such changes).


        • #5

          From the CLI, I've noticed that the following only returns the last commit:

          [FONT=verdana]svnlook log /path/to/repo [/FONT]

          But even if I try

          [FONT=verdana]svn log /path/to/repo[/FONT]

          I get

          [FONT=verdana]svn: '/path/to/repo' is not a working copy[/FONT]

          This is not the working copy, however one of the repos living on the subversion repo.

          Using these URLs as reference:





          • #6
            If you type "svn log --help" you'll get a long explanation of all of the options and arguments.

            The "svn log" command takes a URL to specify the repository. A working copy is not required.

            If you are "on the server" then you should be using a URL will look like: "file:///path/to/repo" (yes, that's three slash characters in a row).
            If you were using Apache, then the URL would look like: "http://host.domain/svn/repoName" (depending on how the <Location> block is configured).
            If you simply specify a path then it gets interpreted as a URL for a working copy - hence the error you saw.


            • #7

              Great, got the following command to work:

              svn log file:///path/to repo

              I'm going to have to look more into hooks, see how I can automate the reporting from our repos.