Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Linux Ask!

Jun 292011
 

How to revert a bad commit in SVN

Answer:

In SVN, if you have committed something wrong, how do you rollback it?

You cannot use the svn revert command since it has been commited, you need to do a merge instead

E.g. Rollback from current version to revision 98

# svn merge -r HEAD:98 http://example.com/svn/repos/demo/trunk 
# svn commit -m "Reverting previous bad commit and going back to revision 98"
Jun 272011
 

List all the installed gems

Answer:

To list all the installed gems on your machine, simply execute the following command:

# gem list --local

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.9)
actionpack (3.0.9)
activemodel (3.0.9)
activerecord (3.0.9)
activeresource (3.0.9)
activesupport (3.0.9)
arel (2.0.10)
builder (2.1.2)
erubis (2.6.6)
i18n (0.5.0)
mail (2.2.19)
mime-types (1.16)
polyglot (0.3.1)
rack (1.2.3)
rack-mount (0.6.14)
rack-test (0.5.7)
rake (0.9.2)
treetop (1.4.9)
tzinfo (0.3.28)
Jun 252011
 

Updated the Slave binary log if the updates are received from a MySQL master

Answer:

When the updates are received from a MySQL master to a slave, it will not be logged in the binary log of the slave server. Sometimes, you might want to enable it, for example, in order to setup a chained replication.

To do so, edit the MySQL configurations, e.g. /etc/my.cnf

..
log-slave-updates
..

Don't forget to restart MySQL to take effect.

# /sbin/service mysqld restart

Jun 232011
 

Import files and directories into a SVN repository

Answer:

To import files and directories into a SVN repository, you can use the svn import command.

E.g.

Import all files and directories under the current working directory "project1" to a local SVN repository

# cd /data/project1
svn import file:///data/svn/project1