10

Is it possible to get the SVN history of a user? I have a repo and created new accounts for new developers joining the team. A few days have gone past with no status updates from them and what appears to be no work completed. I am trying to figure out if they ever access SVN and checked out the latest code. Can I do that?

UPDATE: I mean checkout, I am looking for an access log type thing based on users. I want to be able to look up user1 and see when they checked out the project and when they updated. I don't care what code they changed, I just want to see when they last accessed the code.

user602464
  • 243
  • 1
  • 2
  • 10
  • 6
    Social solution seems to be the best: Ask the newbies how they are doing. They'll feel more cared for, and you'll get your answer quicker. – thiton Feb 07 '12 at 14:17
  • Did you mean 'checkin' instead of 'checkout' history? Having detailed explanation of what you want, checkout history does not make sense for me. It is a result of the task you gave your developers matters, doesn't it? In case task is completed, it would be *checked in* into the repository. – altern Feb 07 '12 at 15:12
  • If you mean 'checkout' you can always write a server-side hook. If you mean 'checkin' - we used to email a daily report of `svn log` messages split by user. It doesn't take long to write the script in, say, python, and then cron it up, as `svn log` can be regex'd easily. There are also a bunch of 'svn watch' type freeware apps that sit in your Windows task-tray, and monitor your repositories for commits. – Barry Feb 07 '12 at 17:20
  • I mean checkout. I will look into server-side hooks. – user602464 Feb 07 '12 at 20:35

3 Answers3

6

Depending on how your server is configured and what access you have you should have visibility. If you're running svn over apache (http or https), you'll want to look at apache's log. It will list if they've checked out or even browsed the code (web browser or tortoise` repo browser) by default going to be in /var/log/httpd

The logging including the location is configurable in your subversion.conf Once you find the logs you're likely going to want to setup a customlog directive to change the format something like

LogFormat "%{%Y-%m-%d %T}t %u@%h %>s repo:%{SVN-REPOS-NAME}e %{SVN-ACTION}e (%B Bytes in %T Sec)" svn

That will make it much more readable, and easier to find entries created due to your new people.

teh red book has some good info on it.

thekbb
  • 7,668
  • 1
  • 36
  • 61
  • 1
    maybe one should note that supervising work this way can be illegal (in some countries) without allowance of working council. – Offler Mar 20 '13 at 07:20
  • 1
    Perhaps... but keeping tabs on your data is often required via corporate policy, or in some regulated industry. Having the information is different from using it for personnel matters. I think it's silly for anyone to assume that perusing data doesn't leave a trail. – thekbb Jun 17 '13 at 03:39
  • "required via corporate policy" yep, and i know at least one big company in germany which was sued 5 years ago for keeping person related data and it is now paying millions per year for a compliance program and following a regulatory framework. Also having and keeping can cause a lot of problems (if you have person related data you also must make sure that not everybody can see it and so on. (For example: An log which can be watched by an admin could tell him things he is not allowed to know. So also access to the log would need to be restricted (which nearly nobody does, until sued)) – Offler Jun 17 '13 at 06:01
  • 2
    Really? Every website will track your usage in their logs right now - all of them. You can take issues around "personal liberties" just way too far from common sense. No-one would do any work, and companies will end up paying out for bullshit "compliance" that again will just come back to bite you, when you try to do some work and have to justify everything you do because of some officious compliance officer overdoes the restrictions. You don't want to work in a Dilbert-esque world, just say no to this kind of nonsense. – gbjbaanb Sep 17 '13 at 14:07
0

Edit: I just want to add that adding a SVN server-side hook is not an option, because there is no "checkout" hook. Also see this SO question: Is there a Subversion Checkout Hook or something similar?

Community
  • 1
  • 1
László van den Hoek
  • 3,955
  • 1
  • 23
  • 28
-1

You can use SVNStat to generate various reports, including checkins by user.

Ernest Friedman-Hill
  • 80,601
  • 10
  • 150
  • 186
  • 4
    it wasn't me (not that it matters) this answer doesn't solve the question: he wants to know who has accessed the repo, not how much they have committed. ie, how much have they read from the repo. SVNStat only deals with checkins. – gbjbaanb Feb 08 '12 at 17:59