Subversion - Cleanup Failed To Process The Following Paths

Posted August 20, 2008 at 10:34 AM

Tags: Work

This is sad to admit, but I am fairly new to Subversion. I implemented my first code repository like three weeks ago. So far I am loving it. It's really awesome to able to actually delete code rather than commenting it our or making ".BAK" files. Finally, a way to both clean and backup my code base as the same time.

As much as it has been easy to implement, I did run into a snag yesterday. I had just made some major changes to my application, including directory renames and dozens of file updates; when I went to commit the changes, it looks like everything was processing smoothly, and then suddenly TortoiseSVN told me that the commit failed at the very end. I tried to run the Commit again and it said that it could not work - it told me to run a Clean Up command. So I did that. But then, it told me:

Subversion: Cleanup Failed To Process The Following Paths

I tried to clean different directories, but none of them worked. To make things even more confusing, I took a look at the repository using the Repo Browser and it appeared that all the updated code had been, in fact, committed properly. What the heck was going on?!?

After a little Googling, it looks like sometimes Subversions commits actually work, but fail to unlock the code tree (or something) .... and there's not much you can do about it. From what I read, this is a known bug in Subversion. Unless someone has a better suggestion here is how I fixed my WWW code base:

  1. Created a new folder called "www_temp" at the same level as "www".
  2. Checked out Trunk [HEAD revision] into www_temp.
  3. Used Beyond Compare to make sure that the www and www_temp folders were in synch (that the Commit command actually committed all files and to bring over files that were purposely not part of the repository [such as an ACCESS database]).
  4. Renamed www to "www_failed_commit".
  5. Renamed www_temp to "www" and am using it as the new code base.

This was frustrating because it took a while to checkout the entire code base to the "www_temp" folder; but, it seems to have done the trick. I am gonna keep my "www_failed_commit" around for a while to make sure all the code it there, but it appears that the transfer worked properly.

Aside from this, I am really loving Subversion. I finally see what all the hype is about :) I hope that this might help some people out.

Post Comment  |  Ask Ben  |  Permalink  |  Print Page



Learning ColdFusion 9 - ColdFusion 9 tutorials, samples, examples, demos

Reader Comments

Aug 20, 2008 at 10:54 AM // reply »
19 Comments

Ben,

I had to laugh when I saw the title of your post because I just finished a post myself describing a problem I had with Subversion. After I post I always check MXNA to see if my post shows up and there it was, immediately above your post. Of course my problem wasn't a bug, it was just my stupidity, but still, it was a funny coincidence.

Cheers,


Aug 20, 2008 at 10:59 AM // reply »
6,516 Comments

@Bob,

I had the same thing - I have your post open in another tab and will read it after my conference call :)


Aug 20, 2008 at 1:01 PM // reply »
8 Comments

I don't like SVN... whilst it is definitely an improvement over CVS, it's too quirky and SLOW.

For anyone not tied to SVN, I'd recommend switching to either Git ( git.or.cz ) or Bazaar ( bazaar-vcs.org ).


Aug 20, 2008 at 1:07 PM // reply »
6,516 Comments

@Peter,

I have heard of Git. I don't find SVN to be too slow. I only commit like once or twice a day depending on what I am doing, so it's been OK. We are using a hosting SVN service, so doing it over HTTPS makes it noticeably slower, but still, I am OK with it so far.

I will definitely look into Git though.


Aug 20, 2008 at 1:45 PM // reply »
19 Comments

@Peter: I too have heard of Git, but not investigated at all. Does it have integration into Eclipse similar to SVN? Does it have a decent Windows GUI?


Aug 20, 2008 at 2:13 PM // reply »
8 Comments

>> Does it have a decent Windows GUI? <<
There is an integrated Cygwin-Git package that will run on Windows, and from within that you can invoke a GUI repository viewer (gitk), plus a commit staging area thing (git-gui) - the latter of which you can also create a edsktop shortcut to, so you don't even need to go into the Cygwin terminal.

>> Does it have integration into Eclipse similar to SVN? <<
There is a project named Egit which does Eclipse integration, but I've not yet tried that.

There's also git-svn which is some sort of bridge between Git and SVN - I'm not certain but I think that may allow you to use SVN tools with Git.


Aug 20, 2008 at 4:46 PM // reply »
32 Comments

@Ben,

Do you mind sharing which hosted Subversion service you are using?


Aug 20, 2008 at 4:47 PM // reply »
32 Comments

@Ben,

Actually, can you tell us more about why you decided to go with a hosted solution rather than managing the Subversion Server yourself on your own machine?


Aug 20, 2008 at 5:10 PM // reply »
16 Comments

@macbuoy - the good thing about a hosted service is that you never need to worry about installation or maintenance or security patches etc. That's the job of the service!

The other thing is of course piece of mind. If your machine dies you know your code is nice and safe in a fully redundant environment which you can access from other machines.

That is of course another thing (for Bens environment). If he ever does distributed development, how will remote developers access his svn server? Of course it could be setup without too much pain, but just something else to worry about.

For me there are pleny of paid and free svn providers out there to use.


Aug 20, 2008 at 5:22 PM // reply »
2 Comments

Before you get too far with Subversion, you'd do well to give Bazaar a try. Command-for-command, it's very similar to Subversion for most of the basics, and if you're into GUIs, TortoiseBZR is functional, though perhaps not as refined as TortoiseSVN.

I found that despite knowing the value of using source control, the overhead of setting up and maintaining access to Subversion repositories made it unattractive. Too many times I'd say, "I wish I'd been tracking this."

Not so with Bazaar. It fulfills the maxim "simple things simple and hard things possible" much better than Subversion. I love that I can start tracking files anywhere anytime without having to involve some outside server in the process. And I love the fact that if I do need to sync to some third party, that's all built-in, dirt simple, and flexible.

I'm not sure what to recommend with regard to hosting Bazaar repositories. The obvious choice, Launchpad.net, is (as I understand) only for open source projects. But you can host a Bazaar repository anywhere that's running sshd.

Give it a try; I'm sure you won't regret it!


Aug 20, 2008 at 6:16 PM // reply »
6,516 Comments

@Macbuoy,

Micheal hit it right on the head. For us, it was two things: backups and distributed development. We decided to go with CVSDude.com. Apparently they do backups many times through out the day. I can also create users and assign them different rights to different repositories. The whole things was really easy to set up.

Code is our product; if something were to go wrong, then we are screwed. As such, we didn't want the overhead of getting that process 100% perfect. We'd rather have experts handle it for us so that we can concentrate on writing the code.

So far, I am really pleased with their service.


Aug 20, 2008 at 7:38 PM // reply »
40 Comments

@Ben,

You may want to consider doing commits more frequently than twice a day IMO. I will make commits at key points that I can go back from if need be just so that there is a version in the repo.

Just a thought!


Aug 20, 2008 at 8:06 PM // reply »
6,516 Comments

@Hatem,

I find that I do a commit when I have completed a "thought". Meaning, if I wanted to update the way something works, it might involve 10 different files. I don't commit until I have updated and tested those 10 files. But, I have no problems committing more than that.


Aug 20, 2008 at 11:43 PM // reply »
1 Comments

Git is the New Hotness is some circles (like amongst Rubyists). It was originally designed by Linus Torvalds as the tool to manage the Linux kernel sources, so it's very much optimized for widely-spread, totally decentralized development. There's no central server, just lots of people with their copies of the source, swapping patches back and forth. This also means that it has lots of tools for handling branching, and N-way merging.

That may or may not be what you're looking for. What Git is good at, Subversion basically can't touch. But if you actually want a central authority, or a more traditional workflow, Subversion may be a better fit. Git can simulate some of those modes, but that's not really what it's FOR. I also find it conceptually much more difficult, but that could easily be a matter of relative unfamiliarity.


Aug 21, 2008 at 10:34 AM // reply »
41 Comments

I had the same problem.

I deleted my local directory where the files were (after backing them up), and then did an update.

Problem fixed.


Aug 30, 2008 at 12:58 AM // reply »
14 Comments

I need some sort of Subversion/GIT for dummies book. My designer mind has a hard time seeing the big picture or birds eye view of how a versioning system works. I'm behind the times and am tired of FTP'ing to a dev server and copying changes to a prod server. :-(


Sep 1, 2008 at 8:38 AM // reply »
6,516 Comments

@jyoseph,

I dont' have anything in the way of a recommendation. I am relatively new to this stuff myself. Good luck!


Sep 2, 2008 at 3:09 AM // reply »
7 Comments

Gah, sorry I'm late to the party on this post.

Those looking for a solid introduction to SVN would do well to read this (online) book:
http://svnbook.red-bean.com/en/1.4/svn.basic.html

(I've linked the "so you're new to SVN" chapter, but the whole thing's there)

I've found this book to be an exceptional piece of documentation.


Sep 2, 2008 at 8:23 AM // reply »
6,516 Comments

@Jono,

I have to admit that I found that book a bit confusing. The order of the chapters felt very weird. I don't remember exactly, but I feel like the basics where towards the end and the beginning lacked explanation. Maybe it was just a bit over my head.


Sep 2, 2008 at 10:48 AM // reply »
14 Comments

@Jono thanks for the link. I did check that book out a few months back and had a little bit of a tough time with it. I thought to myself, this would be a lot easier if I had a friend or coworker who fully understood it to point me in the right direction. One of those things I think if you see someone do it it's easier to understand.

Not possible in this case but wishful thinking. I will go back in and maybe skip a bit further down in the book, maybe once I get over the hump it'll be easier (or maybe I'm making it out to be more difficult that it really is).


Sep 17, 2008 at 4:50 PM // reply »
1 Comments

Thanks this post saved my ass today, SVN was almost driving me crazy with this stupid error.

It's pretty lame though that I had to delete my old dir and create a new one. I don't like SVN at all too, but hey, it's free, has a nice windows GUI (Tortoise) and can be hosted on Linux servers (free too).

If you want something more reliable or at least with a company you can blame and complain for, spend some extra hundred bucks from your budget and get Microsoft's Source Safe (or similar, I don't know how they call this now). :)


Sep 17, 2008 at 5:03 PM // reply »
6,516 Comments

@Bruce,

Glad this could help :) Yeah, it is lame that you have to create a totally new folder and do all the refreshing... but like you said, its Free and it works pretty well like 95% of the time.


Oct 6, 2008 at 4:56 PM // reply »
1 Comments

Same problem here, but I really (REALLY) didn't feel like checking out the original repository and copying over. So here is the very hacky solution: go search for "lock" files in the .svn directories (these are 0 length files that supposedly lock the directory). After deleting these files by hand I was able to do a normal update.

Disclaimer: I only did this because I hadn't worked on the project in a while and knew that I wouldn't lose code. If worst came to worst I could just do a clean checkout. Don't try this solution with critical code :-) Or at least back up any changes you made before doing so. Also, the first thing to try should be the cleanup command. Only if that fails, go and try the brute-force approach.


Oct 6, 2008 at 6:10 PM // reply »
6,516 Comments

@Lazerman,

It's funny you mention that. I actually tried that using FlexRename:

http://www.bennadel.com/index.cfm?dax=blog:460.view

After I deleted all the lock files, I tried to run cleanup again, and it broke in the same way. Maybe my problem was that I tried to run the cleanup again :)


Feb 9, 2009 at 11:16 AM // reply »
1 Comments

Subversion is generally preferred by Windows user, due to the popular file system extension, TortoiseSVN. Bazaar seems to be used by mainly LAMP users; Apache, Unix, etc.


Feb 9, 2009 at 11:21 AM // reply »
2 Comments

BTW I have this problem all the time with SubVersion; it just happened again, and I was hoping to find an elegant solution, instead of my normal method of blowing away all the hidden .svn files and tricking SVN. This time I had to re check out; like you described above, but in my case only half the files committed before it locked up... so i was stuck in monotony land for a while. Its not enough to make me want to switch though - I like svn for the most part.


Feb 9, 2009 at 11:30 AM // reply »
6,516 Comments

@Shawn,

I love Subversion (SVN), but I am definitely finding something things that you should not do. Namely, I have found it very ugly to use SVN to rename folders, especially if you are swapping names. Deleting folders has also been a bit dodgy. Still working out the best way to handle that.

The key to me, so far, seems to re-commit after *every* folder alteration (renaming or deleting a folder).


Feb 9, 2009 at 11:36 AM // reply »
2 Comments

Yep; the key seems to be to tread lightly with svn. Folder deletes and renames are problematic and should be done carefully and in tiny steps; move files, commit; delete files, commit; etc.


Feb 9, 2009 at 11:49 AM // reply »
6,516 Comments

@Shawn,

Exactly - baby steps to completion :)


Feb 9, 2009 at 11:53 AM // reply »
19 Comments

I actually found that doing an Update, followed by a Commit after doing things like renames, did the trick.


Feb 9, 2009 at 12:03 PM // reply »
6,516 Comments

@Bob,

Hmm, I would be nervous about doing the Update only because sometimes when I delete via SVN, it deletes from the repository, but doesn't delete the folders locally (not always and not completely). I feel like doing the commit afterward finalize that physical delete.


Feb 9, 2009 at 1:04 PM // reply »
19 Comments

It's just a workflow that I found works for me when using Tortoise SVN for deleting and renaming. It took me awhile to figure out what was causing so many problems for me with those types of operations, and then I started doing that sequence: Tortoise SVN delete/rename -> Update -> Commit, and it's been gold ever since. YMMV.


Feb 10, 2009 at 2:17 PM // reply »
6,516 Comments

@Bob,

I will definitely reference this comment thread next time I do one of these actions (fingers crossed).


Mar 13, 2009 at 1:52 AM // reply »
1 Comments

Thanks!

I haven't had this error before, so I'm guessing the place I'm using it here has an older version of SVN.


Jul 1, 2009 at 2:59 PM // reply »
1 Comments

I also had this annoying error happening. I tried a commit, and saw it list my 'obj' directory as obstructing things. It looks like you can't have a non-SVN directory (at least) with the same name as something which exists in the tree under SVN. My renaming my non-SVN 'obj' directory, I was able to finally complete a cleanup.


Jul 3, 2009 at 9:02 AM // reply »
6,516 Comments

@Brendan,

That sounds funky. SVN is still something that I am getting comfortable with :)


Oct 7, 2009 at 5:41 PM // reply »
1 Comments

Hey there!
I have got the same problem and actually solution for me was run the clean up from Administator's session on my Vista machine.

P.S.
I know,UAC is very hostile


Post Comment  |  Ask Ben

Recent Blog Comments
Nov 21, 2009 at 5:15 PM
Using ColdFusion Structures To Remove Duplicate List Values
@Jose Galdamez, Oh heh yeah I didn't paste the whole code. I should have defined the vars -- my bad. It's fixed thou. Thanks. ... read »
Nov 21, 2009 at 4:49 PM
Styling The ColdFusion 8 WriteToBrowser CFImage Output
Great work yet again Ben! Whilst I didn't use this whole code, I copied some of your regex code for a similar problem with the lack of an alt attribute and unescaped ampersands in CFIMAGE for Railo 3 ... read »
Nov 21, 2009 at 1:13 PM
My First ColdFusion Builder Extension - Encrypting And Decrypting CFM / CFC Files
@Ben, Because I am pedantic, I just want to make sure that everyone knows there is absolutely no encryption going on. There is only encoding and obfuscation. The cfencode tool only obfuscates your C ... read »
Nov 21, 2009 at 12:28 PM
Using ColdFusion Structures To Remove Duplicate List Values
@Jody I can't seem to get your code sample to work. If you are still having problems, try this code out and see if it gets you what you wanted. <!--- Comma delimited list with various duplicates ... read »
Nov 21, 2009 at 11:03 AM
Groovy Operator Overloading Does Not Work In The ColdFusion Context
Hi Ben, Thanks for this informative post. Now I am reading ur old posts too ... read »
Nov 21, 2009 at 10:56 AM
HostMySite.com Has The Best ColdFusion Hosting
@Mehul, Yes very nice people, however several downtimes per day which was not acceptable. Hence we had to move out. I am glad you are having good luck with them so far. ... read »
Nov 20, 2009 at 11:32 PM
Five Months Without Hungarian Notation And I'm Loving It
I've used headless camel case for years for not only ColdFusion variables, but also SQL tables and fields... pretty much everything involving code. I also subscribe to the "don't abbreviate and clea ... read »