cvsserver: fix revision number during file adds
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>
Martin Langhoff committed
Jan 9, 2007 at 15:10 UTC
3486595bf1671cabb6fa22d276db2907eefbf9b6
1 file changed
+4
-1
git-cvsserver.perl
+4
-1
@@ -1181,12 +1181,15 @@ sub req_ci
1181
$filename = filecleanup($filename);
1182
1183
my $meta = $updater->getmeta($filename);
1184
+ unless (defined $meta->{revision}) {
1185
+ $meta->{revision} = 1;
1186
+ }
1187
1188
my ( $filepart, $dirpart ) = filenamesplit($filename, 1);
1189
1190
$log->debug("Checked-in $dirpart : $filename");
1191
1189
- if ( $meta->{filehash} eq "deleted" )
1192
+ if ( defined $meta->{filehash} && $meta->{filehash} eq "deleted" )
1193
{
1194
print "Remove-entry $dirpart\n";
1195
print "$filename\n";