Subclipse with SVNKit Adapter

1,973

Solution 1

Feature-wise, both kits provide the same amount of functionality. SVNkit was specifically developed with Subclipse in mind, so no surprises there.

Speed-wide, they are also similar. This is no big surprise because Subversion is usually I/O bound (Waiting for the SVN server to deliever the data will always take longer than what the SVN client library does on your computer).

Subversion 1.5 has some drastic speed improvements but that doesn't apply in your case.

The main difference is that you don't need the correct version of javahl installed in your computer. For Linux, this is often a problem because it means you need to set up the env variable LIBRARY_PATH for Eclipse so the shared library can be loaded correctly plus you might need to compile the library yourself if you can't find a package which fits your needs. In your case, Ubuntu should come with a precompiled library but that library is for Subversion 1.5. It should fall back gracefully when you connect to a 1.4 server, though.

The Subclipse guys support SVNkit but I've had issues with it in the past (that was several years ago; I'm positive this has improved considerably since). They were fixed pretty fast, too.

All considered, I think you're better off with the SVNkit since it's way easier to setup.

[EDIT] As to "What should I download", I think you need everything below "SVNKit Adapter (optional)", that is all three components (see the SVNKit FAQ).

Solution 2

I'd always recommend using JavaHL if possible. JavaHL uses the same native Subversion libraries as the command line client and so you get maximum compatibility. Of course, as you point out, using SVNKit is certainly easier. We do have an FAQ to help with getting JavaHL working though:

http://subclipse.tigris.org/wiki/JavaHL

As for the JNA library, I believe that SVNKit uses it for things that cannot easily be done from Java. For example, on Linux working with symlinks and setting permissions on files.

Share:
1,973
Jarf
Author by

Jarf

Updated on July 11, 2022

Comments

  • Jarf
    Jarf almost 2 years

    I have a listview that is populated with a list of terms from ItemsSource. The .Name property is the text shown on the listview. I am trying to save the .Id int property to a variable so that I can access it from another form. Essentially I want it so that when a user clicks on an item on the list it will open a form and populate it with the instance of the list associated with the item tapped.

    If the listview is populated with Book1, Book2, Book3, and Book4 with Ids of 1, 2, 3, and 4 then if the user taps Book2 I want the SelectedBook variable to be set to the .Id property of 2. Then when another form will be opened and this form will pull the appropriate book instance from the sqlite database and populate the fields with that book's information.

    I have been trying to do so with the ItemSelected property of the ListView but have been getting this error "System.NullReferenceException: Object reference not set to an instance of an object.".

    Here is the code that I used:

            public void OnSelectedItem(object sender, EventArgs args)
        {
            Book myBook = sender as Term;
            App.BookRep.SelectedBook = myBook.Id;
    }
    

    I originally had the listview populated with buttons (that is my preference) but the SelectedItem property of ListView didn't seem to be utilized when I did this. I tried using the Clicked property of Button but couldn't find a way to obtain the Id for the selected book in this way. Am I doing something incorrectly or is there a better way to go about doing this?

    • Sparsha Bhattarai
      Sparsha Bhattarai about 5 years
      You can get the selected item from the EventArgs property which you can then cast to your model Book and get the ID property from there.
    • Sparsha Bhattarai
      Sparsha Bhattarai about 5 years
      To clarify, you can get the SelectedItem from the args argument. Casting it to the Book model should give you the binding for the selected viewcell.
    • Jarf
      Jarf about 5 years
      @SparshaBhattarai thank you for the reply! I have been trying different combinations of implementing this but have not been able to get it tow ork. How would you go about casting the args to the book model?
    • Sparsha Bhattarai
      Sparsha Bhattarai about 5 years
      Just do the cast you've done with sender but instead with the selecteditem. var curItem = args.SelectedItem as Book; and then use the curItem.ID property for the rest.