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 debate without meaningful terms is meaningless , I figured I would point at
Since the vertex data will be transformed through a projection matrix to get the
Since POSIX regular expressions (ereg) are deprecated since PHP 5.3.0, I'd like to know
since Haskell has such expressive type system, is there something supported directly that we
Since I started studying object-oriented programming, I frequently read articles/blogs saying functions are better,
Since CS3 doesn't have a web service component, as previous versions had, is there
Since both a Table Scan and a Clustered Index Scan essentially scan all records
Since Graduating from a very small school in 2006 with a badly shaped &
Since the WMI class Win32_OperatingSystem only includes OSArchitecture in Windows Vista, I quickly wrote

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.