特殊:Badtitle/NS100:EclipseSubversion
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/EclipseSubversion }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/af | • {{#if: UbuntuHelp:EclipseSubversion|Afrikaans| [[::EclipseSubversion/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/ar | • {{#if: UbuntuHelp:EclipseSubversion|العربية| [[::EclipseSubversion/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/az | • {{#if: UbuntuHelp:EclipseSubversion|azərbaycanca| [[::EclipseSubversion/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/bcc | • {{#if: UbuntuHelp:EclipseSubversion|جهلسری بلوچی| [[::EclipseSubversion/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/bg | • {{#if: UbuntuHelp:EclipseSubversion|български| [[::EclipseSubversion/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/br | • {{#if: UbuntuHelp:EclipseSubversion|brezhoneg| [[::EclipseSubversion/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/ca | • {{#if: UbuntuHelp:EclipseSubversion|català| [[::EclipseSubversion/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/cs | • {{#if: UbuntuHelp:EclipseSubversion|čeština| [[::EclipseSubversion/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/de | • {{#if: UbuntuHelp:EclipseSubversion|Deutsch| [[::EclipseSubversion/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/el | • {{#if: UbuntuHelp:EclipseSubversion|Ελληνικά| [[::EclipseSubversion/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/es | • {{#if: UbuntuHelp:EclipseSubversion|español| [[::EclipseSubversion/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/fa | • {{#if: UbuntuHelp:EclipseSubversion|فارسی| [[::EclipseSubversion/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/fi | • {{#if: UbuntuHelp:EclipseSubversion|suomi| [[::EclipseSubversion/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/fr | • {{#if: UbuntuHelp:EclipseSubversion|français| [[::EclipseSubversion/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/gu | • {{#if: UbuntuHelp:EclipseSubversion|ગુજરાતી| [[::EclipseSubversion/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/he | • {{#if: UbuntuHelp:EclipseSubversion|עברית| [[::EclipseSubversion/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/hu | • {{#if: UbuntuHelp:EclipseSubversion|magyar| [[::EclipseSubversion/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/id | • {{#if: UbuntuHelp:EclipseSubversion|Bahasa Indonesia| [[::EclipseSubversion/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/it | • {{#if: UbuntuHelp:EclipseSubversion|italiano| [[::EclipseSubversion/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/ja | • {{#if: UbuntuHelp:EclipseSubversion|日本語| [[::EclipseSubversion/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/ko | • {{#if: UbuntuHelp:EclipseSubversion|한국어| [[::EclipseSubversion/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/ksh | • {{#if: UbuntuHelp:EclipseSubversion|Ripoarisch| [[::EclipseSubversion/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/mr | • {{#if: UbuntuHelp:EclipseSubversion|मराठी| [[::EclipseSubversion/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/ms | • {{#if: UbuntuHelp:EclipseSubversion|Bahasa Melayu| [[::EclipseSubversion/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/nl | • {{#if: UbuntuHelp:EclipseSubversion|Nederlands| [[::EclipseSubversion/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/no | • {{#if: UbuntuHelp:EclipseSubversion|norsk| [[::EclipseSubversion/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/oc | • {{#if: UbuntuHelp:EclipseSubversion|occitan| [[::EclipseSubversion/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/pl | • {{#if: UbuntuHelp:EclipseSubversion|polski| [[::EclipseSubversion/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/pt | • {{#if: UbuntuHelp:EclipseSubversion|português| [[::EclipseSubversion/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/ro | • {{#if: UbuntuHelp:EclipseSubversion|română| [[::EclipseSubversion/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/ru | • {{#if: UbuntuHelp:EclipseSubversion|русский| [[::EclipseSubversion/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/si | • {{#if: UbuntuHelp:EclipseSubversion|සිංහල| [[::EclipseSubversion/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/sq | • {{#if: UbuntuHelp:EclipseSubversion|shqip| [[::EclipseSubversion/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/sr | • {{#if: UbuntuHelp:EclipseSubversion|српски / srpski| [[::EclipseSubversion/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/sv | • {{#if: UbuntuHelp:EclipseSubversion|svenska| [[::EclipseSubversion/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/th | • {{#if: UbuntuHelp:EclipseSubversion|ไทย| [[::EclipseSubversion/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/tr | • {{#if: UbuntuHelp:EclipseSubversion|Türkçe| [[::EclipseSubversion/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/vi | • {{#if: UbuntuHelp:EclipseSubversion|Tiếng Việt| [[::EclipseSubversion/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/yue | • {{#if: UbuntuHelp:EclipseSubversion|粵語| [[::EclipseSubversion/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/zh | • {{#if: UbuntuHelp:EclipseSubversion|中文| [[::EclipseSubversion/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/zh-hans | • {{#if: UbuntuHelp:EclipseSubversion|中文(简体)| [[::EclipseSubversion/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseSubversion | UbuntuHelp:EclipseSubversion | {{#if: | :}}EclipseSubversion}}/zh-hant | • {{#if: UbuntuHelp:EclipseSubversion|中文(繁體)| [[::EclipseSubversion/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:EclipseSubversion|:EclipseSubversion|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :EclipseSubversion/zh | | {{#ifexist: EclipseSubversion/zh | | {{#ifeq: {{#titleparts:EclipseSubversion|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:EclipseSubversion|1|-1|}} | zh | | }}
See : SubVersion
See : EclipseIDE
The Chinese translation of thie article.
Subversion support
First of all, install the subversion
package (see InstallingSoftware)
Subclipse (TOFIX)
Subclipse is an Subversion client, working like the integrated CVS client. See the official subclipse 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:
http://subclipse.tigris.org/update
- Next, next, next
- Restart Eclipse
Now Subclipse needs a subversion java binding, named javahl, that is not installed with the subversion package.
libsvn-javahl for Ubuntu
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?
Subversion and 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 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 :
apt-get source subversion
- extract the sources :
tar xzf subversion_1.0.9.orig.tar.gz
- go in the folder and extract again :
tar zxvf subversion_1.0.9.tar.gz
- go in the folder and run :
./autogen.sh
- run :
./configure --prefix=/usr
- run :
make
- go in subfolder :
subversion/bindings/java/javahl
- run again :
./autogen.sh
- run (not sure if it's right) :
./configure --prefix=/usr --with-jdk=/usr/lib/j2sdk1.5-sun
- run :
make
This is where it doesn't work, here is the output :
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
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.
apt-get build-dep subversion
get the packages you need to build subversionapt-get source subversion
get the sourcescd subversion-1.0.9/
cd into the directory (apt-get should have created this for you)dpkg-buildpackage
build the package... this takes a LONG TIME, since they have so many tests to verify the build worked correctlycd build-tree/subversion-1.0.9/subversion/bindings/java/javahl
This is where the javahl bindings are./autogen.sh
I used automake-1.8! apt-get that if you want your build to be as close to mine as possible!./configure --prefix=/usr/local/svnjavahl --with-jdk=/usr/lib/j2sdk1.5-sun
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.make
Build it.make install
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):
Unhandled event loop exception Reason: ctNative
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.
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.
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.
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: <[email protected]>
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 :)
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...
working subversion with javahl
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:
1. apt-get source subversion
2. cd subversion-1.1.1
3. edit debian/rules (f.e.: gedit debian/rules
)
AND change:
ENABLE_JAVAHL=no
to:
ENABLE_JAVAHL=yes
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:
confflags += --enable-javahl --without-jikes --with-jdk=/usr/lib/sun-j2sdk1.5.0
4. sudo dpkg-buildpackage
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.
5. cd debian/libsvn-javahl/usr/
6. sudo cp -a * /usr
I know, it's ugly way, but i haven't time to study how to build proper deb package
7. sudo ldconfig
8. launch eclipse with: $PATH_TO_YOUR_ECLIPSE_DIRECTORY/eclipse -vmargs -Djava.library.path=/usr/lib
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
9. install subversion plugin in Eclipse normally, like described in the beginning of that Wiki page
10. restart eclipse: everything should work, you should be able to chose javahl in 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:
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
To solve the error C++ preprocessor "/lib/cpp" fails sanity check
while compiling Subversion, you need to download GCC, CPP and G++ by installing the following packages
gcc cpp g++
(see 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: <[email protected]>
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:
- Unbuntu 5.04
- JDK 1.5.0_3
- Eclipse 3.0.2
- subversion package
- subclipse plugin
- JavaSVN plugin
and Subversion works fine for me.