显示标签为“develop”的博文。显示所有博文
显示标签为“develop”的博文。显示所有博文

2009-03-30

Strange svn behavior when specifying username

It seems that the --username option is totally ignored by svn when you later try to update or commit (or any operations that have to be performed interactively with the svn server) if the svn+ssh protocol was used to check out the code initially _AND_ at that same time you did not specify a username directly in the svn+ssh url(which is often later provided when the server asks for it). According to this mailing list thread this problem only happens to the svn+sshl combination.

Then, how this problem be by-passed? It's easy with the help of svn's "switch --relocate" facility. Let's say the original svn+ssh url is "svn+ssh://svn.example.com/path/to/repos"(which you can find in each .svn directory's entries file), then the username can be add to the url after you've changed the current directory to the local svn copy's root directory by:

svn switch --relocate svn+ssh://svn.example.com/path/to/repos svn+ssh://username@svn.example.com/path/to/repos .


That's a simple one-liner command. Do remember to replace the "username" with your real username used and don't forget the final dot "." which means the current directory.

2007-09-24

字符集(charset)和字符编码(character encoding)的区别

from this post: http://www.thescripts.com/forum/thread214891.html

It's important to distinquish between characters (or charsets) and
character encodings. They are two different things. A charset is a map
that defines which numeric value represents a particular glyph. A
character encoding defines how numeric values are serialized into a
stream of bytes. For example Unicode can be encoded as UTF-8 which which
is space effecient and provides compatibility with the ASCII and ISO-8859-1
charsets. Or it could be encoded as UCS4-LE which is not space effient
but it can be easier to do heavy text processing with it.

Here's a nice link about programming with extended charsets although it
is a little UTF-8/*nix centric:

http://www.cl.cam.ac.uk/~mgk25/unicode.html