Questions tagged [subrepos]

Mercurial can include other repositories in a checkout. These repositories are called subrepositories.

More information:

101 questions
62
votes
3 answers

What's a good way to organize projects with shared dependencies in Mercurial?

Currently, I'm moving from a legacy version control system and moving my group's project to mercurial. As one example of the kinds of code I'm moving, I have a 25+ project Visual Studio solution, containing several separate application areas that…
Robert P
  • 15,707
  • 10
  • 68
  • 112
36
votes
2 answers

Mercurial Subrepos - How do you create them and how do they work?

Situation I have two .NET solutions (Foo and Bar) and a common library that contains ProjectA, ProjectB, and ProjectC. Foo and Bar reference one or more library projects, but the library projects are not located within the Foo and Bar Solution…
devuxer
  • 41,681
  • 47
  • 180
  • 292
29
votes
1 answer

Split large repo into multiple subrepos and preserve history (Mercurial)

We have a large base of code that contains several shared projects, solution files, etc in one directory in SVN. We're migrating to Mercurial. I would like to take this opportunity to reorganize our code into several repositories to make cloning for…
Andrew
  • 3,332
  • 4
  • 31
  • 37
28
votes
2 answers

How can I prevent mercurial from pushing subrepos?

In my repository I've added several sub-repositories for modules that I'm using. I'm always going to treat these subrepos as "pull only". I don't plan to make any changes to them but want to retain the ability to easily pull new changes if a new…
Soviut
  • 88,194
  • 49
  • 192
  • 260
22
votes
2 answers

What is the correct way to handle nested Hg repositories with Mercurial/TortoiseHg?

I'm struggling on how to correctly track nested repositories using TortoiseHg. I have a main repository that tracks my whole project. This project contains several little plugins that are stored inside a plugins/ subdirectory. I would love to track…
pixelastic
  • 5,138
  • 6
  • 24
  • 29
20
votes
2 answers

Hg sub-repository dependencies

There have been a couple of questions about Hg sub-repo dependencies in the past (here and here) but the accepted answers don't seem to address the problem for me. A project of mine has 4 dependencies: A, B, C, D. D is dependent on A, B and C; and B…
Tom Carver
  • 962
  • 7
  • 17
18
votes
2 answers

Does a mercurial subrepository have to be a subdirectory of the main repository?

My project is made up of code in the following locations C:\Dev\ProjectA C:\Lib\LibraryB C:\Lib\LibraryC Presently each of these folders is a completely independent Mercurial repository. Project A changes all the time, Library B and Library C…
LachlanG
  • 4,047
  • 1
  • 23
  • 35
13
votes
8 answers

Mercurial: Subrepo error -- "abort: commit with new subrepo [path] excluded"

I'm trying to setup the subrepositories in my Mercurial project repo for the project's dependencies. But when I try to commit the .hgsub file I keep getting this error: abort: commit with new subrepo lib/dependency-dir excluded Details: Inside my…
Brian Lacy
  • 18,785
  • 10
  • 55
  • 73
12
votes
1 answer

Pushing mercurial repo without pushing subrepos

I'm using Mercurial 1.6. I have a repo with a few subrepos (11). I would like to push the parent repo to the default remote repo without pushing the child repos. Reasons for wanting to do this include: I'm using SSH repos, and it takes a long time…
Jason R. Coombs
  • 41,115
  • 10
  • 83
  • 93
12
votes
3 answers

Any way to pull/update all subrepos?

I'm looking into the viability of switching from svn to mercurial for my organization, but there's one hangup I can't seem to find a solution for. Is there any way to pull and update a repo and all subrepos without manually pulling and updating each…
carpat
  • 861
  • 10
  • 25
11
votes
3 answers

Join multiple subrepos into one and preserve history in Mercurial

Currently I have project consisting of multiple repositories, e.g.: +---Project (main repo) +---Core (subrepo) +---Web (subrepo) \---Tests (subrepo) Unfortunately the code between subrepos is quite coupled so it doesn't work nicely…
Regent
  • 5,502
  • 3
  • 33
  • 59
10
votes
1 answer

How to convert an existing Mercurial repository to use subrepositories and keep the history intact?

I've been reading about subrepositories and how to extract an existing folder from a Mercurial repository to a subrepository using the convert extension and a filemap. I can successfully do this. If I have the following folder…
Christophe
  • 851
  • 1
  • 8
  • 19
10
votes
2 answers

Mercurial hg Subrepository issue - "abort: unknown revision'

Note: I asked this yesterday over at kiln.stackexchange.com, but haven't gotten an answer, and it's holding up my work. So I figured I'd give it a shot here. My main mercurial repository has a bunch of subrepositories in it. During initial setup, I…
tex
  • 2,756
  • 22
  • 31
9
votes
2 answers

subrepo, hg clone and symlinks

I'm quite new to mercurial, I've read a lot on this topic but I've been unable to find a clear answer. The mercurial guide says: "For efficiency, hardlinks are used for cloning whenever the source and destination are on the same filesystem (note…
user533784
  • 121
  • 1
  • 4
9
votes
5 answers

tortoisehg and subrepos

I can't get Tortoisehg (1.0) to work with subrepos I have a directory structure like this: root .hg .hgsub .hgsubstate Customer1 Project1 .hg foo.txt Project2 .hg Customer2 Project3 .hg the .hgsub file…
adrianm
  • 14,468
  • 5
  • 55
  • 102
1
2 3 4 5 6 7