Best practices for using Hg with Grails?

梦想与她 提交于 2019-12-21 06:08:28

问题


What should I check in/not check in? Since many of the files are sometimes auto-generated I'm not entirely sure how to handle this using version control...does it have something to do with tags?

For instance in ANT, I know not to check-in my target/bin directories...but Grails adds another level of confusion to this...since some of code is generated and some of it is not.

(It may become clearer as I go...but it seems to be that there needs to be some way of being able to tell what was just generated and what was modified by a developer so that it needs to be placed in version control)


回答1:


Here's the .hgignore directory I've got on my most recent grails project (with a couple of project specific things taken out):

syntax: glob

out
target
logs
*.iml
.idea
*.iws
*.war
workspace.xml
lib/build
lib/compile
lib/runtime
lib/test
~$*
stacktrace.log
*.tmproj
*.launch
reports/
*.orig
*.zip

.DS_Store
*/.DS_Store
web-app/WEB-INF/classes
cobertura.ser



回答2:


The generated code in Grails should be placed under version control. It's not secondary executable code that is generated by the build process like class files, but instead is code that is part of your source. The generated code is intended to be just a starting point for your application and will most likely be modified at some point anyway.




回答3:


Also check this:

http://www.grails.org/Checking+Projects+into+SVN

and this:

https://stackoverflow.com/questions/4201578



来源:https://stackoverflow.com/questions/2582121/best-practices-for-using-hg-with-grails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!