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 38187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:40:08+00:00 2026-05-10T14:40:08+00:00

I want to ran the following script on text files that are being committed:

  • 0

I want to ran the following script on text files that are being committed:

# Send the commands H and w to ed # ed will append newline if the file does not end in one printf '%s\n' H w | ed -s $1  # Strip trailing whitespace sed -i 's/[ \t]*$//g' $1  # Convert tabs to 4 spaces sed -i -r 's/\t/    /g' $1 

I see subversion has a start-commit and pre-commit hooks but I can’t follow the documentation about how I could process the text files with the above script.

  • 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. 2026-05-10T14:40:08+00:00Added an answer on May 10, 2026 at 2:40 pm

    You mean change the text file before it’s committed? You can (I’m not sure how), but it’s generally not a good idea, as it doesn’t tell the client about the change, so the local copies become void on a commit.

    What I would do is block the commit (non zero exit), and give an error message as to why you don’t want that revision to go through.

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

Sidebar

Related Questions

I want to loop over the contents of a text file and do a
I want to use a temp directory that will be unique to this build.
I have a script, called test.py , that does the following: while (1): ....print
I ran the following simple query that looks like the example below: (Briefly; one
I want to make an etag that matches what Apache produces. How does apache
I ran a Pig job on a Hadoop cluster that crunched a bunch of
I got the following code to capture information for files on a specified drive,
I have a Model with data that I want to use to populate a
Every time that I want to do a Layout, I'm getting a black layout
I ran an ASP.NET page that i have under development on my local IIS.

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.