Email: bknpk@hotmail.com Phone: +972-54-7649119


V

 

ASIC/FPGA Design and Verification Out Source Services

The following summarizes some SVN aliases, which always come handy for me.

Recently I started to work again with SVN. I had to re-write all my old aliases, which helped me out with SVN. I decided to put them on my site for me and for others.

alias svn_st 'svn status -u'
The first one just saving timing in writing status and -u is for getting update information.

alias svn_log 'svn log \!:1 | head -15'
The log usually prints a long list where you are usually interested in a few from the start.

alias svn_co 'xxx_ws checkout -trunk \!:1'
alias svn_ci 'svn ci -m \!:1 \!:2'
Commit and check out.

alias svn_gdiff 'svn cat -r \!:1 \!:2 > ~/Junk/\!:1.tmp; gvimdiff ~/Junk/\!:1.tmp \!:2'


This alias can be improved to clean the ~/Junk directory and to use the same file suffix in both files, so gvimdiff syntax colors both files correctly.

alias svn_gdiff 'set ext=`\rm -f ~/Junk/*;~/bin/file_ext.unx \!:2`;svn cat -r \!:1 \!:2 > ~/Junk/\!:1.$ext; gvimdiff ~/Junk/\!:1.$ext \!:2'

Where ~/bin/file_ext.unx (extracts the suffix: file.txt -> txt) is the following:

#!/bin/csh -f
echo ${1} | cut -d'.' -f2

The last one I did as per a friend's requested. She thought that a nice way is needed for replacing the svn diff text output. This alias brings tkdiff comparing your current version and the latest. It assumes an existing temporary directory at ~/Junk. Also you need to erase *.tmp files from there.

To operate you first fire up the SVN log alias and figure out to what version you want to compare. Then you do
svn_gdiff r233 top.vhd.



I have converted some of my aliases to CVS

  1. alias cvs_stat 'cvs -Q status | gvim - +/"^File"'
  2. alias cvs_log 'cvs log \!:1 | gvim -'
  3. alias cvs_diff 'cvs -Q update -p -r \!:1 \!:2 > ~/Junk/aa;gvimdiff \!:2 ~/Junk/aa'
Most of the commands are piped to gvim for farther processing and easy visual inspection.
To view differences between different file versions gvimdiff is a good choice.

I have also considered to use cvs diff to restore versions, but the above shown update is much cleaner way to do it.

  ...


Home

a reference model in systemc using queues, from C++ STD.






Search This Site


Feedback This Site




new pages on this site