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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T09:11:17+00:00 2026-05-16T09:11:17+00:00

I recently started using Mercurial and like the way I have VCS protection for

  • 0

I recently started using Mercurial and like the way I have VCS protection for my individual development without checking it in to the central repository, then I push to the central repo when I have something ready for the rest of the team.

When I “hg commit” I write a commit message relevant to the addition since the last time I committed. I may have 5 or so local commits before I’m ready to push stuff to central. When I do push, if I don’t specify a revision, all of my local commits and their messages get added to the central repository, but I don’t want to clutter the central log with all my local smalls steps. When I push and specify the local revision, I think only that revision and its commit message get pushed, right?

The problem is, I want to push with a commit message that summarizes all of my local “offline” work, because that’s what I’m really adding. However, the commit message that gets pushed is whatever I most recently wrote. Say I’m working on feature A and I have five local commits for it; “Added A.1” “Added A.2” “Cleaned up code in foo.cpp” and so on, ending with “Added A.4.” What I want to log to the central repository is “Added A, cleaned up foo.cpp” but if I push that last revision it just sees “Added A.4.” Now, when there have been updates to central I need to merge in locally before I push, my local commit message is “Merged in tip”. Clearly that’s not a good commit message to push back.

What’s a good practice here? I’m not aware of any mechanism to change an existing commit message, or to push with a new commit message. I don’t want to make a trivial change to my local repo simply to enter a new commit message before changing; that’s just silly. I must be missing something because this seems basic. Or am I not thinking about mercurial the right way?

  • 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-16T09:11:17+00:00Added an answer on May 16, 2026 at 9:11 am

    Pushing five changesets is perfectly acceptable and it will make it easier for others to review the code. Just try to make logically consistent changesets; I usually try to ensure that the code compiles and passes tests after each commit.

    There are some extensions (collapse, rebase, histedit, mq) that allow you to alter changesets after the fact. The collapse extension is what you want here: it allows you to collapse (combine) your five local changesets into a single changeset that you can then push to the server.

    It is important to realize that they do so by creating new changesets and throwing the old ones away. This has the consequence that you should only use them on private changesets, i.e., changesets that has not yet been shared with anybody else.

    If you by accident manage to alter a changeset that has already been pushed to your central repository then it’s no catastrophy — what happens is that you will end up with both the original changeset plus the altered changeset. This is because hg push is append-only and so you cannot alter a changeset that has been pushed to a central repository.

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

Sidebar

Related Questions

I have recently started using boost::exception. Now I would like to use boost::errinfo_nested_exception to
I recently started using Masterpages, the thing is I would like to add text
I recently started using NERDTree with vim, and have set it to automatically open
I recently started using Emacs for editing. When I edit english-language files (like program
I've recently started using Gradle and replacing my existing Maven-based projects. I have had
I have recently started using PlayN for a hobby project and has now stumbled
I have recently started using R and am still getting used to its data
I have recently started using the -Wall compiler switch in an attempt to improve
I recently started using Eclipse for PHP Development. Please suggest me some HTML WYSIWYG
I recently started using android actionbars and contextual action bars (CAB). I have just

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.