水银忽略文件的Eclipse和Android开发 [英] Mercurial ignore-file for Eclipse and Android development

查看:169
本文介绍了水银忽略文件的Eclipse和Android开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到样品的Mercurial忽略<一个文件href="http://stackoverflow.com/questions/34784/mercurial-setup-for-visual-studio-2008-projects">Visual工作室,在其他之中。

I have seen samples for Mercurial ignore files for Visual Studio, amongst others.

我刚开始用Android开发玩弄,我也利用这段时间与水银尝试。 所以我的问题是:没有任何人有一个 .hgignore 文件中使用的Eclipse和Android开发的一个很好的例子

I've just started playing around with Android development, and I also use this time to experimenting with Mercurial. So my question is: does anyone have a good example of a .hgignore file to use for Eclipse and Android development?

对于初学者我有以下自己:

For starters I've got the following myself:

# use glob syntax
syntax: glob

# Ignore patterns
.metadata\
bin\
gen\

是否还有其他忽略模式应该包括在内?如若比如Eclipse的文件的.classpath 的.project 从版本控制忽略呢?

Are there any other ignore patterns that should be included? Should for instance the Eclipse files .classpath and .project be omitted from version control as well?

- 编辑下面 -

我还没有完全得到我希望还没有答案,所以我会拿出一个赏金,并尝试指定一个更清楚一点,我在寻找什么。

I haven't quite gotten the answers I hoped for yet, so I'll put out a bounty and try to specify a bit clearer what I'm looking for.

试验了一下自己之后,我似乎找到了建议 .hgignore 上面列出的似乎是足够的。我所做的只是另外,是符合 .settings (这是出现我跑后的文件夹的 Android的工具 - >修复项目属性)。我还发现,(所提到的Ry4an)的Eclipse的文件的.classpath 的.project 不是的被排除在外。

After experimenting a bit myself, I seem to have found that the suggested .hgignore listed above seems to be sufficient. The only addition I've made, is one line with .settings (this was a folder that appeared after I ran Android Tools -> Fix Project Properties). I've also found that (as mentioned by Ry4an) that the Eclipse files .classpath and .project should not be excluded.

不过,我不确定这个小忽略文件就足够了,当我到达项目比基本教程有点大(如果它实际的的都好,请解释原因,你会的功劳)。总结一下,我找什么:

I am however uncertain that this small ignore file will be sufficient when I get to projects a bit bigger than the basic tutorials (if it actually is all good, please explain why, and you'll get the credit). So to summarize what I'm looking for:

  • 我想要一个具体的例子为 .hgignore 文件为Eclipse下Android项目
  • 忽略的文件应该是这样,每当我检查出库的副本在新的位置,它应该马上工作(即无需惹的路径和参考文献,添加缺少的文件等。)
  • 也请解释的为什么的你的包含文件看起来像它(我想知道为什么某些文件/目录排除(为什么有些绝对应该被包括在内))
  • 如果您有OS特定排除,请还规定这样(我在Windows 7上运行的BTW)
  • I want a concrete example for a .hgignore file for an Android project under Eclipse
  • The ignore file should be so that whenever I check out a copy of the repository at a new location, it should work straight away (i.e. without having to mess with paths and references, add missing files etc.)
  • Please also explain why your include file looks like it does (I want to understand why certain files/directories are excluded (and why some definitely should be included))
  • If you include OS specific excludes, please also state so (I'm running on Windows 7 btw.)

推荐答案

这次日食的文件一定要添加。一般原则是补充:

The eclipse files should definitely be added. The general guideline is to add:

  • 键入是手写的一切/
  • 在一切必要构建项目的小子集

这是最后一个就是你的判断的原因。它清楚地排除了.jar文件,你建立你自己和你的最终.apk文件,但它包含是你使用的.jar第三方?有些人使用了它们,但更好的是,包括像'常春藤',这让接下来的建设者下载自己需要自动要求的依赖管理的配置文件。

That last one is where your judgement comes in. It clearly excludes the .jar files you build yourself and your final .apk, but does it include third party .jar's you use? Some people do include them, but better is to include a configuration file for a dependency manager like 'ivy' which lets the next builder download the requirements they need automatically.

在自动创建在我选择的工具的一个项目,我就做一个命令是这样的:

After auto-creating a project in my tools of choice, I'll just do a command like this:

hg status --unknown --no-status >> .hgignore

这将增加所有未知文件的列表.hgignore。然后,我去和删除的东西我都想保存(例如:的.project),并通配符文件将增长的兄弟姐妹(例如:**类)

which adds the list of all unknown files to .hgignore. Then I go in and remove things I wants saved (ex: .project) and wildcard files that will grow siblings (ex: **.class)

这篇关于水银忽略文件的Eclipse和Android开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆