Question

I have a repository called main and underneath it a number of subrepositories. When initially created the main superrepository, I had taken already existing repositories and copied them into the main folder, then added the .hgsub file to indicate the names of the subrepos.

Now, this main folder lives on our company file server and is served by hgService, and we need to add new repositories to it. How in the wide green world is this done seamlessly?

If i clone main to my local machine, then hg init newrepo, and copy it into the cloned main and add the proper entry to .hgsub i can commit, but i cannot push. It gives me an error along the lines of http error 404 path not found. Ok, fair enough so I add the entry to hgService's web.conf file, and restart. Now i get a different error something like subrepository 'newrepo' doesn't exist Well duh! i'm trying to add it!

So I finally broke down and had to RAdmin to the server, manually create a newrepo, add it to the main repo being served by hgService and commit changes. This seems extremely dirty to me, and what made things even more difficult is that the state of the server's Working Directory was about 6 months out of date, I had to resolve countless problems to update it to the latest rev.

There has to be a better way of doing this.. i can't have users RAdmining in to the co. VCS server every time they need a new repository? right?

Was it helpful?

Solution

Unfortunately no — adding a new subrepository involves creating it on the server, you cannot hg push a new repository onto a server. So if creating repositories on the server requires logging into the server, well then adding a subrepository will require the same.

The hgweb script shipped with Mercurial (which I'll you're referring to by hgService) has no built-in mechanism for letting users create new repositories. The assumption is that new repositories are created by other means and hgweb will then serve a read-only view over HTTP and let users push/pull to the repositories with Mercurial.

There are other web frontends for Mercurial. I'm most familiar with Kallithea. It lets you create/delete repositories right from your browser and so you don't need to login to the server any more. This is a much nicer way to manage repositories than using plain hgweb.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top