cuiyi's blog(崔毅 crazycy)

记录点滴 鉴往事之得失 以资于发展
数据加载中……

CVS(Eclipse)的addto cvs.ignore在已经有版本控制的工程下的使用

工程已经在版本控制下了,出于疏忽,忘记了对工程中的某些目录,比如web-inf 和 classes目录忽略提交;

正常方式是在share project时使用addto cvs.ignore忽略之;


为后来弥补所累,在Eclipse帮助手册CVS部分有这样的话:
Tip: Once a resource is under version control, it cannot easily be subsequently ignored. This is why
adding to version control is an explicit operation performed by you the user.

看来困难了,嘿嘿,Eclipse帮助手册CVS部分还有这样的话:
When committing resources, often there are resources that you do not want to add to version control.
One way you can 
do this is by using the CVS "ignore" facility,
which reads the contents of the file .cvsignore to determine what to ignore.

The .cvsignore file can be added to any directory of a project.
Many existing CVS projects already contain several of these files.
This text file consists of a list of files, directories, or patterns.

For example, to add a .cvsignore file to ignore the entire bin directory of an existing project:

   
1. In one of the navigation views, select a project that contains a /bin directory.
      The bin directory will commonly contain the projects build output.
      These are files that are generated from the project
's source files and are usually not version-controlled.
   2From the pop-up menu for the project, select New>File. 
   
3
. Type .cvsignore as the file name, then press Finish.
      The file will be created in your project
's root directory.
      You should see it in one of the navigation views.

   4. Enter bin in the .cvsignore file and save it.
   
5. Select the project. 
      From the context menu, select the Team 
> Synchronize with Repository menu item. 
      Notice that the bin directory does not show as an outgoing change. It is ignored.

The cvsignore file consists of a list of files, directories, or patterns.
In a similar way to the global ignore facility, the wildcards 
* and ? may be present in any entry in the .cvsignore file.
Any file or sub
-directory in the current directory that matches any one of the patterns will be ignored.

Tip: In the Team menu and in the Synchronize view resource context menu
there is a menu item (addto .cvsignore)
for adding a file pattern to the appropriate .cvsignore file.
This menu item is enabled for
resources that are not yet under CVS version control.


搞定,呵呵.
看到绿色部分,知道为什么了吧?看到红色部分,知道该怎么做了吧?

posted on 2006-07-28 12:18 crazycy 阅读(2483) 评论(3)  编辑  收藏 所属分类: JavaEE技术

评论

# re: CVS(Eclipse)的addto cvs.ignore在已经有版本控制的工程下的使用  回复  更多评论   

实际上JBuilder的做法一样,可以看看工程目录下的.cvsignore文件,按照这样的做法手动添加了在Eclipse里只能。
2006-07-28 14:32 | zilchist

# re: CVS(Eclipse)的addto cvs.ignore在已经有版本控制的工程下的使用  回复  更多评论   

我手工添加了,但是怎么还是撤销不了版本控制呢?
2007-09-17 22:04 | jlupaopao

# re: CVS(Eclipse)的addto cvs.ignore在已经有版本控制的工程下的使用  回复  更多评论   

@jlupaopao
哥们,最近我也发现了,我在重新捣鼓,一有进展就与你share
2007-10-02 15:56 | crazycy

只有注册用户登录后才能发表评论。


网站导航: