changeset 15112:24f5489452af

id: add some help examples
author Matt Mackall <mpm@selenic.com>
date Fri, 16 Sep 2011 16:52:45 -0500
parents 0be86ec3cafe
children b55129f7f039
files mercurial/commands.py
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Sep 16 16:40:27 2011 -0500
+++ b/mercurial/commands.py	Fri Sep 16 16:52:45 2011 -0500
@@ -2971,6 +2971,22 @@
     Specifying a path to a repository root or Mercurial bundle will
     cause lookup to operate on that repository/bundle.
 
+    .. container:: verbose
+
+      Examples:
+
+      - generate a build identifier for the working directory::
+
+          hg id --id > build-id.dat
+
+      - find the revision corresponding to a tag::
+
+          hg id -n -r 1.3
+
+      - check the most recent revision of a remote repository::
+
+          hg id -r tip http://selenic.com/hg/
+
     Returns 0 if successful.
     """