mature men women

personals co

match com commercial

black women dating white men

date mature

wimbledon women singles

horney chat rooms

cheap chat phone

hawaii christian singles

india sex woman

site erotique

online dating texas

staten island singles

swinging singles

singles box

african women seeking men

the match maker

business personals

date agency

discreet dates

lebian chat

laredo singles

perth women seeking men

african dating service

singles tunbridge wells

my match com

bondag

london dating agency

lesbian roommates

dating sites over 50

1994 singles

friend dinder

doncaster singles

sex meet

christian singles photos

uk online dating agency

movies personals

ts ladies com

mujeres escort

sex matchmaker

ault friend finder

housewife looking for sex

swigers video

lovers personals

online dating ottawa

taunton singles

dating sites for herpes

oral sex man

sex three way

sex chat groups

deaf free dating site

couple echangistes

date liverpool

personals in michigan

near date

personal want ads

phone sex contacts

phone free date

personals hot

sex chat websites

www sexcam

countryside dating

new york personals

san diego dating sites

dating countryside

black adult

meet singles in montreal

realsex

free hot housewives

dting

online dating surveys

dallas swinger clubs

cheap chat girls

denver singles groups

singles lincoln

perfect match dating

adults finder

pa singles

ford escor

chinese personals

ukranian women

filipino friend finder

lds singles com

swapping movies

pa swing clubs

philadelphia singles

edgewood singles

seattle swing clubs

michigan swinger clubs

cheating housewives websites

horneygirls com

woman seeking men in mumbai

female sex dates

weed singles

sex of girl

denver friend finder

dating service in canada

www party girls com

men speed dating

frindfinder com

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;

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

Comments