Friday, December 26, 2008

How to commit only needed files in svn

Sometimes I want to commit only several files using svn (subversion) command line.

What is the best way? I use this one.

First of all I see the status of my svn repository:
svn status
If I see ? mark at the start of the line, I then decide should I add (svn add dir/filename) or delete or whatever.

Later I do as follows:
svn status | cut -c8- > out.txt
What this does it deletes first 8 characters and dumps svn status to file. I then edit this file via some editor deleting lines I don't need.

And then I execute the following command, which would commit only those files present in out.txt
svn ci --targets out.txt --username USER -m Commit_message

Thursday, December 11, 2008

How to import mysql database from dump?

Simply use the following command (on Windows):

mysql.exe --default-character-set=utf8 -u root database_name < path\to\dump\file.sql

Assuming that you are using:
  • mysql without any password (if you still use password, then use -p option)
  • username root
  • dump file in utf8 encoding

Tuesday, December 2, 2008