singles jamaica

cam sex chats

freind finder com

latin dating services

single women in prison

christain dating services

dating agency yorkshire

cruising personals

singles in reading

singles clubs chicago

gay chat sites

email online dating

cheating house wives

austin texas singles

mp3 single

world best dating site

singles poland

netherland dating sites

free people finder search

swinging websites

cedar singles

sex now

sex text chat

dallas sex

www sexclubs com

hot cam girls

downloadable pron

frienfinder

palm beach singles

overweight singles

sexsearch com passwords

jewish singles chicago

free phone dating line

singles coming soon

badminton singles

americans dating sites

personals austin texas

matchdating

private kontakte

dating sites review

dating nashville tn

canadian online dating

girls phone

personals chicago

sex dating websites

personals hot

singles active

free dating chatting

sex local

adultfriend firnder

vt singles

outdoor gay sex

swinger vacations

services dating

escourt girls

las vegas classifieds jobs

single

girls free

free swing

swing party

free chatting online

singles amsterdam

denver christian singles

online dating plenty of fish

singles marriage

dallas texas singles

seattle singles clubs

big black booty pic

fun wives

singles dating agencies

nz dating services

dating sites in malaysia

mens escort

dating bath

jewish dating web site

sex dating scotland

women cuckold

ky singles

adultsearch

auburn singles

how to get a laid

black lesbian chat rooms

largest dating website

tulsa singles station

women looking for sex in uk

chat women

singles women

santa rosa ca singles

halifax dating

ford escort si

date index

oxford singles

seks cam

on line speed dating

internet dating book

yahoopersonals

girls get laid

asian women seeking men

escort indiana

singles running

Querying MS Visual Source Safe in Perl – Counting DIFFs

Posted by jonathan on August 15, 2007

The following Perl code automates MS Visual Source Safe to get the stats on check-ins. The input should be a list of files from the output of my other script.



#!/usr/bin/perl -w
use strict;

# Read a list of check-ins and call 'ss Diff' to get what was checked-in

$ENV{'SSDIR'} = "";
my $project = " ";
my $checkInsFile = "";

# Read in check-ins from file
open( checkIns, $checkInsFile );
while( ) {

# Parse out the details from the check-in
my( $file, $ver, $use, $date, $com );
if( m/^(.*)\t(.*)\t(.*)\t(.*)\t(.*)$/ ) {
( $file, $ver, $use, $date, $com ) = ($1, $2, $3, $4, $5);
}

# Put any check for conditions here

# Check for some date range

# Check for some file pattern

# Check for some comment pattern

# Summed totals for this check-in
my $added = 0;
my $changed = 0;
my $deleted = 0;

# Special case version 1 to get the file line count of Version 1 (Check-in)
if( $ver == '1' ) {

# Get linecount for version 1 of file
my $command = "ss View \$/$project/$file -V$ver|";
open( ssView, $command );
while( ) {
$added++;
}
close( ssView );

}
else {

# Open a Unix diff from version-1 to version
my $verMinus1 = $ver - 1;
my $command = "ss Diff -DU \$/$project/$file -V$verMinus1~$ver|";
open( ssDiff, $command );

while( ) {

# Match for "number[a|d|c]number" at the start of a line
if( m/^(\d+),?(\d*)([acd])(\d+),?(\d*)$/ ) {

# Added
if( $3 eq "a" ) {
$added += ($5 gt "" ? $5 : $4) - $4 + 1;
}

# Changed
if( $3 eq "c" ) {
$changed += ($5 gt "" ? $5 : $4) - $4 + 1;
}

# Deleted
if( $3 eq "d" ) {
$deleted += ($5 gt "" ? $5 : $4) - $4 + 1;
}
}
}

close( ssDiff );
}

# Print check-in details + edit details
print "$file\t$ver\t$use\t$date\t$added\t$changed\t$deleted\t$com\n";
#print "Totals for ${file};$ver ($use) on $date added: $added changed: $changed deleted: $deleted\n";
}

# Done
exit 0;

Querying MS Visual Source Safe in Perl – List Check-Ins

Posted by jonathan on August 15, 2007

The following code needs Visual Source Safe to be installed, and produces a list of all file versions for the project folder set up as ‘my $project’.  Remember to set the network folder where the ss.ini file lives.

The program outputs a tab separated list of:
filename->version->user->date->comment.

Enjoy! My next post will take this file and dump out the lines added, changed, deleted for whatever subset of the check-ins that you are interested in.



#!/usr/bin/perl -w
use strict;

#-------------------------------------------------------------------
# Given a source project folder, list the files and check-in details
#
# ToDo:
# Progress indicator
# Usage output.
# Take command-line arguments
#-------------------------------------------------------------------

$ENV{'SSDIR'} = "";
my $project = "";

# Start with the project folder
my @files;
open( ssFiles, "ss Dir \$/$project|");

# Iterate through the list of files
while( ) {

# Get all the cpp and .h files
if( /.*\.cpp/ || /.*\.h/ ) {
push @files, $_;
}
}
close( ssFiles );

# Print a header line
print "Filename\tVersion\tDeveloper\tDate\tComment\n";

# Iterate over the list of chomp'ed files (removes trailing newlines)
chomp( @files );
foreach( @files ) {

# What we are looking at
my $file = $_;
my $lastver = -1;
my( $ver, $use, $date, $com );

# Get history of versions for file, excluding build labels
open( ssHistory, "ss History \$/$project/$_|");
while( ) {

# Get version number
if( m/^.*Version (\d*) .*/ ) {
$ver = $1;
}

# Get user name
if( m/^.*User\: (\w*).*Date\:.* (\d+)\/(\d*)\/(\d*) .*Time.*/ ) {
$use = $1;
$date = "$2/$3/20$4";
}

# Get comment
if( m/^.*Comment\: (.*).*$/ ) {
$com = $1;
}

# If we have all vars populated and haven't already printed this version check-in
# then go ahead and print it out
if( /^$/ && $ver && $use && $lastver!=$ver ) { # $com optional
$lastver = $ver;
print "$file\t$ver\t$use\t$date\t$com\n";

# We are done with this data now
$ver = $use = $date = $com = undef;
}
}

# Close command stream
close( ssHistory );

}
exit 0;