Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8566085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:34:33+00:00 2026-06-11T17:34:33+00:00

I am trying to discover the best way to implement a write restriction on

  • 0

I am trying to discover the best way to implement a write restriction on a file in subversion.

There will be, over time, many tags and branches of this file.
One particular user, user build, must have access to this file (in all possible branches or tags) and nothing else.

i.e., 
svn://app/trunk/changelog.txt
svn://app/branches/1.1/changelog.txt
svn://app/tags/1.2/changelog.txt
etc..

As you can see, this is not a finite set of files, but one file which will be, over time, copied to various branches and tags. We can ensure, however, that the filename is unique in the file tree.

To implement this restriction, on user ‘build’, for all files named ‘changelog.txt’,
I have thought to implement a pre-commit script.

Is this the best way ?

thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:34:35+00:00Added an answer on June 11, 2026 at 5:34 pm

    The easiest way to do this is by writing a pre-commit hook and putting it in /hooks within the repository.

    Subversion will always pass the repository directory and the revision number to your hook.

    Pseudobash example:

    REPO="$1"
    NO="$2"
    AUTHOR=`svnlook author $REPO -t "$NO"`
    FILES=`svnlook changed -t "$NO" "$REPO" | cut -b2-`
    
    
    if echo $AUTHOR | grep -q builduser; then
        for FILE in $FILES; do
            if ! echo $FILE | grep -q changelog.txt$; then
                exit 1
            fi
        done
    fi
    

    You get the gist of it, I hope.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to write an LDAP query which will discover if a user is
I am trying to discover the best way to design my database to organize
I am trying to discover the best way to retrieve the a href link
Greetings, I was trying to discover a proper way to send captured errors or
I'm trying to figuriung out a way to manage quotas over a CATI system
I'm trying to create a DHCP Client using Java. The client will send Discover,
In this particular case I'm trying to discover if a mylib.a file is 32
I am trying to find a way to make my Java Appengine application discover
I am trying to write an application that will access, and change, entries in
I'm trying to discover opencv library at the moment, but it seems a bit

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.