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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:19:20+00:00 2026-06-04T14:19:20+00:00

Using Mercurial. Working in private clones, making changes, pushing to master. Etc. That’s fine.

  • 0

Using Mercurial. Working in private clones, making changes, pushing to master. Etc. That’s fine.

(By the way, let me state that I am familiar with many version control systems ranging from the classics SCCS, RCS, CVS, SVN to DVCSs like BitKeeper, Git, Mercurial, passingly familiar with Monotone, Darcs, Bzr. Not so familiar with Perforce, … I just mention this for people who may be able to explain equivalents and similarities between systems.)

Unfortunately, other members of the project think that I check in too often. I use the “check in early and often” approach, sometimes checking in more often than once every half hour. They don’t want to see so many checkin messages in the log.

NOT QUESTION: Now, I have taken to the habit of making most of my changes on branches (although hg lacks retroactive branching), summarizing all of the changes when I merge my task branches back to the trunk. hg log -b default allows them to filter out my task branches, and works okay when the merge messages are meaningful. This is not my question.

NOT QUESTION: similarly, I know how to use history editing, etc., to remove my fine granularity changesets, so that the only changesets that get pushed are coarse grain. (Although, by the way, I often find the simplest thing to do is move .hg directories around.) History editing ias annoying, but I can do it.

MY QUESTION: my question is: I would like to keep track of my fine granularity changesets and log messages, even though I don’t push them to the project master repository.
Q: how do I do this?

I.e. how do I keep two repositories tracking each other, but NOT push all of my changes to the master? Preferably tag changesrts not to be pushed. (By the way, I prefer to say “tag a revision set”. Changeset sounds too much like patch.)

The way I do it now is to have
a) the project master repo
b) my personal master repo, with all of the fine grain changes
c) one or more workspaces

Where

a) clone the project master repo to get the workspace (using hg clone, yyeah, I know)

b) work in the workspace clone with fine grain checkins (I know this)

c) push from the workspace clone to my personal master

d) and, when it comes time to push to the master, edit the history, and push that.

Two troubles:

1) conflicts merging or pushing from the workspace clone to my personal master
– more precisely, conflicts when merging from the master repo with history edited to remove the fine grain checkins, to my personal master with the fine grain checkins preserved.

2) I would like to record what has been pushed to the project master in my personal master.

—

A very simple example.

A task branch, with fine grain checkins.

o  changeset:   1022:
|  branch:      default
|  parent:      1017
|  parent:      1021
|  summary:     Merged task branch onto main, default, branch, with changes to FOO and BAR
|
o    changeset:   1021
|\   branch:      task-branch
| |  parent:      1020
| |  summary:     Merged default branch to task-branch, with changes to FOO and BAR
| |
| o  changeset:   1020
| |  branch:      task-branch
| |  parent:      1018:
| |  summary:     yet another fine grain checkin on a branch changing BAR for a second time
| |
o |  changeset:   1019
| |  branch:      task-branch
| |  parent:      1018:
| |  summary:     yet another fine grain checkin on a branch changing FOO
| |
o |  changeset:   1018
| |  branch:      task-branch
| |  parent:      1017
| |  summary:     yet another fine grain checkin on a branch changing BAR a first time
| |
|/
o  changeset:   1017
|  branch:      default
|  summary:     some other changeset on the default branch, i.e. trunk
|

The edited history, that gets pushed to the project master

o  changeset:   1018: ...changed checksumm because checksum seems to include history
|  branch:      default
|  parent:      1017
|  summary:     Merged task-branch onto main, default, branch, with changes to FOO and BAR. 
|               Removed task-branch-history from what got pushed to project repo, 
|               although may still be in personal repo
|
o  changeset:   1017
|  branch:      default
|  summary:     some other changeset on the default branch, i.e. trunk
|

The problem is, when I try to merge an updated projecvt master, that may look like

o  changeset:   1019
|  branch:      default
|  parent:      1018
|  summary:     again, some other changeset on the default branch, i.e. trunk
|
o  changeset:   1018: ...changed checksumm because checksum seems to include history
|  branch:      default
|  parent:      1017
|  summary:     Merged task-branch onto main, default, branch, with changes to FOO and BAR. 
|               Removed task-branch-history from what got pushed to project repo, ]
|               although may still be in personal repo
|
o  changeset:   1017
|  branch:      default
|  summary:     some other changeset on the default branch, i.e. trunk
|

I get conflicts, even though changeset 1018 of the project master and 1022 in the personal master are exactly the same, in terms of file contents.

I’ve tried not changing the comments in the merge changesrt that gets pushed. Doesn’t help, at least not reliably.

I wonder if the full history is included in the changesets.

I also wonder if there is some merge tool that can recognize same files, even though different history and log messages.

  • 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-04T14:19:21+00:00Added an answer on June 4, 2026 at 2:19 pm

    In general any workflow that involves editing history is not going to work well. It’s just not the intended work mode, and no effort goes into making it work well.

    Better options for you might be:

    1. Versioned Mercurial Queues (hg qinit --create-repo) which lets you make multiple commits iterating on a single patch. You get the full history in your private patch repo and they only get the qfinished whole.
    2. Rather than merge back your task branch and edit history, just re-apply the change as a single commit and push that. In your example it would be hg diff -r 1017 -r 1021 | hg import, which creates a new commit (1022) that is the sum of all the changes 1018::1021, inclusive. that should merge cleanly and be pushable without ever having to push any changesets on your task-branch out to them. You can even hg commit --close-branch on the task branch
    3. Tell your coworkers to STFU. 😉 High changeset granularity is good practice, and they should adapt.

    Also, consider using bookmarks instead of named branches for your task-branches. Similarly the new phases feature makes it possible to mark changesets in your task branches (be they bookmark-branches or old-style named-branches) as secret so they can’t be accidentally pushed.

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

Sidebar

Related Questions

When using Mercurial, how do you undo all changes in the working directory since
I've got a build that was previously working fine on the Jenkins Master node
I'm currently working on .Net projects that are using either Git or Mercurial (Hg)
We've been using mercurial for a while now and everything is working fine. The
When using mercurial, I'd like to be able to diff the working copy of
We are working with severall people on the same project and are using Mercurial
When using Mercurial I sometimes find that it is hard to understand the relationship
I'm using Mercurial locally for a project (it's the only repo there's no pushing/pulling
Using Git or Mercurial, if the working directory is 1GB, then the local repository
Using Mercurial, TortoiseHG, Win XP. I had a working directory with a number of

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.