Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show tags for remote hg repository

Tags:

mercurial

Is it possible to see a list of all tags on a remote Mercurial repository, without cloning it first? In git I can run git ls-remote --tags.

like image 816
troelskn Avatar asked Jan 10 '10 23:01

troelskn


1 Answers

Tags are stored in the working directory in .hgtags - ie, in the working copy, not the local 'repository'. Since all remote operations take place on the remote repository, not the remote working copy, there is no way to list tags remotely.

In essence .hgtags just gives changesets convenient names, tags have nothing to do with repository metadata or version control.

Note that the design philosophy of Mercurial is that it should be scalable; in order for a distributed version control system to be scalable the 'hard work' has to be done on the machine that initiated the command, this is why you have to first obtain a clone to do anything difficult.


Edit: As Tom Anderson points out (see comments), tags are in fact the union of those defined in .hgtags files in all of the head revisions, which makes it even more difficult.

like image 101
James Avatar answered Sep 25 '22 23:09

James