# Print a clearer message if ~/.cvspass does not exist when cvs login is
#  called. Closes: #168163.
#
# Patch by Steve McIntyre <steve@einval.com>
diff -Nur src/login.c src/login.c
--- src/login.c	2005-05-14 05:47:28.000000000 +0800
+++ src/login.c	2006-02-26 21:31:17.000000000 +0800
@@ -309,7 +309,10 @@
     fp = CVS_FOPEN (passfile, "r");
     if (fp == NULL)
     {
-	error (0, errno, "warning: failed to open %s for reading", passfile);
+    if (errno == ENOENT)
+        error (0, 0, "CVS password file %s does not exist - creating a new file", passfile);
+    else
+        error (0, errno, "warning: failed to open %s for reading", passfile);
 	goto process;
     }
 
