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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:50:48+00:00 2026-06-14T23:50:48+00:00

I am struggling with figuring out a good method for handling my work flow

  • 0

I am struggling with figuring out a good method for handling my work flow using Mercurial. I have read many related questions here on SO and other places but couldn’t find a reasonable solution.

Suppose I have two branches:

  1. the default branch I do normal development in. Deploying releases from and marking them with release tags
  2. a branch for a specific customer that is maintained separately. It runs on a separate version number, branched from an older version of the application.

These two branches are mostly identical now but there are already some differences. Over time, they will drift apart more.

It means that I have 4 types of source files:

  1. Type-A: Files that remain identical in both branches (changes, if introduced, should be present in both). These are most of the files.
  2. Type-B: Files that are only in the default branch and do not need to be merged into the customer branch
  3. Type-C: Files that are only in the customer branch and do not need to be merged into the default branch
  4. Type-D: Files that are present in both branches, have shared code but also contain code that should remain separate and specific to each branch

Development done on the default branch and there are regular releases which are mostly incremental. But I also have these two scenarios:

  1. Some changes done to the default branch, need to also be merged to the customer branch (e.g. a bug or feature that need to be fixed/added to both).
  2. A “hotfix” done to the customer branch and cannot be immediately merged to the default branch but needs to be merged eventually at some point.

Problem is that I can’t figure out a reasonably simple, clean and safe way to support these two scenarios. Mercurial doesn’t have the concept of partial merges or ignoring files on merge. It merges changesets but it insists on including the files that were introduced in previous revisions.

Merging default into customer branch or customer into default in these scenarios forces me to add files of Type-B and Type-C. Making a change to file of Type-A that doesn’t need be added to the other branch (making it Type-D) introduces a challenge.

Now obviously I can work around some of these problems by using compiler defines (thus keeping source files the same in both branches), editing code manually and manually removing files after merges but this doesn’t feel like the most efficient and clean way to handle this.

Surely this is a common enough work flow that wiser people than me already figured out. Can anyone suggest any method or best practices that can streamline the work in these scenarios? Or is there something fundamentally flawed with my setup?

Also, does Git handles these flows more gracefully?

Thanks.

  • 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-14T23:50:50+00:00Added an answer on June 14, 2026 at 11:50 pm

    I would do any development that a the customer requires on the customer branch and merge it into default. This will work for hotfixes and it is simpler than cherry-picking your development changesets from your default branch. It’s easier to merge forwards rather than backwards. It also gets rid of Type-B file problem because there are no Type-B files in the customer branch.

    Type C files I would merge into default and then delete on the default branch. Any further modifications to these files should generate a warning that file modified on branch was deleted on the other branch.

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

Sidebar

Related Questions

Struggling to work this one out; I have a (Tomcat6 'Context.xml') default document, which
I'm struggling a bit figuring out the best way accept and store a url
I'm struggling a bit with figuring out how to properly set up my view
I have been working on figuring out how to make a double drop down
Struggling to figure out how to Over-Ride the __init__() method in my Django Form
I am really struggling with figuring out how to convert a MS Access CrossTab
Have made quite a bit of progress in my quest to figuring out the
Struggling getting a query to work…….. I have two tables:- tbl.candidates: candidate_id agency_business_unit_id tbl.candidate_employment_tracker
Struggling to get any list function to work. I've been fine with _show and
struggling a bit to get the following to work : I'm trying to merge

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.