No announcement yet.

how to disable the delete option in subversion in Myeclipse?

  • Filter
  • Time
  • Show
Clear All
new posts

  • how to disable the delete option in subversion in Myeclipse?

    I am using svn system to have a version control of my project. I am using Myeclipse IDE . When i am selecting a file from the svn repository there is Delete option . So the user can delete the file from the repository. I want to disable the delete option so that i can provide a facility to my project no other person can't delete my project from the repository but he can read/write my project from the repository.

    Is there any commands to disable the delete function.

  • #2
    deletion of objects

    Hi Sowjanya,
    there are 2 solutions to this problem, but you need direct write-access to the repository:
    1. Use user-management. You could set up your repository in a way that write access is restricted to persons with an account.
    For svnserve:
    or for apache server:

    2. You could use Hook-skripts to prevent deletion of files.


    • #3
      If you still need to let people write to the file(s), your only option is a hook script which rejects any commit containing a delete on files you don't want deleted.


      • #4
        hello andy

        can u send me any example project or file which is using the hook script which explains how to use hook scripts to provide protection to a file or project


        • #5
          There are sample hook scripts in every repository. Look in the hooks directory.

          Google for


          • #6
            thank you adny

            thank you andy


            • #7
              Can you please suggest the code for prevent delete for all files


              • #8
                First, please understand that you can't really delete anything from a Subversion repository short of a repository dump followed by a filter followed by a load - a completely "offline" operation. The best you can do is to remove files/directories/symlinks from the *next revision*. The removed stuff will still be easily seen in the prior revisions.

                As for suggesting code to prevent the removal - the "" hook script pointed to above can enable access control with fineness to prevent the removal operation (as distinct from add, etc.).


                • #9
                  In my system Python is not installed.Can you please suggest the some other programming language


                  • #10
                    In general, any programming language can be used: C, C++, Perl, Bash, etc. There's an art to choosing which language because the wrong choice will make your life very difficult. For something this complex, I'd sady that Bash is insufficient. Python/Perl are excellent choices.

                    That said, the "" will need to be re-written in whatever language you choose - or something very similar in design. So, the big question is "Why not just get Python installed on your SVN server machine?" It's usually a lot easier than re-writing and re-debugging a chunk of code that's already working...


                    • #11
                      i installed python in my system and please give a code example to restrict the delete option in svn for particular users.


                      • #12
                        Since you've installed Python, please hunt down and install the "" scripting mentioned earlier in this thread. Possibly the best source is here: