Posts Tagged ‘svn’

SVN, Fix “Can’t convert string from ‘UTF-8′ to native encoding:”

March 25th, 2010

Yeah, I have this error message. “svn: Can’t convert string from ‘UTF-8′ to native encoding” when I want to do “svn checkout”. Why is that? Because of locales.

Let fix it.

First… I will try to set LC_CTYPE.

export LC_CTYPE=en_US.UTF-8

and

svn checkout ...
you may already checkout correctly, see here, http://blog.refactor.se/2007/08/13/svn-fix-cant-convert-string-from-utf-8-to-native-encoding/

what I have is:

svn: warning: cannot set LC_CTYPE locale
svn: warning: environment variable LC_CTYPE is en_US.UTF-8
svn: warning: please check that your locale name is correct

ok, so not yet. Next what I’m doing is:

locale-gen en_US.UTF-8

which gave me:

Generating locales...
en_US.UTF-8... done
Generation complete.

and the last thing:

update-locale LANG=en_US.UTF-8

The end.
Now “svn checkout …” and everything is fine.

Copy all modified files of a svn repository in another one

January 27th, 2010
# Copy all modified files of a svn repository in another one. This is very
# helpful when you're about to upload changes and via ftp.

svn diff -r71:HEAD --summarize | awk '{print $2}' | xargs -I {} cp {} myupload/ --parents

how to create and apply a patch with subversion

December 19th, 2009

you know how often you need to create a patch when you’re a creative open source guy

here is the resoure: http://ariejan.net/2007/07/03/how-to-create-and-apply-a-patch-with-subversion/

1. create patch file using svn diff


svn diff > ~/fix_ugly_bug.diff

2. using the patch file to patch

patch -p0 -i ~/fix_ugly_bug.diff

svn repository migrate

December 19th, 2009
svnadmin dump repo >  repo.dump
svnadmin load repo.dump