CVS Ignore Directories
Asked Answered
K

3

22

How do you set to ignore folders and all its subdirectories in CVS?

It's getting pretty annoying when it commits every file in my \bin, \obj or \TestResult folders.

Tried *\TestResult in the ignore list - to no avail.

Kaifeng answered 15/9, 2010 at 23:44 Comment(0)
T
27

you can create a .cvsignore file in your directories. See here for details

In your case the .cvsignore of your project root would look like

bin
obj
TestResult
Toreador answered 15/9, 2010 at 23:59 Comment(4)
One cvsignore file per directory?Kaifeng
@John Yes, one file per directory where there are files or directories to be ignored. Of course you do not need to put them in or below ignored directories. If there are filetypes or directories which should everywhere be ignored you can add them to one of the personal, repository or system cvsignore files.Toreador
.cvsignore only seems to work for ignoring files during "commit" operations. It does not work for "update" operations, unfortunately, and AFAICT there is no way to ignore directories during "update".Dilator
@dpk I think it's caused by the fact that you already committed some files which you want to ignore... To make it work also for update, you have to remove cvs ignore, commit it, remove the files which should be ignored, commit that removal, add cvs ignore with the files which should be ignored and commit. This way you will get rid of them from cvs so they won't show up as incoming changes.Spacesuit
E
3

I also had to add .cvsignore into the .cvsignore file, because

cvs up returned ? .cvsignore

Note that I am using 1.12.13-MirDebian-9

Ephemerid answered 7/8, 2013 at 11:32 Comment(2)
I always commit .cvsignore files, because they should be used by every team member.Brambly
I guess it all depends what you are doing, if it is to affect others ... I was mixing cvs and subversion, my .cvsignore contained just .svn (this was when subversion had .svn dirs in every directory), I was to import stuff from cvs to subversion and kept them in parallel for some time ... just to be on the safe side ...Ephemerid
B
1

I have tried the way above and it works, except a detail: if you want to ignore a folder, and you have committed this folder to CVS server, you cannot delete this folder and commit to delete it in CVS repository. Eclipse will ignore your delete. You have to:

  • Move all files in this folder to another location,
  • In Eclipse, synchronize with CVS,
  • mark as merged to all files removed,
  • they will appear with - before them. commit to delete them in CVS server.
  • create .cvsignore file in this folder, with New - File, type .cvsignore as file name, and edit it to match patrons of file names of those you want to ignore.
  • synchronize again, to commit this .cvsignore.
  • Move files back to this folder. You are done.
Busby answered 17/2, 2016 at 15:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.