Follow this Blog!

May 4, 2015

f Comment

Fixing SVN error "Error converting entry in directory to UTF-8" in SECONDS!

Amazon I have set up an SVN repository, and am trying to import a directory into the repository so that it becomes source controlled. I run this Unix command:

sudo svn import ~/repository/ file:///svnrepos/repository

And I see the following error:

svn: E000022: Error converting entry in directory '/home/michael/repository/tailwind/www' to UTF-8
svn: E000022: Valid UTF-8 data
(hex:)
followed by invalid UTF-8 sequence
(hex: a4 e9 a5 bb)

What should I do? Was anything imported into the SVN repository despite the error message?

My Unix version: Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-43-generic x86_64)
My SVN version: 1.8.8 (r1568071)

Solution

The cause of this error is that a subdirectory /home/michael/repository/tailwind/www probably contains files whose names are not valid UTF-8, or that contain invalid UTF-8 characters. Anyway, when you get an error like this, nothing has been done. No code has been imported into the repository. You simply fix the error, and run the command again.

In this case, simply delete /home/michael/repository/tailwind/ and run the same command again.

Again, nothing is changed until the import is successful. When the import is successful, you will see the following trace in the terminal:

Adding..
..
Adding..
Committed revision 1.

Questions? Let me know!
Please leave a comment here!
One Minute Information - by Michael Wen
Find Michael on Google or Facebook
ADVERTISING WITH US - Direct your advertising requests to Michael