如何找到对源代码控制有未提交更改的项目?
我正在编写一个插件,我必须查找工作区中存在的某些项目是否有未提交到 SVN 的文件。我正在使用 subversive 与 SVN 存储库进行交互。我确信有一种方式,颠覆性可以做到这一点:),但我找不到它的地方。以有为例。
你知道如何实现这一目标吗?或者去哪里寻找例子?谢谢。
I am writing a plug-in and I have to find if some project existing in the workspace has uncommitted files to SVN. I am using subversive to interact with the SVN repository. I am sure there i a way, subversive does it :), but I could not find the place where it does. To have as an example.
Do you know how to achieve this ? Or where to look for an example ? Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我自己从未干预过这段代码...但是装饰器颠覆性地将文件放在包资源管理器中(小“>”表示未提交的更改)是通过 org.eclipse.ui.decorators 扩展点提供的。因此,举个例子,您需要在工作区中导入 org.eclipse.team.svn.ui 插件(文件 > 导入 > 插件和片段)并查看其 plugin.xml 以找到执行此操作的装饰器工作(如果我没记错的话,它是 org.eclipse.team.svn.ui.decorator.SVNLightweightDecorator)。
祝你好运,团队 API 并不是最容易使用的......
I have never meddled with this code myself... but the decorators subversive puts on files in your package explorer (the little '>' for uncommited changes) are provided through the org.eclipse.ui.decorators extension point. So for an example, you'd need to import the org.eclipse.team.svn.ui plugin in your workspace (File > import > plugins and fragments) and look at its plugin.xml to find the decorator that does this work (if I am not mistaken, it is org.eclipse.team.svn.ui.decorator.SVNLightweightDecorator).
Good luck on this, team APIs are not the easiest to use ...
我不确定是否理解,但是
svn status
告诉您哪些文件受版本控制,哪些文件不受版本控制。I'm not sure to understand, but
svn status
tells you which files are under version control, and which aren't.