An SVN Server Commit Gotcha... Why can't I commit? Check case sensitivity!

Posted By: Brian Meloche; Posted At : August 23, 2009 1:47 AM

Related Categories: Subversion

My friend Dan Vega has become a blogging machine lately, and he keeps telling me that I need to blog some of the many pearls of wisdom I've collected. This one's bit me now twice, so it's time to blog it.

I have been doing a lot of work in recent months with Subversion, setting up two Subversion servers in different environments, both on Windows.

I ran into several issues setting up one of those servers. There is a TON of content I have on that - I could probably teach a course of setting up Subversion on a Windows server at this point... but I do suck at blogging, specifically finishing a blog post before it goes stale... so I'll keep my posts short and let out what I've learned as I have time (not often, including now!).

With that, here is my first Subversion blog post of what I think will be many to come... Even though you might set up Subversion on a Windows server, beware of case sensitivity. Yes, that's right... it's case sensitive.

In one of the installations I've recently completed, we're using the SVN server as a service rather than Apache. Why is the subject of a future blog entry, so let's keep that out of it for this one.

When you point to a repo that uses the SVN server and you have commit rights on the repository, make sure you use the correct URL and that includes case.

In other words, if your repository is called ProjectX, and you point to:

svn://www.yourrepo.com/projectX

You will have no trouble grabbing updates to your working copy, but when you commit, it will fail, and you'll get a notification like so:

8/23/2009 - 12:21:04 AM
Command              : Commit
Error                : Commit failed (details follow):
Error                : Authorization failed
Finished!            : 
1 kBytes transferred in 0 minute(s) and 13 second(s)

The correct URL would be:

svn://www.yourrepo.com/ProjectX

To change the URL, you have to relocate the working copy to the correct URL. Your Subversion client will object, warning that you may corrupt your working copy. Ignore the warnings, and proceed. Once you have relocated the working copy, you should have no trouble performing a commit to the Subversion repository.

A colleague of mine had this occur about a month and a half ago, just after that Subversion server was set up. Tonight... I had the same issue, though it took me a while to realize what I had my colleague change the first time. It was my first commit to this repository in some time, so I hadn't noticed my error until now.

If you are using Apache, you won't be able to update or commit, so it becomes pretty obvious when you first try to set up your working copy that you entered the wrong URL. The SVN server is a little more subtle, and it won't become obvious until you try to commit.

As they say, fool me once, shame on you... but I was fooled twice, and I should have remembered this one a lot sooner than I did tonight! :-) I hope this helps someone out there.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
It gets worse...
if you change the case of a file or folder in windows after checking out from svn, you will be allowed to check it in *as a different file* without an error.
Problem comes when you try to check out again - svn thinks you have 2 files with different names - but windows sees them as different files - and the checkout will fail. Sorting it out can be complex - especially if you have multiple commits to the effected files from different locations with different cases!
# Posted By Dan Lancelot | 8/23/09 5:21 AM
Also, when your svn repo has two files of the same name, but different case, and they're in the same directory, when you check out in Windows, you will get an error of something like "file already exists." SVN already wrote a file called File1.txt, so if it's starting to write another file called file1.txt, SVN will error out.
# Posted By rex | 8/23/09 8:20 PM
Great post as always. Someone NEEDS to re-implement subversion in CF and bring some sanity to this product!!!

HINT HINT HINT :D
# Posted By Brock Baxter | 8/24/09 4:53 PM

Hosting provided by...

Hosting provided by hostmysite.com

Calendar

<< March 2010 >>

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Archives By Subject

  • About Me (41) [RSS]
  • ActionScript (1) [RSS]
  • Actuate (1) [RSS]
  • Adobe (16) [RSS]
  • Adobe Community Experts (2) [RSS]
  • AIR (1) [RSS]
  • AJAX (1) [RSS]
  • Animals (11) [RSS]
  • Articles (2) [RSS]
  • ASP (1) [RSS]
  • Blogging (14) [RSS]
  • BlueDragon (2) [RSS]
  • Canadian-American (1) [RSS]
  • CFConversations (16) [RSS]
  • Cleveland (3) [RSS]
  • Cleveland AUG (20) [RSS]
  • Cleveland CFUG (23) [RSS]
  • ColdFusion (75) [RSS]
  • Conferences (32) [RSS]
  • Design (3) [RSS]
  • Dreamweaver (1) [RSS]
  • Eclipse (1) [RSS]
  • Flash (2) [RSS]
  • Flex (10) [RSS]
  • Frameworks (6) [RSS]
  • Fusebox (1) [RSS]
  • J2EE (1) [RSS]
  • JavaScript (1) [RSS]
  • Jobs (2) [RSS]
  • LightFront (3) [RSS]
  • Linux (2) [RSS]
  • Mac (3) [RSS]
  • Mach-ii (8) [RSS]
  • Macromedia (9) [RSS]
  • MAX (34) [RSS]
  • Notes to Self (1) [RSS]
  • Open Source (6) [RSS]
  • Personal (16) [RSS]
  • Podcasts (23) [RSS]
  • Politics (1) [RSS]
  • Railo (0) [RSS]
  • Random Musings (10) [RSS]
  • Reality TV (1) [RSS]
  • Social Networking (1) [RSS]
  • Speaking (6) [RSS]
  • Subversion (2) [RSS]
  • Tech News (2) [RSS]
  • Technology (2) [RSS]
  • User Groups (21) [RSS]
  • Weight Loss (4) [RSS]
  • Windows (0) [RSS]
  • Work (8) [RSS]
  • Search

    Twitter Updates
    Follow me!

      RSS

      Subscribe

      Enter your email address to subscribe to this blog.

      Tags

      about me adobe animals blogging cfconversations cleveland aug cleveland cfug coldfusion conferences flex max personal podcasts random musings user groups

      Recent Comments

      Speaking at CFObjective 2010!!!
      Peter Bell said: Great - see you there! [More]

      Want a stripped down Eclipse? A 64-bit Eclipse? Get it here...
      Brian Meloche said: I don't use ANT on a regular basis. I may start but I don't currently use it within Eclipse. I've no... [More]

      Want a stripped down Eclipse? A 64-bit Eclipse? Get it here...
      Geoff said: Did you manage to get ANT working with just the basic platform version? I'm on Windows 7, 64bit, an... [More]

      LightFront: The incredibly simple & approachable MVC Framework for ColdFusion
      Brian Meloche said: Sean, my words made it seem otherwise, and that wasn't my intention. "Ties into" didn't me... [More]

      LightFront: The incredibly simple & approachable MVC Framework for ColdFusion
      Sean Corfield said: You said that FW/1 "ties into ColdSpring or Lightwire" and I want to clarify that it HAS N... [More]

      Podcasts I Listen To...

      Active Podcasts
      CFConversations (My Podcast)
      CFPanel (technically not a podcast, but close enough!)
      RIA Podcast
      CFHour()
      The Flex Show
      Non-active CF/Flex Podcasts (still worth a listen)
      ColdFusion Weekly
      The ColdFusion Podcast
      Helms and Peters Out Loud
      Other Podcasts
      This Week in Tech (TWiT)
      Windows Weekly with Paul Thurotte
      MacBreak Weekly
      Net @ Nite
      Slashdot Review
      Ruby on Rails Podcast (I'm not a Rails developer, but it's always a good idea to stay in touch with the competition!)
      Web Design Podcast from boagworld.com
      Practical Web Design Magazine