Announcement

Collapse
No announcement yet.

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

Collapse
X
  • 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?

    thanks

  • #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.

    Comment


    • #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:

      [url]https://stackoverflow.com/questions/11867141/how-do-i-get-the-svn-server-log[/url]

      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.

      thanks

      Comment


      • #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).

        Comment


        • #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:

          [url]https://stackoverflow.com/questions/4881129/how-do-you-see-recent-svn-log-entries#[/url]

          [url]https://stackoverflow.com/questions/2729556/svn-log-svn-is-not-a-working-copy[/url]

          [url]http://svnbook.red-bean.com/en/1.0/re15.html[/url]







          Comment


          • #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.

            Comment


            • #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.

              thanks

              Comment

              Working...
              X