File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes subversion and ant scripts access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "subversion and ant scripts access" Watch "subversion and ant scripts access" New topic

subversion and ant scripts access

Gabriel Bjorn

Joined: Dec 13, 2003
Posts: 3
Hi, we are in a project that uses Subversion.
I am writing some ant build scripts for a project I am in and I was wondering if there is any way to restrict any write access to these build files (and only these files, not the rest) so I can be the only one to be able to modify them? svn lock won't do, because this lock can be broken or stolen. Any ideas?

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

Are you attempting to restrict the ability of people to replace the archive copies of these scripts?

The point of version control systems is that previous versions are kept. So if someone mucks with a build script, you find out the user ID of the committer (I sincerely hope you don't let everyone use the same user id), perform random acts of physical violence on him/her until they promise not to do it anymore, then revert to the original copy.

There are actually 2 separate means of enforcing security on SVN. There's the built-in security that's used if you update via the SVN daemon and there's standard Apache security if you're using the WebDAV interface. I don't think you can restrict updates on a per-file basis, since one of SVN's strengths is that updates are atomic, and either all changes are accepted or none are. However, you can probably code up a pre-commit security hook that bounces the whole update if someone unauthorized attempts to include mods to the buildfiles in a commit.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: subversion and ant scripts access
It's not a secret anymore!