How to Do the SVN Cleanup Before Updating the files

915 views
Skip to first unread message

swathikumar yenugula

unread,
Nov 22, 2011, 8:06:23 AM11/22/11
to Jenkins Users
Hi All,

Currently i am using Jenkins with SVN.
Some times while updating the SVN files it is throwing the error
Directory has been locked. Please do the SVN cleanup.

For avoiding this error i have to do the SVN cleanup before updating
the SVN files.
Is there any Plugin available for doing this.

or

Please let me know , how to execute the script file before updating
the files.

Thanks
SwathiKumar

grayaii

unread,
Nov 22, 2011, 10:42:15 AM11/22/11
to jenkins...@googlegroups.com
We use SVN for all of our 500+ jobs and the only time we get this error if
there is indeed another process locking a file in our workspace.

In our Jenkins job configuration we have some jobs "Always check out a fresh
copy" while others we have "use SVN Update as much as possible".

Usually this happens when a rogue process is locking a file, and so far
we've only seen this happen on our Windows slave machines. I use Process
Explorer to figure out what process is locking the file and then I kill it.
With Process Explorer, simply press Ctrl+F and search for name of your
workspace directory name, and you'll find the process that has a handle to
it.

Of course, don't simply kill the process. Find the root cause on how you
got into that state and find a solution so that it doesn't happen again.

Good luck!

--
View this message in context: http://jenkins.361315.n4.nabble.com/How-to-Do-the-SVN-Cleanup-Before-Updating-the-files-tp4095563p4096168.html
Sent from the Jenkins users mailing list archive at Nabble.com.

Didier Durand

unread,
Nov 22, 2011, 12:38:56 PM11/22/11
to Jenkins Users
Hi,

You can use the option "Always start with a fresh copy" in Project
configuration > Source Code management > Checkout strategy

regards

didier

On Nov 22, 4:42 pm, grayaii <george.g...@rsa.com> wrote:
> We use SVN for all of our 500+ jobs and the only time we get this error if
> there is indeed another process locking a file in our workspace.
>
> In our Jenkins job configuration we have some jobs "Always check out a fresh
> copy" while others we have "use SVN Update as much as possible".
>
> Usually this happens when a rogue process is locking a file, and so far
> we've only seen this happen on our Windows slave machines.  I use Process
> Explorer to figure out what process is locking the file and then I kill it.
> With Process Explorer, simply press Ctrl+F and search for name of your
> workspace directory name, and you'll find the process that has a handle to
> it.
>
> Of course, don't simply kill the process.  Find the root cause on how you
> got into that state and find a solution so that it doesn't happen again.
>
> Good luck!
>
> --

> View this message in context:http://jenkins.361315.n4.nabble.com/How-to-Do-the-SVN-Cleanup-Before-...

Grégory Boissinot

unread,
Nov 22, 2011, 3:41:09 PM11/22/11
to jenkins...@googlegroups.com
You can execute a script before the SVN checkout by using the EnvInject plugin.
Reply all
Reply to author
Forward
0 new messages