John Smith's Blog

Ramblings (mostly) about technical stuff

Subversion deletion annoyance

Posted by John Smith on

A brief detour from the Fedora/Dell posts...

Maybe there's something about me that's cursed, but it seems that the deletion functionality in Subversion is pretty broken. Pretty much every time I delete a directory, the repo gets out-of-sync, and I have to spend 10 minutes working out how to resolve something that should surely have worked properly first time.

Here's an example. I had a directory called dell in my personal notes archive, that contained a single file, that made more sense to be moved to a different directory in the repo. This was moved with no issues: [john@sofia personal]$ svn mv dell/vodafone.txt dellmini10/ A dellmini10/vodafone.txt D dell/vodafone.txt [john@sofia personal]$ svn commit -m "moved some dell files around" Deleting dell/vodafone.txt Adding dellmini10/vodafone.txt Transmitting file data ... Committed revision 38. Note that I wasn't even attempting to do anything particularly adventurous, such as deleting the directory in the same commit.

I then tried to get rid of this now-empty directory: [john@sofia personal]$ ls dell [john@sofia personal]$ svn rmdir dell Unknown command: 'rmdir' Type 'svn help' for usage. [john@sofia personal]$ svn del dell D dell [john@sofia personal]$ svn commit -m "deleted empty dell directory from repo" Deleting dell svn: Commit failed (details follow): svn: Directory '/dell' is out of date WTF!?! (I hasten to add that no-one else is using this repo.)

There's then lots of random flailing around to try to coax it into working: [john@sofia personal]$ svn up C dell At revision 38. Summary of conflicts: Tree conflicts: 1 [john@sofia personal]$ svn up dell At revision 38. [john@sofia personal]$ svn commit -m "deleted empty dell directory from repo" svn: Commit failed (details follow): svn: Aborting commit: '/data/personal/dell' remains in conflict [john@sofia personal]$ svn stat ... D C dell > local delete, incoming edit upon update ... [john@sofia personal]$ svn resolve --accept mine dell svn: 'mine' is not a valid --accept value [john@sofia personal]$ svn help resolve ... [john@sofia personal]$ svn resolve --accept mine-full dell svn: warning: Tree conflicts can only be resolved to 'working' state; 'dell' not resolved [john@sofia personal]$ svn resolve --accept working dell Resolved conflicted state of 'dell' [john@sofia personal]$ svn status ... D dell ... [john@sofia personal]$ svn up At revision 38. [john@sofia personal]$ svn commit -m "deleted empty dell dir" Deleting dell Committed revision 39.

I guess the svn resolve --accept working {dir} did the trick, but I fail to understand why it was ever necessary. Guess I should really move to git or Mercurial...

About this blog

This blog (mostly) covers technology and software development.

Note: I've recently ported the content from my old blog hosted on Google App Engine using some custom code I wrote, to a static site built using Pelican. I've put in place various URL manipulation rules in the webserver config to try to support the old URLs, but it's likely that I've missed some (probably meta ones related to pagination or tagging), so apologies for any 404 errors that you get served.

RSS icon, courtesy of www.feedicons.com RSS feed for this blog

About the author

I'm a software developer who's worked with a variety of platforms and technologies over the past couple of decades, but for the past 7 or so years I've focussed on web development. Whilst I've always nominally been a "full-stack" developer, I feel more attachment to the back-end side of things.

I'm a web developer for a London-based equities exchange. I've worked at organizations such as News Corporation and Google and BATS Global Markets. Projects I've been involved in have been covered in outlets such as The Guardian, The Telegraph, the Financial Times, The Register and TechCrunch.

Twitter | LinkedIn | GitHub | My CV | Mail

Popular tags

Other sites I've built or been involved with

Work

Most of these have changed quite a bit since my involvement in them...

Personal/fun/experimentation