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

Re: [CONTRIB] remove-zombie-locks.py, workaround for Issue #2507

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2007-01-11 18:21:31 CET

Nathan Kidd wrote:
> I've attached a new version using the Subversion license, which means
> copyright is now assigned to CollabNet.

Coolio.

> Do you have any comment on svn_fs_is_file() below?
>> def unlock_nonexistant_files(self, lock, callback_pool):
>> """check if the file still exists in HEAD, removing the lock if
>> not"""
>> if not svn.fs.svn_fs_is_file(self.rev_root, lock.path,
>> callback_pool):
>> svn.repos.svn_repos_fs_unlock(self.repos_ptr, lock.path,
>> lock.token, True, \
>> callback_pool)
>
> I used it because it was the first semi-appropriate API to test file
> existence that I came across while searching fs.py. It works because
> you cannot lock directories, but I can imagine there exists a pure "does
> this path exist" function that would be slightly more correct.

Ah. Yeah, I think you want:

    if svn.core.svn_node_none == \
       svn.fs.svn_fs_check_path(self.rev_root, lock.path,
                                callback_pool):

I'll fix that up myself while testing and before committing.

-- 
C. Michael Pilato <cmpilato@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on Thu Jan 11 20:58:33 2007

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