Skip to content

Commit

Permalink
Item11624: reprev comment and number persists in TOPICINFO long after…
Browse files Browse the repository at this point in the history
… the event

git-svn-id: http://svn.foswiki.org/branches/Release01x01@14308 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
SvenDowideit authored and SvenDowideit committed Mar 14, 2012
1 parent 9c7157c commit acb39cc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 12 additions & 2 deletions core/lib/Foswiki/Meta.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1886,6 +1886,10 @@ sub save {
# (side effect of getRevisionInfo)
$this->getRevisionInfo();

# Clear the reprev flag
undef $this->get('TOPICINFO')->{reprev};
undef $this->get('TOPICINFO')->{comment} if ($this->get('TOPICINFO')->{comment} eq 'reprev');

# Semantics inherited from Cairo. See
# Foswiki:Codev.BugBeforeSaveHandlerBroken
if ( $plugins->haveHandlerFor('beforeSaveHandler') ) {
Expand Down Expand Up @@ -3626,8 +3630,14 @@ sub setEmbeddedStoreForm {
# when old code (e.g. old plugins) generated the meta.
$ti->{version} = Foswiki::Store::cleanUpRevID( $ti->{version} );
$ti->{rev} = $ti->{version}; # not used, maintained for compatibility
$ti->{reprev} = Foswiki::Store::cleanUpRevID( $ti->{reprev} )
if defined $ti->{reprev};
if ( defined $ti->{reprev} ) {
$ti->{reprev} = Foswiki::Store::cleanUpRevID( $ti->{reprev} );
unless ($ti->{reprev} &&
$ti->{version} &&
$ti->{reprev} == $ti->{version}) {
undef $ti->{reprev};
undef $ti->{comment} if ($ti->{comment} eq 'reprev');
}
}
else {

Expand Down
2 changes: 2 additions & 0 deletions core/lib/Foswiki/Store/VC/Store.pm
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ sub readTopic {
for my $i (qw(author version date)) {
$ri->{$i} = $truth->{$i};
}
undef $ri->{reprev};
undef $ri->{comment} if ($ri->{comment} eq 'reprev');
}

my $gotRev = $version;
Expand Down

0 comments on commit acb39cc

Please sign in to comment.