uk dating singles

vegas for singles

download singles free

personals ireland

ford escord

one night date

on line dating tips

married and lonely

singles 2 english

pittsburgh singles

sex chat no sign up

sex gay

singles 100

talk match com

online personal

contacts mature

for sexual encounters

match comm

affairs dating

hampton singles

nc personals

darkwanderer cheating wife

live 121 chat

pic swinging

telephone dating service

yahoo dating sites

love to date

uk swinging club

current dating sites

match com commercial

ayrshire singles

affairs adult

harrogate singles

single swinger

budapest escort service

mountaineer singles

wetlands cheating wives

adults finder com

swinger's

www hot housewives

escort north east

swinging grandmas

free asian girl

hot date chat

singles personals

matchmaker sites

discrete affair

california call girls

white men black women dating site

group swinger

single board computers price

adolt sites

nj personals

europe online dating

singles patches

personals victoria

dating introduction agency

escort service ohio

online encounters

house wives cheating

chat de sexo gratis

senior dating advice

online senior dating

escort dating

meeting singles

cruise singles

www asiangirls com

adoult friend finder

free christian match

largest jewish singles

swaping couples

scottish singles

singles in san diego

online dating sites in the usa

free asian women

display date

free phone date

live links personals

gay massage boston

mix and match swimwear

rencontre fr

native singles

loans for single moms

totally free dating service

dult freind finder

couple girl

sex chat cam to cam

redpersonals com

online dating teenagers

singles in mi

90 minutes escort service

escort service in india

youth singles

haven swinging

ebony ivory dating

ventura singles

singles in ghana

singles and beyond

dating agencies in ireland

adoult freind finder

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;

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

Comments