| 1293 |
dpurdie |
1 |
#!/usr/bin/perl
|
|
|
2 |
|
|
|
3 |
use lib '../lib';
|
|
|
4 |
use Codestriker::Repository::RepositoryFactory;
|
|
|
5 |
use Codestriker::Repository::Subversion;
|
|
|
6 |
use Codestriker::FileParser::SubversionDiff;
|
|
|
7 |
use Codestriker::FileParser::PatchUnidiff;
|
|
|
8 |
|
|
|
9 |
my $rep = Codestriker::Repository::RepositoryFactory->get('svn://file/var/svn/repos/fbi2/trunk');
|
|
|
10 |
my $fh = new FileHandle;
|
|
|
11 |
#$fh->open("/home/sits/tamarama/topic4116821.txt") || die "Can't open file: $!\n";
|
|
|
12 |
#$fh->open("/home/sits/codestriker/test/testtopictexts/differing_binaries.patch") || die "Can't open file: $!\n";
|
|
|
13 |
$fh->open("/home/sits/tamarama/topic.txt") || die "Can't open file: $!\n";
|
|
|
14 |
#$fh->open("/home/sits/codestriker/bin/check.txt") || die "Can't open file: $!\n";
|
|
|
15 |
|
|
|
16 |
my @chunks = Codestriker::FileParser::SubversionDiff->parse($fh, $rep);
|
|
|
17 |
#my @chunks = Codestriker::FileParser::PatchUnidiff->parse($fh);
|
|
|
18 |
foreach my $chunk (@chunks)
|
|
|
19 |
{
|
|
|
20 |
print "old line $chunk->{old_linenumber} new $chunk->{new_linenumber}\n";
|
|
|
21 |
print "TEXT: $chunk->{text}\n";
|
|
|
22 |
}
|