Friday, November 22, 2013

Subversion: Dealing with Umlaute

I had a very annoying problem with my subversion today: A file had an 'ö' in it. I checked it in on Windows without noticing it, and when I checked the file out on my Mac it immediately caused a conflict:

A    Life/Jeppe Family History/Old & Junk/jeppe neu
C Life/Jeppe Family History/Old & Junk/Die Köter, auch Kotsassen ge.textClipping
A    Life/Jeppe Family History/Old & Junk/jeppefamily.backup.gramps.old

Updated to revision 41.
Summary of conflicts:
Tree conflicts: 1
Nilss-MacBook-Air:docs nils$ svn up
Updating '.':
At revision 41.

I attempted to delete the file, and at first this seemed to work:

$ svn delete Die\ Köter\,\ auch\ Kotsassen\ ge.textClipping
D Die Köter, auch Kotsassen ge.textClipping

However, the conflict remained:

$ svn commit -m "Koeter"
svn: E155015: Commit failed (details follow):
svn: E155015: Aborting commit: '/Users/nils/Documents/svn/docs/Life/Jeppe Family History/Old & Junk/Die Köter, auch Kotsassen ge.textClipping' remains in conflict

Interestingly, the file was now also missing on my local system. It may be my fault; but anyway, I was a bit lost.

In the end, the following worked:

$ svn remove --force '/Users/nils/Documents/svn/docs/Life/Jeppe Family History/Old & Junk/Die Köter, auch Kotsassen ge.textClipping'
$ svn resolve --accept=working '/Users/nils/Documents/svn/docs/Life/Jeppe Family History/Old & Junk/Die Köter, auch Kotsassen ge.textClipping'
Resolved conflicted state of 'Life/Jeppe Family History/Old & Junk/Die Köter, auch Kotsassen ge.textClipping'

$ svn commit -m "Koeter"
Adding Life/Jeppe Family History/Old & Junk/Die Koeter, auch Kotsassen ge.textClipping
Deleting Life/Jeppe Family History/Old & Junk/Die Köter, auch Kotsassen ge.textClipping
Deleting Life/Jeppe Family History/Old & Junk/Die Köter, auch Kotsassen ge.textClipping
Transmitting file data ...
Committed revision 42.

Notice the interesting double delete there...

Anyway, the moral of the story - as if I didn't know already - avoid special characters like the plague they are.

No comments:

Post a Comment