From 40d55f64b63bac7f73e8a5b60f1f8a21d8061eeb Mon Sep 17 00:00:00 2001 From: mhagger Date: Thu, 19 Sep 2013 03:36:03 +0000 Subject: [PATCH] Ignore "CVS" directories within the repository. CVS stores some kinds of metadata in "CVS" subdirectories within repository directories (for example, whether a file is locked or watched). These directories are not part of the source tree and contain no information useful to the conversion, so ignore them. Patch by: David Morris Simplified by: me Researched by: Olli Hauer git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5434 be7e6eca-30d4-0310-a8e5-ac0d63af7087 --- cvs2svn_lib/repository_walker.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cvs2svn_lib/repository_walker.py b/cvs2svn_lib/repository_walker.py index 3dd1c525..f56131bd 100644 --- a/cvs2svn_lib/repository_walker.py +++ b/cvs2svn_lib/repository_walker.py @@ -140,8 +140,9 @@ class _RepositoryWalker(object): Also yield CVS_DIRECTORY if any files are being retained in the Attic. - Silently ignore subdirectories named '.svn', but emit a warning if - any other directories are found within the Attic directory.""" + Silently ignore subdirectories named '.svn' or 'CVS', but emit a + warning if any other directories are found within the Attic + directory.""" retained_attic_files = [] @@ -155,7 +156,7 @@ class _RepositoryWalker(object): "Excluding file from conversion: %s" % (path_in_repository,) ) elif os.path.isdir(pathname): - if fname == '.svn': + if fname == '.svn' or fname == 'CVS': logger.debug( "Directory %s found within Attic; ignoring" % (pathname,) ) @@ -189,6 +190,8 @@ class _RepositoryWalker(object): Also look for conflicts between the filenames that will result from files, attic files, and subdirectories. + Silently ignore subdirectories named 'CVS', as these are used by + CVS to store metadata that are irrelevant to the conversion. Silently ignore subdirectories named '.svn', as these don't make much sense in a real conversion, but they are present in our test suite.""" @@ -217,7 +220,7 @@ class _RepositoryWalker(object): elif os.path.isdir(pathname): if fname == 'Attic': attic_dir = fname - elif fname == '.svn': + elif fname == '.svn' or fname == 'CVS': logger.debug("Directory %s ignored" % (pathname,)) else: dirs.append(fname) -- 2.11.4.GIT