Skip to content

Commit

Permalink
Revert "Item11210: Update the topicinfo"
Browse files Browse the repository at this point in the history
This reverts commit 5594581da1ad3e129f16e9dc2651c1b11b48772d.

git-svn-id: http://svn.foswiki.org/trunk@12928 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Oct 29, 2011
1 parent caa60c7 commit 6000860
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions core/tools/develop/post-commit.pl
Expand Up @@ -13,7 +13,7 @@
my $BUGS = '/home/foswiki.org/public_html/data/Tasks';
my $SUPPORT = '/home/svn';

my $verbose = 1; # 1 to debug
my $verbose = 0; # 1 to debug

my $first = 1;
if ( open( F, '<', "$SUPPORT/lastupdate" ) ) {
Expand Down Expand Up @@ -68,11 +68,7 @@ sub _add {
for my $rev ( $first .. $last ) {

# Update the list of checkins for referenced bugs
my $logmsg = `/usr/local/bin/svnlook log -r $rev $REPOS`;
my $committer = `/usr/local/bin/svnlook author -r $rev $REPOS`;

#SMELL: Can't use chomp - $/ is undef
$committer =~ s/\n$//;
my $logmsg = `/usr/local/bin/svnlook log -r $rev $REPOS`;

my @list;
while ( $logmsg =~ s/\b(Item\d+)\s*:// ) {
Expand All @@ -83,26 +79,10 @@ sub _add {
my $fi = "$BUGS/$item.txt";
my $changed = 0;

# Extract the last revision of the item
my $lastrev = 1;
if ( -e "$BUGS/$item.txt,v" ) {
my $rlog = `rlog -h $BUGS/$item.txt`;
($lastrev) = $rlog =~ m/^head: 1\.(\d+).*?$/ms;
print "LAST REVISION $lastrev of Item$item \n" if $verbose;
}
$lastrev++;

open( F, '<', $fi ) || next;
my $text = <F>;
close(F);

# Update the TOPICINFO
$text =~ s/^(%META:TOPICINFO{.*?author=")(?:[^"]*)(".*?}%)$/$1$committer$2/m;
$text =~ s/^(%META:TOPICINFO{.*?version=")(?:[^"]*)(".*?}%)$/$1$lastrev$2/m;
$text =~ s/^(%META:TOPICINFO{.*?comment=")(?:[^"]*)(".*?}%)$/$1svn commit$2/m;
my $timestamp = time();
$text =~ s/^(%META:TOPICINFO{.*?date=")(?:[^"]*)(".*?}%)$/$1$timestamp$2/m;

unless ( $text =~
s/^(%META:FIELD.*name="Checkins".*value=")(.*?)(".*%)$/$1._add($2, $rev, \$changed).$3/gem
)
Expand Down

0 comments on commit 6000860

Please sign in to comment.