Skip to content

Commit

Permalink
cvsserver: fix revision number during file adds
Browse files Browse the repository at this point in the history
With this patch, cvs add / cvs commit echoes back to the client
the correct file version (1.1) so that the file in the checkout
is recognised as up-to-date.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Martin Langhoff authored and Junio C Hamano committed Jan 9, 2007
1 parent 49fb940 commit 3486595
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion git-cvsserver.perl
Original file line number Diff line number Diff line change
Expand Up @@ -1181,12 +1181,15 @@ sub req_ci
$filename = filecleanup($filename);

my $meta = $updater->getmeta($filename);
unless (defined $meta->{revision}) {
$meta->{revision} = 1;
}

my ( $filepart, $dirpart ) = filenamesplit($filename, 1);

$log->debug("Checked-in $dirpart : $filename");

if ( $meta->{filehash} eq "deleted" )
if ( defined $meta->{filehash} && $meta->{filehash} eq "deleted" )
{
print "Remove-entry $dirpart\n";
print "$filename\n";
Expand Down

0 comments on commit 3486595

Please sign in to comment.