clone: add help examples
authorMatt Mackall <mpm@selenic.com>
Fri, 30 Sep 2011 14:26:36 -0500
changeset 15179 d3b42e96cfcf
parent 15178 04e5449e25dc
child 15182 de496752d936
clone: add help examples
mercurial/commands.py
--- a/mercurial/commands.py	Fri Sep 30 14:12:48 2011 -0500
+++ b/mercurial/commands.py	Fri Sep 30 14:26:36 2011 -0500
@@ -1090,6 +1090,33 @@
       g) the tipmost head of the default branch
       h) tip
 
+      Examples:
+
+      - clone a remote repository to a new directory named hg/::
+
+          hg clone http://selenic.com/hg
+
+      - create a lightweight local clone::
+
+          hg clone project/ project-feature/
+
+      - clone from an absolute path on an ssh server (note double-slash)::
+
+          hg clone ssh://user@server//home/projects/alpha/
+
+      - do a high-speed clone over a LAN while checking out a
+        specified version::
+
+          hg clone --uncompressed http://server/repo -u 1.5
+
+      - create a repository without changesets after a particular revision::
+
+          hg clone -r 04e544 experimental/ good/
+
+      - clone (and track) a particular named branch::
+
+          hg clone http://selenic.com/hg#stable
+
     See :hg:`help urls` for details on specifying URLs.
 
     Returns 0 on success.