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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:28:39+00:00 2026-05-21T22:28:39+00:00

Here’s the situation: developer Foo created a hg repo from our svn repo. Foo’s

  • 0

Here’s the situation: developer Foo created a hg repo from our svn repo. Foo’s hg repo was only a shallow clone of the trunk in svn (no svn branches, tags, etc. and the history was incomplete [about 100 changesets]). Developer Bar did the same thing, but cloned the entire svn repo including the entire history, branches, tags, etc. Both Foo and Bar have done branchy development on their repositories.

There is a common SVN ancestor to both repositories, but each hg repo has a different version number for it. I would like to reparent Foo’s changes from the common ancestor onto Bar’s repo. Here’s a diagram of what I’m looking for:

Foo’s repo:

C'-D'-E-F---G
       \   /
        H-I

Bar’s repo:

...A-B-C-D-J-K---L
            \   /
             M-N

C,C’ and D,D’ have the same content, but different version numbers & comments.

The goal:

...A-B-C-D--E-F---G
          \  \   /
           \  H-I
            \
             J-K---L
              \   /
               M-N

I’ve run out of ideas on how to make this happen. I tried convert –splicemap splice.map [splice.map file contained E D] (didn’t do anything). Clone -f managed to get everything into one repo, but they appear to be independent trees. After clone -f, I tried rebase –source E –dest D –detach, but it just crashed 🙁

Ideas?

I’m aware altering the history will invalidate anyone’s clone of the repositories, this is not a problem in this case. All users will be re-cloning from the result of this effort.

  • 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-21T22:28:40+00:00Added an answer on May 21, 2026 at 10:28 pm

    SOLVED!

    One thing I didn’t notice initially was that my presumed common ancestor wasn’t exactly the same after all. During the svn->hg conversion of Foo’s repo, the $ID$ strings were expanded, but were not in the creation of Bar’s repo. Step 1 below was a simple fix to create a REAL common ancestor.

    The following steps allowed me to accomplish my goal:

    1- Ensure that the presumed common ancestor (D and D’) are actually identical. If not, create a new splice point for them (S) in Bar’s repo. S should exactly match the content of D’ in my example.

        ...A-B-C-D--J-K---L
                  \  \   /
                   S  M-N
    

    2- Trim the history of Foo’s repo to remove the duplicate history, including D’, with

        hg convert --splicemap TrimSplicemap Foo FooTrimmed
    

    TrimSplicemap contents: (where E is the full hash of E)

        E 0000000000000000000000000000000000000000
    

    3- Use hg strip to remove the disconnected, redundant history

        cd FooTrimmed
        hg strip C'
    

    4- Use hg convert again to splice Foo’s stripped repo onto Bar’s repo at commit ‘S’

        cd ../Bar
        hg convert --splicemap FooBarSplicemap ../FooTrimmed .
    

    FooBarSplicemap contents: (where E’ is the NEW hash for E in the FooTrimmed, and S is the hash of S)

        E' S
    

    That should do it! 😀

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

Sidebar

Related Questions

Here is the script I'm using, copied directly from Google: <script type=text/javascript> var _gaq
Here's a piece of code I copied from http://www.schillmania.com/content/projects/javascript-animation-1/demo/ Very simple JS animation: function
Here's a dump of the stats provided my mod_pagespeed from one of my sites.
Here is my problem. Our tech. writer or customer service will often create new
Here's the code I have. It works. The only problem is that the first
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Here's my situation. I've noticed that code gets harder to maintain when you keep
Here's the situation, i want to have a user that can enter time on
Here is the code from my project where I am using a datepicker. The
Here I am trying to retrieve the response from the server and display it,

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.