来自 Eclipse 的 svn 命令行

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/686611/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 13:36:33  来源:igfitidea点击:

svn command line from eclipse

eclipsesvn

提问by sanders

Hello is there a way to use svn command line from eclipse?

您好,有没有办法从 Eclipse 使用 svn 命令行?

Within eclipse in my project browser i can righclick and then click team and than i have something like svn. Not sure which plugin it is. But it doesn't have button's to for example ignore files for uploading. That's why I want to to it command line. And my question is how to do it.

在我的项目浏览器中的 Eclipse 中,我可以右键单击然后单击团队,然后我有类似 svn 的东西。不知道是哪个插件。但它没有按钮,例如忽略上传文件。这就是为什么我想要它的命令行。我的问题是如何做到这一点。

Ok so how can I use it from command line in windows xp?

好的,我如何在 Windows xp 的命令行中使用它?

采纳答案by kgiannakakis

The plugin you are probably using is Subclipse. It should have an "Add to svn:ignore" option. If not, try updating to the latest versions of Eclipse and Subclipse. In general subclipse should be enough and there is no need for the command line.

您可能正在使用的插件是Subclipse。它应该有一个“添加到 svn:ignore”选项。如果没有,请尝试更新到最新版本的 Eclipse 和 Subclipse。一般来说 subclipse 应该足够了,不需要命令行。

For Windows XP I recommend Tortoise SVN. It integrates with the Windows Explorer and offers you a graphical environment for all your needs. I would say that is much more stable than subclipse and very easy to use.

对于 Windows XP,我推荐Tortoise SVN。它与 Windows 资源管理器集成,并为您提供满足您所有需求的图形环境。我会说它比 subclipse 稳定得多并且非常易于使用。

If you do want to use the command line tools, download and install svn-win32 from here. The command line tools could be helpful in merge and copy operations.

如果您确实想使用命令行工具,请从此处下载并安装 svn-win32 。命令行工具可能有助于合并和复制操作。

I should also point out that none of these methods interfere with each other. You can work with Tortoise SVN or the command line and subclipse won't be affected. All svn clients work by writing and reading from hidden directories called .svn. There is one such directory in every folder under source control. As long as the svn client software is of the same version, an svn client can write to these hidden folders and another one will be able to read from it. A problem could arise if one of the clients is updated to a version that uses a different protocol for writing to the .svn folders. In that case, older clients won't be able to read the information stored there. Upgrading them to the latest version will solve the problem.

我还应该指出,这些方法都不会相互干扰。您可以使用 Tortoise SVN 或命令行和 subclipse 不会受到影响。所有 svn 客户端都通过从名为 .svn 的隐藏目录写入和读取来工作。在源代码管理下的每个文件夹中都有一个这样的目录。只要 svn 客户端软件版本相同,一个 svn 客户端就可以写入这些隐藏文件夹,另一个可以读取。如果其中一个客户端更新到使用不同协议写入 .svn 文件夹的版本,则可能会出现问题。在这种情况下,旧客户端将无法读取存储在那里的信息。将它们升级到最新版本将解决问题。

回答by Kyle Wiering

I'm not personally a fan of Subclipse - it slows the IDE a bit too much for my taste. Here is an alternative approach using External Tools and TortoiseSVN

我个人不是 Subclipse 的粉丝——它使 IDE 的速度减慢了我的口味。这是使用外部工具和 TortoiseSVN 的替代方法

  1. Create a new External Tool
  2. Call it SVN Commit
  3. Set the Location to \bin\TortoiseProc.exe (mine is C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe)
  4. Set the arguments to /command:commit /path:"${selected_resource_loc}"
  5. Open the file / directory you want committed and run the external tool.
  1. 创建一个新的外部工具
  2. 称之为SVN 提交
  3. 将位置设置为 \bin\TortoiseProc.exe(我的是 C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe)
  4. 将参数设置为/command:commit /path:"${selected_resource_loc}"
  5. 打开要提交的文件/目录并运行外部工具。

Interchange the commitin step four for additional commands. You can also add the specific tools to favorites and have them in a dropdown on the toolbar. Additional Arguments Here

交换第四步中的提交以获得其他命令。您还可以将特定工具添加到收藏夹并将它们放在工具栏上的下拉列表中。 这里的附加参数

回答by Seb

Not sure what you're trying to do; sometimes it's better to describe the goal rather than the means you plan to do it.

不确定你想做什么;有时最好描述目标而不是您计划实现的方法。

Have you tried Subeclipse? It lets you use SVN inside Eclipse; it's great.

你有没有试过Subeclipse?它允许您在 Eclipse 中使用 SVN;这很棒。

回答by SCdF

I'm not sure if you can use it fromEclipse, but nothing stops you from just usingit. From cmd / xterm / whatever. It's not going to interfere with Eclipse in anyway, nor will it interfere with Subclipse (which I'm assuming is what you're using).

我不确定您是否可以Eclipse 中使用它,但没有什么能阻止您使用它。从 cmd / xterm / 随便。它无论如何都不会干扰 Eclipse,也不会干扰 Subclipse(我假设您正在使用它)。

回答by snemarch

I'm using subclipse, and in generaly it works pretty well.

我正在使用 subclipse,总的来说它工作得很好。

However, and I guess this is your problem, the Team Synchronization by default wants to add allfiles in my projects, not just the ones I add to version control. This is lame and frustrating, and apparently there's no way to turn it off. Screenshots for olderversions, however, hints at the possibility of turning the "feature" off. Frustrating!

但是,我想这是您的问题,默认情况下,团队同步要添加我的项目中的所有文件,而不仅仅是我添加到版本控制的文件。这是跛脚和令人沮丧的,显然没有办法关闭它。然而,版本的屏幕截图暗示了关闭“功能”的可能性。令人沮丧!

回答by Vineet Reynolds

Not intended to be too presumptuous here, but I think you should look at whether Subversive or Subclipse actually solves problem in a different way than you intended. For instance, it is very much possible to ignore files and directories from being checked in, via Subclipse.

在这里不想太冒昧,但我认为您应该看看 Subversive 或 Subclipse 是否真正以与您预期不同的方式解决问题。例如,非常有可能通过 Subclipse 忽略文件和目录的签入。

On the other hand, if you really want to hack away via the command prompt from Eclipse, you must install the Target Management project(supported for Eclipse Europa and Ganymede). Once you have that installed, you can launch a remote shell to your local machine and then type away on the command line:).

另一方面,如果您真的想通过 Eclipse 的命令提示符进行破解,则必须安装Target Management 项目(支持 Eclipse Europa 和 Ganymede)。安装完成后,您可以在本地计算机上启动远程 shell,然后在命令行上键入:)。

PS: I haven't used this approach ever; Subversive satisfied all my requirements of a SVN plugin in Eclipse.

PS:我从来没有使用过这种方法;Subversive 满足了我对 Eclipse 中 SVN 插件的所有要求。