[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Email stolen lock to original lock holder

From: Mark <email2mark_at_gmail.com>
Date: Mon, 2 Jun 2008 13:47:06 -0400

Hello.

I am working on a similar pre-lock hook. svnlook lock is run to check for
existing lock and if found it emails the original lock holder.

The pre-lock hook fires, does the svnlook check and sends out an email even
if the --force is not given and the attempt to get the lock failed because
someone else had the lock. svn version info is below.

Is there any way to have subversion notify a user that someone has stolen
their lock? Any ugly workarounds?

Thanks,

Mark

============================================
svn, version 1.4.6 (r28521)
   compiled Apr 21 2008, 09:38:04

Copyright (C) 2000-2007 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (
http://www.Collab.Net/ <http://www.collab.net/>).

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

=======================================

On 7/7/05, Ben Collins-Sussman <sussman_at_collab.net> wrote:
>
>
> On Jul 7, 2005, at 2:08 AM, Bruno Gustavs wrote:
>
> This post referes to Subversion 1.2.0.
>>
>> I tried to notify stolen locks by email to the original lock holder.
>> When I notify from the pre-lock script I get far too much
>> notifications, because the pre-lock script runs even if the
>> svn lock command is run without --force and will fail therefore.
>>
>
> Aha! This is definitely a bug.
>
> The libsvn_repos library invokes 'pre-lock' before asking the filesystem
> (libsvn_fs) to create the lock. libsvn_repos knows whether or not the user
> passed --force, and it can find out if a lock already exists... so instead
> of running pre-lock and letting libsvn_fs reject the request, *libsvn_repos*
> should be rejecting the request upfront, and not run 'pre-lock' at all.
>
> Will fix this bug today, thanks for reporting.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: users-help_at_subversion.tigris.org
>
>
Received on 2008-06-02 19:47:27 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.