On Wed, Jan 05, 2011 at 12:03:03PM +0000, Anas Nashif wrote:
any comments on this? Or is it so bad and not work commenting on? :)
No, but it's the first week in the new year and we're not running at our usual speed ;-)
+++ /usr/lib/obs/server/bs_srcserver 2010-12-22 17:24:38.339160313 -0800 @@ -3657,7 +3657,14 @@ copyfiles($projid, $packid, $oprojid, $opackid, $files);
$files = keeplink($cgi, $projid, $packid, $files) if $cgi->{'keeplink'}; - my $rev = addrev($projid, $packid, $files, $cgi->{'user'}, $cgi->{'comment'}, $cgi->{'rev'}, $cgi->{'requestid'}); + my $rev; + if ( $cgi->{'keephist'} && !getrev($projid, $packid, 'latest')->{'rev'}) { + my @res = BSFileDB::fdb_getall("$projectsdir/$oprojid.pkg/$opackid.rev", $srcrevlay ); + BSFileDB::fdb_add_multiple("$projectsdir/$projid.pkg/$packid.rev", $srcrevlay, @res); + $rev = $orev; + } else { + $rev = addrev($projid, $packid, $files, $cgi->{'user'}, $cgi->{'comment'}, $cgi->{'rev'}, $cgi->{'requestid'}); + }
There are two reasons why it makes sense to do the addrev() also in the keephist case: - to document the action in the source history - to make sure the checkin count is increased, so that packages built with the copied source get a higher revision. (That's because you can't copy the rebuild counters on the repo servers) Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org