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

  • Home
  • SEARCH
  • 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 8386061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:49:39+00:00 2026-06-09T17:49:39+00:00

Is there a way to make it so that if I call $ svn

  • 0

Is there a way to make it so that if I call $ svn ci -m "some message" it yells at me for not specifying the files I want to check in?

I would be fine with it either just asking me to confirm that I want to check in the whole directory, or just canceling the operation.

Normally I try to be verbose and tell SVN the files I want to check in, but occasionally I forgot and end up checking in more than I wanted to.

  • 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-09T17:49:41+00:00Added an answer on June 9, 2026 at 5:49 pm

    Before I get to your answer, I want to make sure you understand how Subversion works.

    Subversion looks at changes as a changelist and not as individual file changes. That’s why the entire repository revision is incremented whenever there’s a commit and not just individual files.

    Many people who are use to version control systems that don’t handle changelists do things like this:

    $ svn commit file1
    $ svn commit file2
    $ svn commit file3
    

    This is bad because it breaks the concept of the change list. If file1, file2, and file3 are all related to a single change, they should be committed together.

    The standard way of using Subversion it to work on a single change list at a time. You work fixing a bug or adding a feature, commit your changes, then work on the next bug or feature. If you are working on two separate bugs or features at the same time, you should really have two separate checkouts.

    Doing it that way would allow you to use svn commit to commit your change list as a single unit.


    That said, there is a way to change that behavior of a Subversion commit if you don’t list any files and that is by defining your own svn function and an alias to the svn command.

    For example, in Kornshell, there is no easy way of changing the prompt when you do a cd to reflect the directory you’re in. To get around this, you create a _cd function that changes the directory and the prompt. Then, you alias the cd command to your _cd function.

    In your case, you’ll define a _svn function that looks at the first parameter and sees whether it is commit. If it’s not, you can safely execute the actual svn command. If the first parameter is commit, you can then look to see if there is a second parameter. If there isnt’, you can assume you forgot to list files, and exit out. The function would look something like this:

    function _svn {
      if [[ $1 == "commit" ]] && [[ -z $2 ]]
      then
          echo "You need to specify the exact files to commit"
          exit 2
      else
         \svn $*
      fi
    

    Then, you create an alias:

    alias svn="_svn"
    

    Now, executing svn won’t run the svn command (at least directly). Instead, your alias will run the _svn function.

    By the way, I’m not assuming any parameter handling in my function. (What if you add -m "this is a test") or–username bob –password swordfish` to the command?). You’ll have to extend the function to handle parameters to the commit command. However, this gives you the general idea how you can change a command’s functionality to do things like this.

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

Sidebar

Related Questions

Is there any way to make two controls that are in different containers the
In C#, is there a way to make a program that simply eats roughly
Is there a way to make a triangular float so that a page looks
Is there any way to make find-name-dired to only show filenames that I can
JSFiddle Is there any way to make something like the X on that link
Is there a way to make the UIPickerView read-only? This means that the user
I realized that ShowHeaderWhenEmpty only works in PostBacks. Is there any way to make
Is there any way (utilizing Reflection I hope) that I can make an instantiated
Since there is no way that you can make the flash object transparent, there
I want to make a class that has the ability to dynamically call methods

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.