views:

142

answers:

1

Hey Everyone,

After trying to get the mercurial repository explorer setup on my shared hosting with no luck, I have decided to try and write a module for our Intranet that will act as a repository explorer.

Is it possible for me to get changesets from a Mercurial repository without Mercurial installed on the machine?

Thanks for any help!

Metropolis

+2  A: 

Definitely, but you probably don't need to do that. Mercurial has a static-http:// mode where it will let you clone and pull from repos that are merely sitting on an available web server. It's slower, but it works.

That said, folks have found that with enough work they can get all but the most restrictive shared hosting systems serving up hgwebdir.cgi.

Ry4an
Awesome, thanks alot for your help Ry4an. Is there a way I can test if CGI is working on my server? And if I still wanted to make my own repository viewer, how could I read from the folders? You told me in one of my other posts that I should not serve the .hg folders directly in the CR folder, but you never told me why.
Metropolis
To check if you can run CGIs, I guess try putting a tiny .cgi file in place and put a ScriptAlias line in a .htaccess file and check. Your hosting provider should be able to say.Not to sound snide, but the mercurial binary format is complex and precise. Creating a browser for it without the mercurial on that server is a huge effort that is almost certain to falls short.Putting the .hg directory inside your DocumentRoot isn't unsafe, it's just that it only enables the static-http:// mode which is slower and less efficient. Get the CGIs running and keep .hg out to prevent static-http://
Ry4an
On this post http://stackoverflow.com/questions/2484151/how-to-setup-mercurial-central-repository-on-shared-hosting I showed a CGI python file that I tried to add with only the header and that was not working. I also tried the ScriptAlias, and that was giving me an error. Does this mean I can not run CGI files on that server? Or I need to do something else?
Metropolis
It could me that. Or that python is in a different place. Or that python isn't installed. or that any of a million other webserver configuration problems could exist. Just _ask_ your host if they allow CGIs and how to enable them.
Ry4an
Ok thanks alot Ry4an
Metropolis