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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:39:26+00:00 2026-05-11T20:39:26+00:00

I’m writing some sort of new adminstration dashboard for our cms (which runs on

  • 0

I’m writing some sort of new adminstration dashboard for our cms (which runs on asp.net webforms). Some of our older servers can only handle .NET 2.0 for various reasons so I’d have to rewrite my code which uses lambda expressions etc. for that.

I wonder how you would use a dvcs like mercurial to develop those two versions concurrently.

My current codebase and mercurial repository is targeted at .NET 3.5. I’m relatively new to mercurial and I guess I’d have to branch the codebase?

Any best practices or tutorials?

  • 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-11T20:39:27+00:00Added an answer on May 11, 2026 at 8:39 pm

    Yes, you can use Mercurial for this. Here is how it would work.

    Let’s say that your current clone is called new-dot-net since it
    support the new .Net version. You make a clone of it and call it
    old-dot-net or something like that. The two clones are now identical
    and both target .Net 3.5.

    Now carefully make small changes in old-dot-net in order to make it
    .Net 2.0 compatible. When you make the changes the two clones will
    start to diverge:

    new-dot-net: ... [a] --- [b]
    
    old-dot-net: ... [a] --- [b] --- [c] --- [d]
    

    Here you made [c] and [d] changesets to add the .Net 2.0
    compatibility. Notice how the old-dot-net clone contains more
    changesets than new-dot-net since it has the backwards compatibility
    changes that you dont want to see in new-dot-net. As you continue
    working, it is important to think of this: net-dot-net will contain
    a subset of the changesets in old-dot-net. The changes flow from
    new-dot-net to old-dot-net, but never in the opposite direction.

    Let’s say you make a new change in new-dot-net. You make the change
    in new-dot-net and the situation now looks like this:

    new-dot-net: ... [a] --- [b] --- [x]
    
    old-dot-net: ... [a] --- [b] --- [c] --- [d]
    

    You now want to back-port the change to old-dot-net as well, you
    change to old-dot-net and pull from net-dot-net:

    % cd old-dot-net
    % hg pull ../new-dot-net
    

    This will create a new head in old-dot-net:

                                 [x]
                                /
    old-dot-net: ... [a] --- [b] --- [c] --- [d]
    

    since the [x] changeset has [b] as it’s parent changeset. You now
    have multiple heads and have to merge to reduce the number of
    heads. By merging you create a new changeset which is your way of
    saying “this is how [x] and [d] should be combined”. If the [x]
    changeset only touches code which is not also touched in [c] and
    [d], then the merge should just work. Otherwise you’ll be presented
    with a merge tool and have to resolve the conflict. You commit the
    merge as chageset [e]:

                                 [x] --------------.
                                /                   \
    old-dot-net: ... [a] --- [b] --- [c] --- [d] --- [e]
    

    And you’re done — you have now incorporated the [x] change into
    your .Net 2.0 compatible code.

    You repeat this every time there has been a change in new-dot-net.
    Let’s say that more features are added:

    new-dot-net: ... [a] --- [b] --- [x] --- [y] --- [z]
    

    After pulling them into old-dot-net you get

                                 [x] --------------.---- [y] --- [z]
                                /                   \
    old-dot-net: ... [a] --- [b] --- [c] --- [d] --- [e]
    

    And you now merge [e] and [z]:

                                 [x] --------------.---- [y] --- [z]
                                /                   \               \
    old-dot-net: ... [a] --- [b] --- [c] --- [d] --- [e] ----------- [f]
    

    The important parts to remember are these:

    • make any new features in new-dot-net.
    • pull changes into old-dot-net
    • never push from old-dot-net to new-dot-net.

    Should you at some point find that a change in new-dot-net is not
    needed in old-dot-net, then you still need to pull it in and merge
    it. But you will then do a dummy merge. If the heads are [w] and
    [g], and you want keep [g], then do

    % HGMERGE=true hg merge -y
    % hg revert --all --rev g
    % hg commit -m 'Dummy merge with y.'
    

    The trick is to do the merge without caring about the results,
    then revert all changes, and commit the unchanged working copy as the
    merge. That way you tell the world that “the combination of [w] and
    [g] is [g]“, i.e., you throw away the changes in [w]. New
    changes made in new-dot-net after [w] can then be merged like
    normal.

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

Sidebar

Related Questions

Let's say I'm outputting a post title and in our database, it's Hello Y’all
I am writing an app for my school newspaper, which is run completely online
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I want use html5's new tag to play a wav file (currently only supported
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.