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

Re: Circular cleanup/checkout problem using Subversion 1.7

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Thu, 15 Dec 2011 09:33:00 +0100

On Wed, Dec 14, 2011 at 9:16 PM, Strickland, Stuart
<sstrickland_at_carnegielearning.com> wrote:
>
> In attempting to pull down a copy of the trunk to my PC, I inadvertently accessed a file in the Subversion repository that was created on a non-Windows machine. The file has a name containing a less-than sign, which is illegal in DOS/Windows. This caused a circular condition in which Svn was unable to complete processing of the checkout, and further cannot execute its cleanup utility. Thus, cleanup cannot run because of a checkout problem; checkout cannot run because of a cleanup problem. Ultimately, the problem really is that the file cannot be renamed to its given, but illegal, name.
>
>
>
> Subversion client is TortoiseSVN (1.7.1, Build 22161 – 64 Bit). Windows 7 PC.
>
>
>
> Attempting to run a Svn Update causes this to appear:
>
>                 Update Failed!
>
> Error      Previous operation has not finished; run ‘cleanup’ if it was interrupted
>
> Error      Please execute the ‘Cleanup’ command.
>
> The operation failed.
>
>
>
> An attempt to cleanup results in this dialog box message:
>
> Cleanup failed to process the following paths:
>
> C:\Users\myusername\svn\trunk\research
>
> Working copy ‘C:\Users\myusername\svn\trunk\research’ locked.
>
> ‘C:\Users\myusername\svn\trunk’ is already locked.
>
>
>
> Two suggested workarounds -- deleting the working directory, and attempting the cleanup at the trunk level -- have the same results.
>
>
>
> I do see that Svn retrieved the file’s contents to a temp folder (C:\users\myusername\svn\.svn\tmp), but cannot rename that to the non-conforming filename.
>
> Do I need to delete my entire working directory? I am essentially dead in the water here, as I cannot do any Subversion work in any directory.
>
> On site, work is being done to rename or delete the offending files, but that will not help me in my local build area on my PC.
>
> Suggestions welcome.

You or someone else should rename the offending file in the
repository, since this is a situation that just cannot be checked out
on Windows. Note that (if you have the necessary commit permissions)
you can do this yourself, without needing a checked out working copy,
by performing a rename in the repository (with TortoiseSVN: open the
Repo Browser, and rename the file in there).

After that, you can perform a new checkout on Windows. I don't think
you can salvage your partly checked out working copy, you should get a
new one (and if necessary, transfer your local changes to the new
working copy manually). I'm not entirely sure though: you can always
try to 'svn update' the broken working copy and see what happens
(YMMV).

The best way to prevent this problem in the future is to install a
pre-commit hook that blocks commits with filenames that are illegal on
Windows (or on any other operating system, for that matter). If you
search the mailinglist archives, you will surely find some examples or
tools that help you do this.

--
Johan
Received on 2011-12-15 09:33:59 CET

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.