tags:

views:

364

answers:

2

I want to be able to take a file in a Mercurial repository (Readme for example) and display it to the user. Is this possible in PHP? I do have command line hg installed on the server.

A: 

Maybe running

hg serve

and interacting with the server (localhost:8000) could be a viable option.

tmadsen
On a shared host, so I can't do this.
Henri Watson
+3  A: 

Just launch hg cat -r <rev> file from php, you'll get the file in stdout.

tonfa
Now, what command do I run to find out the current revision?
Henri Watson
http://www.selenic.com/mercurial/hg.1.html
Gordon
-r 'tip' always gets the most recent changeset
Ry4an