Let opencvs show ignored files on import, not showing them is just confusing.
authorjoris <joris@openbsd.org>
Sun, 28 May 2017 17:11:34 +0000 (17:11 +0000)
committerjoris <joris@openbsd.org>
Sun, 28 May 2017 17:11:34 +0000 (17:11 +0000)
ok stsp@

usr.bin/cvs/cvs.h
usr.bin/cvs/file.c
usr.bin/cvs/import.c

index b58b259..a123c48 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: cvs.h,v 1.182 2015/04/04 14:19:10 stsp Exp $  */
+/*     $OpenBSD: cvs.h,v 1.183 2017/05/28 17:11:34 joris Exp $ */
 /*
  * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
  * All rights reserved.
@@ -388,6 +388,7 @@ void        cvs_remove_local(struct cvs_file *);
 void   cvs_add_local(struct cvs_file *);
 int    update_has_conflict_markers(struct cvs_file *);
 void   cvs_backup_file(struct cvs_file *);
+void   cvs_import_ignored(const char *);
 
 #define CO_MERGE       0x01
 #define CO_SETSTICKY   0x02
index fba1890..461e25e 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: file.c,v 1.269 2016/10/15 22:20:17 millert Exp $      */
+/*     $OpenBSD: file.c,v 1.270 2017/05/28 17:11:34 joris Exp $        */
 /*
  * Copyright (c) 2006 Joris Vink <joris@openbsd.org>
  * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
@@ -484,16 +484,18 @@ cvs_file_walkdir(struct cvs_file *cf, struct cvs_recursion *cr)
                                continue;
                        }
 
+                       (void)xsnprintf(fpath, PATH_MAX, "%s/%s",
+                           cf->file_path, dp->d_name);
+
                        if (cvs_file_chkign(dp->d_name) &&
                            cvs_cmdop != CVS_OP_RLOG &&
                            cvs_cmdop != CVS_OP_RTAG) {
+                               if (cvs_cmdop == CVS_OP_IMPORT)
+                                       cvs_import_ignored(fpath);
                                cp += dp->d_reclen;
                                continue;
                        }
 
-                       (void)xsnprintf(fpath, PATH_MAX, "%s/%s",
-                           cf->file_path, dp->d_name);
-
                        /*
                         * nfs and afs will show d_type as DT_UNKNOWN
                         * for files and/or directories so when we encounter
index 5b2aa94..cf74ad7 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: import.c,v 1.106 2016/10/13 20:51:25 fcambus Exp $    */
+/*     $OpenBSD: import.c,v 1.107 2017/05/28 17:11:34 joris Exp $      */
 /*
  * Copyright (c) 2006 Joris Vink <joris@openbsd.org>
  *
@@ -213,6 +213,17 @@ import_printf(const char *fmt, ...)
        free(str);
 }
 
+void
+cvs_import_ignored(const char *path)
+{
+       const char *p;
+
+       for (p = path; p[0] == '.' && p[1] == '/';)
+               p += 2;
+
+       import_printf("I %s/%s\n", import_repository, p);
+}
+
 void
 cvs_import_local(struct cvs_file *cf)
 {