查看“EclipseSubversion”的源代码
来自Ubuntu中文
←
EclipseSubversion
跳到导航
跳到搜索
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
== UbuntuChinaTemplate == ---- 原文出处:https://help.ubuntu.com/community/EclipseSubversion 原文作者:UbuntuWiki 授权许可: 翻译人员:nkzealot MillenniumDark 校对人员:MillenniumDark 贡献者: 适用版本: 文章状态:完成 ---- See : SubVersion See : EclipseIDE 参考:SubVersion 参考:EclipseIDE == Subversion support == Subversion支持 First of all, install the <code><nowiki>subversion</nowiki></code> package (see InstallingSoftware) 首先,安装subversion程序包(参看[[InstallingSoftware]]。 === Subclipse (TOFIX) === Subclipse is an Subversion client, working like the integrated CVS client. See the [http://subclipse.tigris.org official sublipse home page] for up to date informations. * In Eclipse, go into the menus : Help -> Software Updates -> Find and Install... * Search for new features to install * Add a new Remote Site with URL: <code><nowiki> http://subclipse.tigris.org/update </nowiki></code> * Next, next, next * Restart Eclipse Now Subclipse needs a subversion java binding, named javahl, that is not installed with the subversion package. Subclipse是一个可以像整合了的CVS客户端一样工作的Subversion客户端。参考[http://subclipse.tigris.org sublipse的官方主页]可以得到最新的信息。 * 在Eclipse中,选择如下菜单:Help -> Software Updates -> Find and Install... * 寻找并安装新特征 * 添加一个新的远程URL:http://subclipse.tigris.org/update * 一直点三次“继续” * 重新启动Eclipse 现在Subclipse需要一个叫做javahl的subversion的java 榜定, named javahl。它并不在subversion的安装包中。 === libsvn-javahl for Ubuntu === 适用Ubuntu的libsvn-javahl I followed the instructions on this site to compile my own libsvn-javahl (which is available at http://schuerrer.org/uploads/libsvn-javahl_1.1.1-2ubuntu3_i386.deb) and afterwards only had to make a symbolic link from /usr/lib/libsvnjavahl-1.so to /usr/lib/j2sdk1.5-sun/jre/lib/i386/client/libsvnjavahl-1.so. Then I replaced /opt/eclipse/plugins/org.tigris.subversion.subclipse.core_0.9.31/svnjavahl.jar with /usr/share/java/svn-javahl.jar and I'm still getting a JFace error. Maybe Subclipse 0.9.31 doesn't work witch Eclipse 3.1M7? 我按照如下网址的说明来编译我自己的libsvn-javahl (你可以在这里找到 http://schuerrer.org/uploads/libsvn-javahl_1.1.1-2ubuntu3_i386.deb ),随后只需要建立一个从/usr/lib/libsvnjavahl-1.so到/usr/lib/j2sdk1.5-sun/jre/lib/i386/client/libsvnjavahl-1.so的符号链接。接着我把/opt/eclipse/plugins/org.tigris.subversion.subclipse.core_0.9.31/svnjavahl.jar替换成 /usr/share/java/svn-javahl.jar,但是我还是得到了一个JFace错误。会不会是Subclipse 0.9.31不能与 Eclipse 3.1M7一同工作? === Subversion and Javahl === Subversion同Javahl Javahl is the subversion <-> java library. This installation method doesn't work, but here is my output. I hope somebody will be able to complete it and make it work. I tried to follow the first part of this [http://mywiki.brosch.cc/cgi-bin/myWiki/view/Debian/HowToInstallSvnUp Howto install SvnUp], but javac doesn't find the sources. I have Java 1.5 installed. Anyone ? * Go in your build directory, I use ~/builds * download subversion sources : <code><nowiki> apt-get source subversion </nowiki></code> * extract the sources : <code><nowiki> tar xzf subversion_1.0.9.orig.tar.gz </nowiki></code> * go in the folder and extract again : <code><nowiki> tar zxvf subversion_1.0.9.tar.gz </nowiki></code> * go in the folder and run : <code><nowiki> ./autogen.sh </nowiki></code> * run : <code><nowiki> ./configure --prefix=/usr </nowiki></code> * run : <code><nowiki> make </nowiki></code> * go in subfolder : <code><nowiki> subversion/bindings/java/javahl </nowiki></code> * run again : <code><nowiki> ./autogen.sh </nowiki></code> * run (not sure if it's right) : <code><nowiki> ./configure --prefix=/usr --with-jdk=/usr/lib/j2sdk1.5-sun </nowiki></code> * run : <code><nowiki> make </nowiki></code> This is where it doesn't work, here is the output : Javahl是subversion <-> java库文件 这个安装方法不成功,这里有我的结果。我希望有人能够完成它,使之能够正常工作。 我试图按照这个[http://mywiki.brosch.cc/cgi-bin/myWiki/view/Debian/HowToInstallSvnUp Howto install SvnUp]的第一部分来安装,但是javac报告说找不到源文件。我已经安装了Java 1.5。有人知道为什么吗? * 进入你的build文件夹,我使用 ~/builds * 下载subversion源文件:apt-get source subversion * 把源文件解压缩:tar xzf subversion_1.0.9.orig.tar.gz * 进入解压缩后的文件夹并且再次解压缩:tar zxvf subversion_1.0.9.tar.gz * 进入得到的文件夹并且运行:./autogen.sh * 运行: ./configure --prefix=/usr * 运行: make * 进入子目录:subversion/bindings/java/javahl * 再次运行: ./autogen.sh * 运行(不能确定正确与否): ./configure --prefix=/usr --with-jdk=/usr/lib/j2sdk1.5-sun * 运行: make 到这里就不正常了,输出在这里: <pre><nowiki> Making all in src make[1]: Entering directory `/home/zimba/builds/subversion-1.0.9/subversion-1.0.9/subversion/bindings/java/javahl/src' CLASSPATH=../cls:./../cls:$CLASSPATH /usr/lib/j2sdk1.5-sun/bin/javac -d ../cls javac: no source files Usage: javac <options> <source files> where possible options include: -g Generate all debugging info -g:none Generate no debugging info -g:{lines,vars,source} Generate only some debugging info -nowarn Generate no warnings -verbose Output messages about what the compiler is doing -deprecation Output source locations where deprecated APIs are used -classpath <path> Specify where to find user class files -cp <path> Specify where to find user class files -sourcepath <path> Specify where to find input source files -bootclasspath <path> Override location of bootstrap class files -extdirs <dirs> Override location of installed extensions -endorseddirs <dirs> Override location of endorsed standards path -d <directory> Specify where to place generated class files -encoding <encoding> Specify character encoding used by source files -source <release> Provide source compatibility with specified release -target <release> Generate class files for specific VM version -version Version information -help Print a synopsis of standard options -X Print a synopsis of nonstandard options -J<flag> Pass <flag> directly to the runtime system make[1]: *** [class.stamp] Error 2 make[1]: Leaving directory `/home/zimba/builds/subversion-1.0.9/subversion-1.0.9/subversion/bindings/java/javahl/src' make: *** [all-recursive] Error 1 </nowiki></pre> ==== How I did it ==== 我怎么解决它的 Okay, this is NOT Ubuntu Linux (I'm using debian unstable) so forgive me if this doesn't work for you. Here are the steps I used: * Go into your build directory. * <code><nowiki> apt-get build-dep subversion </nowiki></code> get the packages you need to build subversion * <code><nowiki> apt-get source subversion </nowiki></code> get the sources * <code><nowiki> cd subversion-1.0.9/ </nowiki></code> cd into the directory (apt-get should have created this for you) * <code><nowiki> dpkg-buildpackage </nowiki></code> build the package... this takes a LONG TIME, since they have so many tests to verify the build worked correctly * <code><nowiki> cd build-tree/subversion-1.0.9/subversion/bindings/java/javahl </nowiki></code> This is where the javahl bindings are * <code><nowiki> ./autogen.sh </nowiki></code> I used automake-1.8! apt-get that if you want your build to be as close to mine as possible! * <code><nowiki> ./configure --prefix=/usr/local/svnjavahl --with-jdk=/usr/lib/j2sdk1.5-sun </nowiki></code> You can obviously specify your own prefix and jdk. I specified that one because I don't like locally-installed libraries intermingling with the debian-installed libraries. * <code><nowiki> make </nowiki></code> Build it. * <code><nowiki> make install </nowiki></code> Install it. (Note that I installed it to a non-standard location. If you want to use the library from that location, you need to add /usr/local/svnjavahl/lib to your LD_LIBRARY_PATH environment variable.) I can confirm that this version works by running a small test program. I can NOT, however, get it to work in eclipse. When I try, I get this error (once for each project that uses subversion): <pre><nowiki>Unhandled event loop exception Reason: ctNative</nowiki></pre> So, for now I'm just leaving the Subclipse plugin to use the command line. It's slow, but at least it actually does something. 好吧,我用的不是Ubuntu Linux(我用的是Debian的不稳定版),所以如果下面的方法对你没用,请原谅我。下面是我的几个步骤: * 进入你的build文件夹。 * <code><nowiki>apt-get build-dep subversion</nowiki></code> 取得你需要用来编译subversion的包 * <code><nowiki>apt-get source subversion</nowiki></code> 获取源文件 * <code><nowiki>cd subversion-1.0.9/</nowiki></code> 进入这个目录(apt-get应该已经为你建立了这个目录) * <code><nowiki>dpkg-buildpackage</nowiki></code> 编译安装包……这要花很长时间,因为其中有很多的测试用来确保程序能够正常地工作 * <code><nowiki>cd build-tree/subversion-1.0.9/subversion/bindings/java/javahl</nowiki></code> 这是javahl的所在文件夹 * <code><nowiki>./autogen.sh</nowiki></code> 我使用了automake-1.8!如果你想你的编译结果尽可能地与我的相似的话你可以用apt-get来下载它! * <code><nowiki>./configure --prefix=/usr/local/svnjavahl --with-jdk=/usr/lib/j2sdk1.5-sun</nowiki></code> 很显然你可以自己指定你的安装目录和jdk版本。我指定这一个因为我不喜欢本地安装的库文件和debian安装的库搅和在一起。 * <code><nowiki>make</nowiki></code> 编译 * <code><nowiki>make install</nowiki></code> 安装 (注意我把它安装到了一个非常规的地方。如果你想要从这个地方使用库文件,你需要将/usr/local/svnjavahl/lib加入到你的LD_LIBRARY_PATH环境变量。) 通过运行一个小的测试程序,我能够确定这个版本能够很好地运行。但是,我不能,让它和eclipse一起工作。每当我试图这样的时候,我便得到这样的错误(每个使用subversion的project一次): Unhandled event loop exception Reason: ctNative 所以,现在我仅仅将Subclipse插件用在命令行上。这样确实比较慢,但至少能够用。 ----- If I understand well, the problem you've got is because Subclipse is built against some particular version of javahl and subversion (see http://subclipse.tigris.org/) Current version should work better with subversion 1.1+ Thanks a lot for your help, I hope we'll soon have something working well. 如果我理解得没错的话,你的问题出在因为Subclipse是在某个特定的版本的javahl和subversion的基础上编译的(参考 [http://subclipse.tigris.org/])。现在的版本应该在subversion 1.1+下工作得更好。很感谢你的帮助,我希望很快我们就能让它工作起来。 ----- Hmm, I managed to build a subversion 1.1.1 w/ javahl library (using the packages out of debian 'experimental') but I still got the same problem. Sad. Thanks for the tip on that, though, but it seems like I'm having bigger problems. 嗯,我成功地编译了一个subversion 1.1.1 w/ javahl库(用的是实验版的debian中的包),但我还是得到了一样的问题。真令人伤心。很感谢你的建议,但是,好像我有了更大的问题。 From EmilWilmanski Mon Dec 13 11:29:57 +0000 2004 From: Emil Wilmanski Date: Mon, 13 Dec 2004 11:29:57 +0000 Subject: I done it... Message-ID: <20041213112957+0000@www.ubuntulinux.org> Big thanx for your article... I need javahl to eclipse plugin... How I do this: We nead new version of subversion (1.1.1 from experimental source) edit subversion-1.1.1/debian/rules line 39 add "--enable-javahl" (to add configure option to confflags, dont forget "\" at the end of prev. line) compile all using dpkg-buildpackage after it cd subversion-1.1.1/build-tree/subversion-1.1.1 make javahl I do this without problems... in subversion-1.1.1/subversion/bindings/java/javahl/native/.lib we have javahl libs :) 很感谢你的文章……我需要eclipse插件的javahl……我怎么做的:我们需要新版本的subversion(版本1.1.1,在实验源中),编辑subversion-1.1.1/debian/rules第39行,添加"--enable-javahl"(如果想要给cofflags加上选项,不要忘了在前一行末加上"\")。用dpkg-buildpackage编译,然后转换目录cd subversion-1.1.1/build-tree/subversion-1.1.1,编译make javahl。我这样做没有得到任何错误信息……在subversion-1.1.1/subversion/bindings/java/javahl/native/.lib,我们有javahl库 From DagSverreSeljebotn Tue Jan 11 08:36:12 +0000 2005 From: Dag Sverre Seljebotn Date: Tue, 11 Jan 2005 08:36:12 +0000 Subject: Native Java Message-ID: <20050111083612+0000@https://www.ubuntulinux.org> I've had success with the Pure Java Subversion Client - http://tmate.org/svn/ Some small glitches, to import a project through the svn view do: - Right-click, import it. - It will (may?) fail. Go back to svn view, find the rep that was now opened for that project, and reenter login information. - It will now succed, but a manual refresh of the project might be necesarry for any files to appear. Then reopen the project to hide the .svn-folders... 我使用了一个纯粹的Java Subversion客户端,然后成功了 http://tmate.org/svn/ 。 在从svn view中导入project的时候有一些小的毛病:右键,导入,它会(可能会)异常中止。回到svn view,找到对这个project开放的rep,重新键入登陆密码。结果会成功登陆,但是你需要手动刷新才能看见文件。然后再打开project来隐藏.svn系列文件夹…… === working subversion with javahl === 能与 javahl 一同工作的subversion From MaciejFreudenheim Sun Mar 13 02:03:35 +0000 2005 From: Maciej Freudenheim Date: Sun, 13 Mar 2005 02:03:35 +0000 Subject: Everything works (using native javahl)! Message-ID: <20050313020335+0000@https://www.ubuntulinux.org> OK, everything works now perfectly, here is what I did: 好了,现在所有的东西都可以完美地运行了,下面是我怎么做的: * <code><nowiki> apt-get source subversion </nowiki></code> * <code><nowiki> cd subversion-1.1.1 </nowiki></code> * edit debian/rules (f.e.: <code><nowiki> gedit debian/rules </nowiki></code>) 编辑debian/rules (例如: gedit debian/rules ) AND change: 在文件的开头,将如下行<code><nowiki>ENABLE_JAVAHL=no</nowiki></code> to: 改为:<code><nowiki>ENABLE_JAVAHL=yes</nowiki></code> at the beginning of the file. ALSO search string "with-jdk" which is somewhere below, and make sure it points to your JDK.In my situation, it is: 同样,也要在下面搜索字符串"with-jdk",保证它指向你的JDK。对于我来说,它是:<code><nowiki>confflags += --enable-javahl --without-jikes --with-jdk=/usr/lib/sun-j2sdk1.5.0</nowiki></code> * <code><nowiki> sudo dpkg-buildpackage </nowiki></code> If it stops complaining about missing dependencies just install them with sudo apt-get install and relaunch dpkg-buildpackage :)It takes long time to finish. 如果它停下来提示,说没有安装某个依赖包,那就这样安装那些包:sudo apt-get install and relaunch dpkg-buildpackage 。这一步会花很多时间。 * <code><nowiki> cd debian/libsvn-javahl/usr/ </nowiki></code> * <code><nowiki> sudo cp -a * /usr </nowiki></code> I know, it's ugly way, but i haven't time to study how to build proper deb package 我知道这样做不好,但是我没有时间来研究怎么编译deb包比较好。 * <code><nowiki> sudo ldconfig </nowiki></code> * launch eclipse with: 运行<code><nowiki> $PATH_TO_YOUR_ECLIPSE_DIRECTORY/eclipse -vmargs -Djava.library.path=/usr/lib </nowiki></code> It's important to set that java.library.path property to /usr/lib, without it Eclipse wouldn't find libsvnjavahl*.so we just installed into /usr/lib * install subversion plugin in Eclipse normally, like described in the beginning of that Wiki page 用正常的方法在Eclipse中安装subversion插件,就同Wiki网页的开始所描述的一样。 * restart eclipse: everything should work, you should be able to chose javahl in preferences->team->svn :) 重新启动eclipse:所有的东西应该都可以正常工作,你应该可以在preferences->team->svn 。 ----- From JojoPaderes Mon May 9 03:51:33 +0100 2005 From: Jojo Paderes Date: Mon, 09 May 2005 03:51:33 +0100 Subject: Problem compiling Subversion with Javahl Message-ID: <20050509035133+0100@https://www.ubuntulinux.org> Thanks Maciej for the nice article! I'm following the steps for compiling Subversion with Javahl support but got stuck at step #4 which is building the Debian package using dpkg-buildpackage command. I encountered an error while building the package using dpkg-buildpackage command: 感谢Maciej好文章! 我正按照步骤编译带有Javahl的Subversion,但是在第4步卡住了。就是用dpkg-buildpackage命令编译Debian包的那一步。我碰到了一个这样的错误提示: <pre><nowiki> checking whether we are using the GNU C++ compiler... no checking whether g++ accepts -g... no checking how to run the C++ preprocessor... /lib/cpp configure: error: C++ preprocessor "/lib/cpp" fails sanity check See `config.log' for more details. make: *** [debian/stamp-configure] Error 1 </nowiki></pre> To solve the error <code><nowiki>C++ preprocessor "/lib/cpp" fails sanity check</nowiki></code> while compiling Subversion, you need to download GCC, CPP and G++ by installing the following packages <pre><nowiki> gcc cpp g++</nowiki></pre> (see InstallingSoftware). 想要解决编译Subversion时的C++ preprocessor "/lib/cpp" fails sanity check,你需要用apt-get下载安装GCC,CPP和G++ (参见 InstallingSoftware) From KrzysztofLangner Fri May 13 22:15:43 +0100 2005 From: Krzysztof Langner Date: Fri, 13 May 2005 22:15:43 +0100 Subject: javahl and JavaSVN Message-ID: <20050513221543+0100@www.ubuntulinux.org> Instead of using javahl It is possible to install JavaSVN from http://tmate.org/svn/. (JavaSVN is a pure java Subversion (SVN) client library). On my computer I have installed: 除了用javahl,从 http://tmate.org/svn/ 安装JavaSVN也是可以的。 (JavaSVN是一个纯粹的Java Subversion (SVN)客户端库文件)。在我的电脑上,我安装了: ** Unbuntu 5.04 ** JDK 1.5.0_3 ** Eclipse 3.0.2 ** subversion package ** subclipse plugin ** JavaSVN plugin and Subversion works fine for me. Subversion在我的机器上运行得很好。 [[category:CategoryDocumentation]] [[category:CategoryCleanup]]
返回
EclipseSubversion
。
导航菜单
页面操作
页面
讨论
阅读
查看源代码
历史
页面操作
页面
讨论
更多
工具
个人工具
登录
导航
首页
最近更改
随机页面
页面分类
帮助
搜索
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息