Bartosz Kowalczyk
Bartosz Kowalczyk

Reputation: 1519

Is there way to block any change in SVN?

We want check versions than we want to freeze project (block any change at SVN). Is there any way? I don't want create branche. I just want freeze project on a few hours.

The best way is say something as: If you don't have login as (array of allowLoginsUser) then "you havent commit!" and block else "allow commit" and commit

Is there any way?

Upvotes: 1

Views: 169

Answers (3)

Peter Parker
Peter Parker

Reputation: 29715

You have several options:

  1. use the authz path based authorization and disable write access for all users
  2. use a pre-commit hook to disable all write access to a specific repository by placing an

    exit 1;

    into it

  3. use a more sophisticated pre-commit hook, examinig the changed files and denying access if the freezed project occurs

They are ranked by difficulty and effort starting on easiest.

Upvotes: 1

Yannick Blondeau
Yannick Blondeau

Reputation: 9621

You should look at the svn lock command.

You can find more information about it in the SVN book's 'Locking' chapter.

Typically, you will do something like

svn lock -m "Freeze project for a few hours" PATH
# do what you need to do
svn unlock PATH

where PATH is your repository.

Upvotes: 2

EM-Creations
EM-Creations

Reputation: 4301

You could just temporarily edit the ./conf/passwd file (if you're using password user authentication) and comment out all of the users "#" in front of their username. Save the file and restart the SVN server.

Then uncomment their names out afterwards.

Upvotes: 0

Related Questions