如何在eclipse中自动添加新文件到SVN
eclipse中是否有任何插件,这样当我创建新的java文件时,它就会被添加到SVN中。 虽然我在创建 java 文件后立即执行 SVN add,但我多次忘记它,这导致了问题。 我们有很多未版本化的文件,因此在提交时,通过查看未版本化的文件来找出这些丢失的文件并不容易。
如果“创建新类”对话框本身中有一个复选框,那就太好了。
Is there any plugin in eclipse, so that when ever I created new java file it will be added to SVN.
Though I am doing an SVN add immediately after creating a java file, I am forgetting it many times, which is causing problems.
We have lot of un-versioned files, so when committing it is not easy to look through the un-versioned files to find out these missed files.
It would be great if there is a checkbox for this in the "Create New Class" dialog box itself.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
有一个名为 Subclipse 的开源 Eclipse 插件,它向 Eclipse 添加了对 Subversion 的支持,这可以通过将 SVN 与 eclipse 集成来为您提供一些帮助。
获取&安装Subclipse
Eclipse 插件是从Eclipse 中下载并安装的。在您的计算机上打开 Eclipse(无论您打开哪个工作区)。
从帮助菜单中选择安装新软件...
在出现的安装对话框中输入 http://subclipse.tigris.org/update_1.6.x 作为站点地址,然后单击“添加...”按钮。
输入站点名称,例如 Subclipse
您选择的新名称将显示在站点列表中。确保它是唯一选中的条目,然后单击“完成”。
展开在弹出的窗口中显示的子剪辑条目。在 URL 下的 Subclipse(必需)、Subversion Client Adapter(必需)、JavaHL Native Library Adapter(必需)和 SVNKit Client Adapter(可选)子条目旁边勾选复选标记,然后单击“Next”按钮。
单击“下一步”
接受许可证,然后单击“完成”。 Eclipse 现在将从项目服务器下载并安装 Subclipse 插件。
如果您选择“确定”继续安装,您可能会收到有关未签名功能的警告。
安装完成后,系统将询问您是否要重新启动 Eclipse,选择“是”。
使用 Subclipse 就像使用默认的 Eclipse CVS 客户端一样。网上有大量的演练和手册。在 Google 上搜索“如何使用 subclipse”是一个不错的起点。
编辑:正如一位非常有帮助的评论者 Lombo 所指出的,当您使用 Team -> 时,您还可以自动将文件添加到 SVN。提交你的项目,我不知道这个功能,谢谢!
编辑:如果您想了解有关 SVN 的更多信息,请查看 此 来自 IBM 的链接。他们有一个部分涉及忽略文件,您可以根据需要不自动添加某些文件。我认为团队>添加到 svn:ignore 功能可能是您在不使用命令行 SVN 的情况下所能获得的最接近的功能。
There is an open source Eclipse plug-in called Subclipse which adds support for Subversion to Eclipse which may help you a little by integrating SVN with eclipse.
Obtaining & Installing Subclipse
Eclipse plug-ins are downloaded and installed from within Eclipse. Open Eclipse on your machine (it does not matter which workspace you open).
From the Help menu select Install New Software…
In the resulting Install dialog enter http://subclipse.tigris.org/update_1.6.x as the site address and click the Add… button.
Enter a Name for the site like Subclipse
The new name you chose will show up in your list of sites. Ensure it is the only entry checked and then click Finish.
Expand the Subclipse entry which shows up in the window that pops up. Place a checkmark next to the Subclipse (required), Subversion Client Adapter (required), JavaHL Native Library Adapter (required), and the SVNKit Client Adapter (optional) sub-entries under the URL and click the Next button.
Click Next
Accept the license and then click Finish. Eclipse will now download and install the Subclipse plug-in from the project’s server.
You may receive a warning about unsigned features, if you do choose OK to continue the installation.
Once the install is complete you will be asked if you want to restart Eclipse, choose Yes.
Using Subclipse is like using the default Eclipse CVS client. There are a large number of walkthroughs and manuals available online. A Google search for ‘how to use subclipse’ is a good place to start.
Edit: As pointed out by a very helpful commenter Lombo you can also auto add files to SVN when you use Team -> Commit on your project, I was not aware of that function, thankyou!
Edit: If you want to know more about SVN check out this link from IBM. They have a section that deals with ignoring files which you may be able to bend to your needs of not auto-adding certain files. I think the Team > Add to svn:ignore functionality may be as close as you can get without playing with the command line SVN.
由于这种行为似乎不存在,因此我已提交了 subclipse 的增强票证。
http://subclipse.tigris.org/issues/show_bug.cgi?id=1197
Since it seems that this behaviour is not exist, I have filed an enhancement ticket for subclipse.
http://subclipse.tigris.org/issues/show_bug.cgi?id=1197
SUBCLIPSE没有此功能,您必须首先“添加到版本控制”,然后提交。
但是还有其他名为“SUBVERSIVE”的 Eclipse SVN 插件具有此功能。
您可以在这里找到其他信息:
subclipse 与 subversive
SUBCLIPSE don't have this functionality, you must 'add to version control' fist, then commit.
But there is other SVN plugin for eclipse named 'SUBVERSIVE' have this functionality.
other information you can find here:
subclipse vs subversive