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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:04:50+00:00 2026-05-23T00:04:50+00:00

Since it’s the best practice to commit early, commit often I would like to

  • 0

Since it’s the best practice to commit early, commit often I would like to be promoted with a dialog that will ask for a commit message and will commit to my local mercurial repository that I am working on.
What’s the easiest way to implement such a feature?
I would like to avoid writing am add-in if possible.
One idea I had is to run a post build command that will execute a batch file.
In turn the batch file will check if the build was successful and then it will execute:

hg addremove 

If nothing was either added or removed, no commit message will be requested. If any files were added or removed it will ask me for a commit message, once the commit message has been inputted it will execute:

hg commit -m "Insert message here"

Is it possible? If so, how?

  • 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-05-23T00:04:51+00:00Added an answer on May 23, 2026 at 12:04 am

    First of all, I doubt you really want to do that.

    Most patterns related to version control dictates that you want to know what the change was about. I build many times during the implementation of a single bug-fix, but your question leads me to think that you would think it was OK to get N commits, most of them bad, into your version control system, with no real purpose.

    Now, I agree that it is best practice to commit early, and commit often, but it is not a best practice to commit blindly and commit just because it builds. You should commit when you got something you want to preserve.

    Having said that, have you tried executing the hg commit command without any arguments whatsoever? The default behavior is to pop up a text file for editing, typically through your default text editor, and wait for you to save it with new content.

    In other words, this should do what you want:

    hg commit --addremove
    

    However, and I strongly urge you to rethink this, you might question this decision at some point when you see a version history full of commits that are just endlessly editing files back and forth during some experimental development or bugfixing.

    There’s some good add-ins for Visual Studio out there as well, you might want to consider these instead:

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

Sidebar

Related Questions

Since Rails is not multithreaded (yet), it seems like a threaded web framework would
Since I am not getting anywhere with my previous question , I would like
Since many modern browsers support CSS3, I would like to use many CSS 3
Since debate without meaningful terms is meaningless , I figured I would point at
Since I'm using Java 1.4.2, this means that I cannot use Java's implementation of
Since a few years, common sense seems to dictate that it's better to program
Since Java 5, we've had boxing/unboxing of primitive types so that int is wrapped
Since ColdFusion is itself Java-based, I would imagine it's not too much of a
Since I run my stuff in a VM I like to save my data
Since people are often using array.length < 1 to check if an array is

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.