Tag Archive for vc

Howto list all the file extension types in an SVN log dump

svn log -v > myrepo.log

perl -ne 'print qq{$1
} if m{^s+.*(.[^.s]w+)$}' myrepo.log | sort | uniq -c | sort -r

source

Remove .svn directories

rm -rf `find . -name .svn`

source

Roll back a change in ClearCase

ct merge -delete -to <file> -version main6 main10

ct merge -delete -to <file> -version mainLATEST

source

ClearCase commands

# Add a new element to ClearCase without getting a stupid error because the current working directory isn't checked out.
ct mkelem –mkp -c "frobnitz" file.txt

# recursively import new_dir into the vob as vob_dir, then label everything in the new vob_dir
clearfsimport -r -nsetevent -comment "Omg h4x!" new_dir vob_dir
ct mklabel -r -rep MY_LABEL vobdir

# get the changes since Monday for files that have been updated in the last 3 days
find -atime -3 | xargs ct.bat lshistory -sin Mon -fmt "%u: %Nc (%e %En, %Vd)
"

# recursive history for the last 3 days
find -atime -3 | ct.bat lshistory -fmt "%c"

# show changes made to a directory since 12am today.  The -l option forces comments to print.
ct lshistory -r -l -sin 00:00:00

# shows when the label was changed on a directory
ct lshistory -d -min directoryname

# Recursively import the directory new_dir into a vob_dir(ectory)
clearfsimport -r -nsetevent new_dir vob_dir

# Recursively apply a label a directory and all its contents.  Omit -r to just label the directory.
ct mklabel -r -rep THE_LABEL directoryname

source

ViewController User_ID to Username

function vc_format_user_id($table, $val, $row)
{
global $vc_username;
if(!is_array($vc_username)) $vc_username = array();
if(!isset($vc_username[$val]))
{
$u = new User($val);
$vc_username[$val] = $u->username;
}
return $vc_username[$val];
}

source

ViewController Format Date Callback

function vc_format_create_date($table, $val, $row) { return date("m/d/Y", strtotime($val)); }

source