Results 1 to 11 of 11

Thread: SVN API without having working copy.

  1. #1

    SVN API without having working copy.

    I need to develop a Java based SVN Client (Eclipse based), where all the SVN operations like Creating Directory, Adding File, Removing File should be done without having Working copy concept included.

    Can anyone let me know how to achieve this with SVN 1.7 support. What API in SVN can be used, that works without having working copy.

    Any Help is greatly appreciated.


    Thanks.

  2. #2
    Senior Member Site ModeratorSite Admin
    Join Date
    Mar 2011
    Location
    Chesterfield, UK
    Posts
    771
    Why can't you have a working copy? The working copy is a pretty fundamental source control concept.
    Mat Booth
    Software Engineer
    WANdisco, Inc.

    I joined the blog-o-web-o-sphere! Linux and Coding Blog

    How To Ask Smart Questions

  3. #3
    Quote Originally Posted by mbooth View Post
    Why can't you have a working copy? The working copy is a pretty fundamental source control concept.
    mkdir, cp, mv, import & rm can all be done without a WC. The only thing you really can't do w/o a WC are edit file contents & properties.
    I am neither an employee nor customer of WANDisco.

  4. #4
    Quote Originally Posted by kavithaannamalai View Post
    I need to develop a Java based SVN Client (Eclipse based), where all the SVN operations like Creating Directory, Adding File, Removing File should be done without having Working copy concept included.

    Can anyone let me know how to achieve this with SVN 1.7 support. What API in SVN can be used, that works without having working copy.
    Subclipse is already 1.7-compatible. What do you need which cannot already be done with it? Why do you feel the need to remove the functionality of a working copy?

    If you explain what you actually need to accomplish, not what you've already decided your end result should be, people can provide better answers.
    I am neither an employee nor customer of WANDisco.

  5. #5
    While trying to checkout a file using checkout() method, I get Exception saying "This is not supported for File, but a directory". So, When I tried lock(), I get "Not Implemented Yet"..

    Can someone let me know what method can be used for checking out and commit a File, using a SVN.

  6. #6
    Senior Member Site ModeratorSite Admin
    Join Date
    Mar 2011
    Location
    Chesterfield, UK
    Posts
    771
    You can only export individual files.
    Mat Booth
    Software Engineer
    WANdisco, Inc.

    I joined the blog-o-web-o-sphere! Linux and Coding Blog

    How To Ask Smart Questions

  7. #7
    You cannot check out a single file with Subversion. The smallest unit that can be checked out is a directory. The API has all the same rules as the regular client.
    I am neither an employee nor customer of WANDisco.

  8. #8
    In that case what can be done to lock a file from Editing?

  9. #9
    Quote Originally Posted by kavithaannamalai View Post
    In that case what can be done to lock a file from Editing?
    "Checkout" and "lock" are 2 distinct operations in Subversion. It sounds like you're coming from a VSS background where they are synonymous. You really ought to read the manual to understand the distinction.

    If you need to lock a file, you must have it in a working copy, and perform the lock in that working copy. The lock is then associated with that working copy - so if you delete that WC, you will have extra work to release the lock.

    Even if a file is locked by one user, another user can edit their local copy and you cannot stop them.

    By default, you cannot depend upon locks to prevent people from committing a file. They are purely advisory. Any other user can "steal" the lock. This is by design - in VSS and other systems, users can lock a file and then prevent others from doing anything with it, unless an administrator steps in. You can enforce the same sort of restriction via a pre-commit hook in Subversion, but it's generally not advised.
    I am neither an employee nor customer of WANDisco.

  10. #10
    Yes. I'm from a VSS background and new to SVN. Can you please let me know how to make a file mutual exclusive.

  11. #11
    Quote Originally Posted by kavithaannamalai View Post
    Yes. I'm from a VSS background and new to SVN. Can you please let me know how to make a file mutual exclusive.
    In the overwhelming majority of cases, you do not need to make a file exclusive. This is an old, broken, obsolete model of working which you need to unlearn. VSS isn't capable of merging changes made by 2 people; SVN and every other modern VCS is. Read this (VSS uses lock-modify-unlock).

    For the very, very, very few instances where this might still be wanted (although probably not needed, I described how in my previous post. More on Subversion locks.

    And you still can't stop someone from editing their local copy, period.
    I am neither an employee nor customer of WANDisco.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •