在 IntelliJ 中,我可以有不同的更改列表,这样我就可以将某些我不想提交的文件放入不同的更改列表中,并且除非我选择该更改列表,否则系统不会提示我提交这些文件。例如,某些数据库配置文件、eclipse项目文件等,我希望很少或从不提交。
有没有办法在 Eclipse 中使用 Subversion 来做到这一点?我一直无法找到它,所以我必须每次都取消选中我不想提交的文件。请注意,我无法使用 svn:ignore,因为这些文件位于且应该位于存储库中。
In IntelliJ, I can have different change lists so that I can put certain files that I never want to commit into a different change list, and I won't be prompted to commit those files unless I select that change list. For example, certain database configuration files, eclipse project files etc., I want to rarely or never commit.
Is there a way to do this using Subversion in Eclipse? I haven't been able to find it so I have to uncheck the files I don't want to commit every time. Note that I can't use svn:ignore because these files are, and should be, in the repository.
发布评论
评论(5)
您可以在“同步”视图中执行此操作。单击显示更改集按钮。然后,您可以从右键单击菜单将更改的文件添加到更改集(并创建新的更改集)。
You can do this in the Synchronize view. Click the Show Change Sets button. You can then add changed files to change sets (and create new change sets) from the right-click menu.
虽然 subversion 不直接支持更改列表的更改集概念,但一种可能性是将 SVN 与 Mylyn。
您可以将每组文件设置为不同的任务,并查看 subclipse 是否允许您通过 Mylyn 只提交一个或多个任务。
我没有直接测试该配置,但值得一试。
类似的选项(请参阅 Mylyn Wiki):
听起来很有希望。
While the notion of change set of change list is not directly supported by subversion, one possibility would be to use SVN in conjunction with Mylyn.
You could set each group of files to a different task and see if subclipse allows you to commit only one or several tasks through Mylyn.
I have not tested that configuration directly, but it is worth a try.
An option like (see Mylyn Wiki):
sounds promising.
Eclipse 中的更改集(subclipse 插件)效果不太好。如果您关闭项目并重新打开它,则您的更改集会消失,或者您之前分配给更改集的所有文件现在都将取消分配。如果它恰好是一个目录,但您想跟踪该目录内的文件,则 SVN:ignore 不起作用(不要问这是如何发生的 - 很难解释)。 IntelliJ 更改列表要好得多。
Change Sets in eclipse (subclipse plugin) does not work too well. If you close the project and reopen it, then either your change sets disappear or all the files you've previously assigned to a change set are now unassigned. SVN:ignore does not work if it happens to be a directory but you want to track files which inside the directory (don't ask how this happens - difficult to explain). IntelliJ change list is much better.
将这些文件放在 svn:ignore 列表中怎么样?
(设置要排除的文件作为
svn:ignore 属性的值)
他们将被排除在版本控制之外,这样他们就永远不会得到
已提交,并且对这些文件的任何更改都将被 subversion 忽略。
How about putting those files on svn:ignore list?
(set the files to exclude as values of
svn:ignore property)
They will be just excluded from versioning so that they never get
commited and any changes to these files will be ignored by subversion.
如果您获得 TeamCity 插件,您可以拥有比 Eclipse 中普通视图更高级的同步视图。
或者继续使用IDEA......
If you get the TeamCity plugin you can have a more advanced Synchronize view than normal in eclipse.
Or just keep using IDEA......