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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:12:40+00:00 2026-06-09T09:12:40+00:00

When I started with Mercurial about a year ago I created one repository called

  • 0

When I started with Mercurial about a year ago I created one repository called SandBox to put all my projects in it, now about a year later I realize that wasn’t very smart choice I have 19 project in it some of them are big. I would like to give each project its own repository also keeping the history. Is there an easy way I accomplish this?

  • 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-09T09:12:42+00:00Added an answer on June 9, 2026 at 9:12 am

    Well, consider a project with the following structure (in bitbucket):

    $ find hgmultiproject
    hgmultiproject
    hgmultiproject/proj2
    hgmultiproject/proj2/mysndfile
    hgmultiproject/proj1
    hgmultiproject/proj1/myfirstfile
    hgmultiproject/proj3
    hgmultiproject/proj3/mythirdfile
    

    This project has this log:

    revision:    7:6bbc26c1a34d
    tag:         tip
    user:        Adam Victor Nazareth Brandizzi <brandizzi@gmail.com>
    date:        Wed Aug 08 11:49:22 2012 -0300
    summary:     correcting
    
    revision:    6:32c312e7072e
    user:        Adam Victor Nazareth Brandizzi <brandizzi@gmail.com>
    date:        Wed Aug 08 11:48:55 2012 -0300
    summary:     Adding period
    
    revision:    5:f332e0ecee4d
    user:        Adam Victor Nazareth Brandizzi <brandizzi@gmail.com>
    date:        Wed Aug 08 11:48:39 2012 -0300
    summary:     Moving to correct name
    
    revision:    4:5850a93d80dd
    user:        Adam Victor Nazareth Brandizzi <brandizzi@gmail.com>
    date:        Wed Aug 08 11:48:05 2012 -0300
    summary:     More content on second file
    
    revision:    3:0098ebd2cea5
    user:        Adam Victor Nazareth Brandizzi <brandizzi@gmail.com>
    date:        Wed Aug 08 11:47:41 2012 -0300
    summary:     A third file
    
    revision:    2:096c984a8f2a
    user:        Adam Victor Nazareth Brandizzi <brandizzi@gmail.com>
    date:        Wed Aug 08 11:47:09 2012 -0300
    summary:     More content on 1st file
    
    revision:    1:b9491918efcc
    user:        Adam Victor Nazareth Brandizzi <brandizzi@gmail.com>
    date:        Wed Aug 08 11:46:52 2012 -0300
    summary:     My second file
    
    revision:    0:4e429ac2fee9
    user:        Adam Victor Nazareth Brandizzi <brandizzi@gmail.com>
    date:        Wed Aug 08 11:46:23 2012 -0300
    summary:     My first file
    

    You can extract the projects using the Convert extension with the –filemap option.

    How to do it? First, you should create a filemap file. In this case, the content should be:

    rename proj1 .
    exclude proj2
    exclude proj3
    

    The first line will move everything inside the proj1 dir to the root of the new repository. The second line will remove the proj2 dir from the new repository, and the third line will remove the proj3.

    To use it, just call this way:

    $ hg convert --filemap proj1filemap hgmultiproject/ extracted-proj1
    

    Now, enter the new repo:

    $ cd extracted-proj1/
    

    It has no working copy…

    extracted-proj1 $ ls
    

    y but you just need to update:

    extracted-proj1 $ hg update
    1 updated files, 0 merged files, 0 deleted files, 0 nonresolved files
    extracted-proj1 $ ls
    myfirstfile
    

    And the new log is…

    extracted-proj1 $ hg log
    revision:    2:eb31727c0df8
    tag:         tip
    user:        Adam Victor Nazareth Brandizzi <brandizzi@gmail.com>
    date:        Wed Aug 08 11:48:55 2012 -0300
    summary:     Adding period
    
    revision:    1:e701f0ad5335
    user:        Adam Victor Nazareth Brandizzi <brandizzi@gmail.com>
    date:        Wed Aug 08 11:47:09 2012 -0300
    summary:     More content on 1st file
    
    revision:    0:c0b6ad18ff22
    user:        Adam Victor Nazareth Brandizzi <brandizzi@gmail.com>
    date:        Wed Aug 08 11:46:23 2012 -0300
    summary:     My first file
    

    You should follow these steps for each project of your repository.

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

Sidebar

Related Questions

Our team started using mercurial about a month ago and it was a rough
Just started working with Mercurial a few days ago and there's something I don't
I just got the latest mercurial and started adding in largefiles. However, now I
We started using Mercurial a several weeks ago. Most developers follow this workflow: work
Few days ago I started experimenting with Mercurial, and everything went great, until I
I've a newbie question about Mercurial. Me and a friend just started to work
I started some local mercurial projects which I would like to start sharing. I
I'm in this situation: First of all I just started to use mercurial. I've
I've started to put some files in version control in mercurial. It started with
A while ago I started an open-source project, which for me meant (until now)

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.