Wednesday, October 21, 2009

SVN

If you need to send files to client working on svn, to reflect changes, for binary files (pdf, jpeg..), I would recomment to create dump, instead of diff, as the diff usually ignore the binary files, or during the load, the update is not properly done.

svnadmin dump c:\svnrepo -r revX:revY --incremental | svndumpfilter include project --drop-empty-revs > file.dump

If you need only specific projects, use the svndumpfilter

svnadmin dump c:\svnrepo -r revX:revY --incremental | svndumpfilter include project > file.dump


For the diff, use

svn diff svn://localhost/tag1 svn://localhost/tag2 > file.diff

CVS

For a diff, you first need to be in the project directory
D:\Projects\workspace\IDFactuBatch>cvs -d :pserver:username:password@host:/RepositoryPath diff -r rev# -r rev# > C:\test.diff

Saturday, October 10, 2009

Mysql

To load a script into a database from a shell on linux, Centos 5.3

mysql -u root -p dbname

Create database

mysql> create database dbname character set utf8 collate utf8_generic_ci


Loading data
From shell

>mysql -u root -p logista < /path/to/script.sql


Or from mysql
mysql> source /path/to/script.sql

Drop database

mysql> drop database dbname;