user lock list

933 views
Skip to first unread message

L Wall

unread,
Jan 6, 2012, 1:50:29 PM1/6/12
to us...@tortoisesvn.tigris.org
tortise SVN 1.7.
Is there a way to see all the files a user has locked.
When someone goes on vacation or long break it would be nice to see if they have any file locks out there to ensure they check in files before they leave.
I know I can do it by folder level, would be nice to have a report option.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2906596

To unsubscribe from this discussion, e-mail: [users-un...@tortoisesvn.tigris.org].

Andy Levy

unread,
Jan 6, 2012, 2:08:02 PM1/6/12
to us...@tortoisesvn.tigris.org
On Fri, Jan 6, 2012 at 13:50, L Wall <wa...@resa.net> wrote:
> tortise SVN 1.7.
> Is there a way to see all the files a user has locked.
> When someone goes on vacation or long break it would be nice to see if they have any file locks out there to ensure they check in files before they leave.
> I know I can do it by folder level, would be nice to have a report option.

Assuming you can access the repository via the filesystem, check out
svnadmin lslocks

I don't think you can do the whole repository from a client without
running svn st -u against a WC checked out from the root of the
repository. Or you could run svn info against every item in the
repository via URL - but that would be extremely slow.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2906603

Bob Archer

unread,
Jan 6, 2012, 2:13:16 PM1/6/12
to us...@tortoisesvn.tigris.org
> tortise SVN 1.7.
> Is there a way to see all the files a user has locked.
> When someone goes on vacation or long break it would be nice to see if they
> have any file locks out there to ensure they check in files before they leave.
> I know I can do it by folder level, would be nice to have a report option.

I don't think so. You can use the command line to do a status to XML then parse the XML for locked files.

Why are you locking files? Are you working with binary files?

BOb

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2906605

Dave Huang

unread,
Jan 6, 2012, 3:17:35 PM1/6/12
to us...@tortoisesvn.tigris.org
On Jan 6, 2012, at 1:08 PM, Andy Levy wrote:
> Or you could run svn info against every item in the
> repository via URL - but that would be extremely slow.

I guess that depends on how big your repo is. I have a script that send a reminder email to people who have kept files locked for over a week. It does an "svn info -R --xml" on the trunk directory via URL, and performance is fine: it takes 12 seconds for about 3000 files.

svnadmin lslocks is fast, but as far as I can tell, it doesn't support XML output, which makes it more inconvenient to parse from a script.
--
Name: Dave Huang | Mammal, mammal / their names are called /
INet: kh...@azeotrope.org | they raise a paw / the bat, the cat /
FurryMUCK: Dahan | dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 36 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2906622

Andy Levy

unread,
Jan 6, 2012, 4:16:01 PM1/6/12
to us...@tortoisesvn.tigris.org
On Fri, Jan 6, 2012 at 15:17, Dave Huang <kh...@azeotrope.org> wrote:
> On Jan 6, 2012, at 1:08 PM, Andy Levy wrote:
>> Or you could run svn info against every item in the
>> repository via URL - but that would be extremely slow.
>
> I guess that depends on how big your repo is. I have a script that send a reminder email to people who have kept files locked for over a week. It does an "svn info -R --xml" on the trunk directory via URL, and performance is fine: it takes 12 seconds for about 3000 files.
>
> svnadmin lslocks is fast, but as far as I can tell, it doesn't support XML output, which makes it more inconvenient to parse from a script.

svn info -R --xml has been running for nearly an hour on my
repository. I don't know how many files are in it, but it's over 9000
revisions. Server is 1.5, client 1.7.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2906631

Dave Huang

unread,
Jan 6, 2012, 4:41:53 PM1/6/12
to us...@tortoisesvn.tigris.org
On 1/6/2012 3:16 PM, Andy Levy wrote:
> svn info -R --xml has been running for nearly an hour on my
> repository. I don't know how many files are in it, but it's over 9000
> revisions. Server is 1.5, client 1.7.

Interesting... I didn't expect it to be that expensive of an operation.
FWIW, my repo has about 33000 revisions. Server is a fairly recent 1.6.x
(probably 1.6.16), I've tried with 1.7.2 and 1.6.16 clients, and
performance is the same. Repo access via https.


--
Name: Dave Huang | Mammal, mammal / their names are called /
INet: kh...@azeotrope.org | they raise a paw / the bat, the cat /
FurryMUCK: Dahan | dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 36 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+
PL++

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2906637

Larry Wall

unread,
Jan 9, 2012, 12:04:52 PM1/9/12
to us...@tortoisesvn.tigris.org
Locking files so not have 2 programmers working on the same file unless they unlock it.
Or so they know someone else if also working on a file.

 
Email disclaimer: This email is intended only for the use of the addressee(s) named herein. It may contain legally privileged and confidential information. If you are not the intended recipient, or an authorized representative, consider this notification that any review, copying, or distribution of this email or attachments is prohibited. If this email was received in error, please immediately notify the sender by return email and delete the email. Thank you.



>>> Bob Archer <Bob.A...@amsi.com> 1/6/2012 2:13 PM >>>

Andy Levy

unread,
Jan 9, 2012, 1:17:43 PM1/9/12
to us...@tortoisesvn.tigris.org
Please don't top-post. List convention is to bottom-post and reply/quote inline.

On Mon, Jan 9, 2012 at 12:04, Larry Wall <Wa...@resa.net> wrote:
> Locking files so not have 2 programmers working on the same file unless they
> unlock it.
> Or so they know someone else if also working on a file.

Unless you're working with binary files, this is rarely needed with
Subversion. Locking is not a substitute for good communication.

> Email disclaimer: This email is intended only for the use of the
> addressee(s) named herein. It may contain legally privileged and
> confidential information. If you are not the intended recipient, or an
> authorized representative, consider this notification that any review,
> copying, or distribution of this email or attachments is prohibited. If this
> email was received in error, please immediately notify the sender by return
> email and delete the email. Thank you.

Such disclaimers are pointless on public mailing lists. They just
waste bandwidth and storage space.

>>>> Bob Archer <Bob.A...@amsi.com> 1/6/2012 2:13 PM >>>
>
>> tortise SVN 1.7.
>> Is there a way to see all the files a user has locked.
>> When someone goes on vacation or long break it would be nice to see if
>> they
>> have any file locks out there to ensure they check in files before they
>> leave.
>> I know I can do it by folder level, would be nice to have a report option.
>
> I don't think so. You can use the command line to do a status to XML then
> parse the XML for locked files.
>
> Why are you locking files? Are you working with binary files?
>
> BOb
>
> ------------------------------------------------------
> http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2906605
>
> To unsubscribe from this discussion, e-mail:
> [users-un...@tortoisesvn.tigris.org].

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2907341

Bob Archer

unread,
Jan 9, 2012, 3:39:19 PM1/9/12
to us...@tortoisesvn.tigris.org
> >>> Bob Archer <Bob.A...@amsi.com> 1/6/2012 2:13 PM >>>
> > tortise SVN 1.7.
> > Is there a way to see all the files a user has locked.
> > When someone goes on vacation or long break it would be nice to see if
> > they have any file locks out there to ensure they check in files before they
> leave.
> > I know I can do it by folder level, would be nice to have a report option.
>
> I don't think so. You can use the command line to do a status to XML then parse
> the XML for locked files.
>
> Why are you locking files? Are you working with binary files?
>
> BOb
> Locking files so not have 2 programmers working on the same file unless they
> unlock it.
> Or so they know someone else if also working on a file.
>

Subversion is really designed around the copy-modify-merge paradigm rather than the lock-modify-unlock one. That's why it doesn't really have any tools or status that you are asking for. Using the lock-modify-unlock with svn is anathema.

Read this versioning models topic on the svn manual:

http://svnbook.red-bean.com/en/1.7/svn.basic.version-control-basics.html#svn.basic.vsn-models

BOb

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2907377

Reply all
Reply to author
Forward
0 new messages