tags:

views:

330

answers:

4

I have a subversion working copy checked out into the directory my-project/

I want to find out what user checked out that working copy. Is there a command I can run in that working copy directory to find out who it is checked out as?

EDIT: I want to use the command-line SVN client, not a GUI program specific to any OS.

+2  A: 

What operating system?

Can you check the files' owner? (ls -l on *nix, Properties > Security > Advanced > Owner on Windows)

Nick Meyer
+1  A: 

You can only tell who acquired a lock, for other WC operations the user performing the checkout is not logged or stored.

svn status will tell you who last checked in the head revision, svn lock will tell you who has a file locked.

gbjbaanb
+3  A: 

I would propose to use operating system file ownership for that. On Unix, do "ls -l". On Windows, view the security settings, and look for the owner tab in advanced settings.

The checkout metadata may or may not contain the user information, depending on the access protocol that was used. Do "svn info .", perhaps it is a svn+ssh checkout, and the user name is in the URL (likewise for certain cases of https). For a plain file: checkout, there is no way to tell.

Martin v. Löwis
+6  A: 

" working in a shared directory where multiple people might have checked out"

An ounce of prevention is worth a pound of cure.

  1. Change the ownership and permissions on the shared area to stop this foolishness.

  2. Get these people their own directories so they can check out in private areas and commit their changes.

The whole reason for using subversion is that everyone has a private -- easy to audit -- copy.

As soon as you work in a shared directory, your erases almost all value from using subversion.

If you don't use a shared directory, the problem goes away.

S.Lott
You didn't answer my question at all. I *realize* that the shared directory causes problems, that's why I want to know who checked out the files so that I can tell them to stop. :-)
Keith Palmer
@Keith Palmer: It's easy to find out who did the checkout. Change the ownership and permissions on the directory. The culprit will be the first to complain that they no longer have access to this "shared" area -- because it's no longer shared.
S.Lott