#! /usr/bin/perl
use strict;
# Root could be found under CVS folder(Hidden)
my $cvsroot = ':pserver:user:passwd@192.168.1.2:/cvs';
my $branch = 'kiasma'; # which branch?
my @entries = qw(app src); # is there any entries?
my $whole_team_checked_in = 0; # set to 1 when get the whole team checked in branch
my $who_checked_in = '';
# use '-wUser' option to get someone's committed
unless ( $whole_team_checked_in ) {
$who_checked_in = '-w'.( $cvsroot =~ /:pserver:(.*):.*\@/ )[0];
}
my @files;
# make sure cvs.exe is already set enviroment variable
foreach my $entry ( @entries ) {
push @files, `cvs.exe -d $cvsroot log -r$branch $who_checked_in -R -S $entry`;
}
# replace seprator to '\' if on windows
map { s/,v$// and s/^(\/\w+){2}// and s/\//\\/g } @files if $^O eq 'MSWin32';
print "=" x 80, "\n", @files;
cvs log 查找某个分支上提交的文件
最新推荐文章于 2019-07-20 06:04:40 发布