subrepos not working as expected with urls

Matt Mackall mpm at selenic.com
Mon May 10 18:53:01 UTC 2010


On Mon, 2010-05-10 at 12:08 -0500, Haszlakiewicz, Eric wrote:
> I've been playing around a bit with subrepos, and they works about how I
> expect when starting exactly from the example on the wiki, but now I'm
> trying to actually implement them on some real use cases.  
> I have a repository here that I want to include as a sub-repo in several
> others.  (it's a library that gets custom built in several different
> environments)  I figured I'd be able to specify the url of that
> repository as a subrepo, and it'd just get pulled in, but it doesn't
> seem to work.  
> Here's an example, what am I doing wrong?
> 
> hg init repo1
> cd repo1
> # this is just a random, small, publically available repo
> echo "otherrepo = http://bitbucket.org/david/django-storages" > .hgsub
> hg add .hgsub

> hg ci -m "populate .hgsub" .hgsub
> # nothing happens with sub-repos here, but I expected it to.

Why would it? Commit records the current state of your project, and your
project current contains no checkout of django-storages.

In other words, before you commit, you need to put your project in the
state you want reflected in the commit with something like:

hg clone http://bitbucket.org/david/django-storages otherrepo

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list