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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:27:12+00:00 2026-05-31T19:27:12+00:00

I have a Hg repository with changeset 0 representing just adding .hgignore. Starting with

  • 0

I have a Hg repository with changeset 0 representing just “adding .hgignore”. Starting with changeset 1 I added changesets step by step from a number of Subversion revisions by a script. Then I worked for some time with Hg.

Now I decided that some more Svn revisions will be needed, which are located earlier in history than the beginning revision (changeset 1 in Hg).

Is it possible to insert new changesets between 0 and 1? If yes: How?

  • 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-31T19:27:13+00:00Added an answer on May 31, 2026 at 7:27 pm

    You can use a Mercurial to Mercurial conversion for this. You need to enable the convert extension for this. The extension will let you splice history together as part of the conversion. This simply means that you can specify new parents for an existing changeset.

    So if you start with

    $ hg glog
    @  changeset:   1:aaee9686dedf
    |  tag:         tip
    |  user:        Martin Geisler <mg@lazybytes.net>
    |  date:        Fri Mar 23 15:08:11 2012 +0100
    |  summary:     bar
    |
    o  changeset:   0:17474bd28fe5
       user:        Martin Geisler <mg@lazybytes.net>
       date:        Fri Mar 23 15:08:05 2012 +0100
       summary:     foo
    

    You can first import the needed revisions from SVN:

    $ hg update null
    $ run-your-script.sh
    

    This will create a second root changeset — you now effectively have two disjoint histories in your repository. I made a single changeset where I added a baz file:

    $ hg glog
    @  changeset:   2:515e1292862b
       tag:         tip
       parent:      -1:000000000000
       user:        Martin Geisler <mg@lazybytes.net>
       date:        Fri Mar 23 15:09:19 2012 +0100
       summary:     baz
    
    o  changeset:   1:aaee9686dedf
    |  user:        Martin Geisler <mg@lazybytes.net>
    |  date:        Fri Mar 23 15:08:11 2012 +0100
    |  summary:     bar
    |
    o  changeset:   0:17474bd28fe5
       user:        Martin Geisler <mg@lazybytes.net>
       date:        Fri Mar 23 15:08:05 2012 +0100
       summary:     foo
    

    The final step is to link the histories together: we want 17474bd28fe5 to have 515e1292862b as its first parent. Use hg log --debug to see the full changeset hashes and make a slice map file with

    17474bd28fe535c15c7dad3659994ab048146e99 515e1292862ba2d6776294ffb00c533dc6850c66
    

    Then run

     $ hg convert --splicemap map.txt your-repo your-spliced-repo
    

    You will find the modified history in your-spliced-repo.

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

Sidebar

Related Questions

We have a Mercurial repository converted from Subversion a while ago and have today
I have pulled an incoming changes from a codeplex-based mercurial repository and have arrived
I have checked out code from a svn repository and started making changes. But
Let's say I have committed some bad changes to Subversion repository. Then I commit
I have repository on GitHub to which I commit regularly from my local computer.
I have a number of branches in a git repository: david@Panama ~/app: git branch
Is it even possible to remove a particular changeset from a Git repository altogether.
I have a Mercurial repository with ~800 changesets and I need to find the
I have done a lot of development on a branch in my subversion repository.
I'm converting a big (with about 9000 changesets) Subversion repository to Mercurial. It is

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.