You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Brian E. Fox" <br...@reply.infinity.nu> on 2006/10/13 02:56:41 UTC
rm multiple locks
Is there an easy way to remove multiple locks in a repo? I have about
100 bad locks to get rid of. The svnbook hints at piping the output of
lslocls, but I haven't been able to figure it out.
Thanks,
Brian
Re: rm multiple locks
Posted by Troy Curtis Jr <tr...@gmail.com>.
On 10/12/06, Brian E. Fox <br...@reply.infinity.nu> wrote:
>
>
> Is there an easy way to remove multiple locks in a repo? I have about 100
> bad locks to get rid of. The svnbook hints at piping the output of lslocls,
> but I haven't been able to figure it out.
>
> Thanks,
> Brian
I believe this should do the trick:
svnadmin lslocks $repo | xargs svnadmin rmlocks $repo
or
svnadmin rmlocks $repo $(svnadmin lslocks $repo)
or even
for lockpath in $(svnadmin lslocks $repo)
do
svnadmin rmlocks $repo $lockpath
done
One or all of those is bound to work.
Troy
--
"Beware of spyware. If you can, use the Firefox browser." - USA Today
Download now at http://getfirefox.com
Registered Linux User #354814 ( http://counter.li.org/)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: rm multiple locks
Posted by Troy Curtis Jr <tr...@gmail.com>.
On 10/12/06, Bob Proulx <bo...@proulx.com> wrote:
> Brian E. Fox wrote:
> > Is there an easy way to remove multiple locks in a repo? I have about
> > 100 bad locks to get rid of. The svnbook hints at piping the output of
> > lslocls, but I haven't been able to figure it out.
>
> I would simply make a command line loop.
>
> for f in $(svn status | awk '$1=="K"{print$NF}'); do svn unlock $f; done
>
> Bob
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>
But then you have to have a working copy and to catch (possibly) all
the locks you would need a working copy of the root directory! Of
course if you don't have direct access to the repo, then you would
have to do it that way...but in that case you might want to include
the '--force' option, as he does mention that they are "bad" locks.
Troy
--
"Beware of spyware. If you can, use the Firefox browser." - USA Today
Download now at http://getfirefox.com
Registered Linux User #354814 ( http://counter.li.org/)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: rm multiple locks
Posted by Bob Proulx <bo...@proulx.com>.
Brian E. Fox wrote:
> Is there an easy way to remove multiple locks in a repo? I have about
> 100 bad locks to get rid of. The svnbook hints at piping the output of
> lslocls, but I haven't been able to figure it out.
I would simply make a command line loop.
for f in $(svn status | awk '$1=="K"{print$NF}'); do svn unlock $f; done
Bob
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org