If you have access to the repository over the file system, you can use hg tip
or hg log
:
hg log -l 1 -R /path/to/repo
Otherwise you can go into any repository (maybe make an empty one for the purpose) and use hg in
, telling it to run even though the repositories are unrelated:
hg init tmp
cd tmp
hg in -f -n -l 1 url-of-repo
The -f
("force") makes it work with an unrelated repo; -n
means "newest revision first"; -l 1
limits the number of revisions printed to 1
. The net effect is to print out the newest revision that's in the repo and not in your local one. Since there are no revisions in your local one, that just gives the newest revision.