git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] cvsserver: fix revision number during file adds

From
MLMartin Langhoff <martin@catalyst.net.nz>
Date
Jan 9, 2007, 02:10 UTC
Message-ID
<11683086411718-git-send-email-martin@catalyst.net.nz>

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>
---
 git-cvsserver.perl |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 0b75f9c..81d478d 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -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";
-- 
1.5.0.rc0.g4017-dirty
Message 1 of 1 in “cvsserver: fix revision number during file adds”
  1. cvsserver: fix revision number during file addsMartin Langhoff, Jan 9, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.