hg.rst
changeset 1088 90fc62d6693e
parent 1032 4decc3e00bb6
child 1090 d362fd4a1995
--- a/hg.rst	Sun Nov 13 19:02:52 2011 +0200
+++ b/hg.rst	Mon Nov 14 23:47:37 2011 +0200
@@ -415,6 +415,13 @@
   $ hg log -r "ancestor($rev1,$rev2)"
   $ hg log -r "ancestor($rev1,ancestor($rev2,$rev3))"
 
+Find most recent tag for revision.
+==================================
+::
+
+  $ hg log -r "sort(tag() and ancestors($REV),-date)"
+  $ hg log -r $REV --template "{latesttag}-{latesttagdistance}-{node|short}\n"
+
 Hooks.
 ======