# HG changeset patch # User Matt Mackall # Date 1316210898 18000 # Node ID b55129f7f0396584f8ab0113775354f36c5d4ea5 # Parent 24f5489452af2a21f0b3dbcee0576d26c2be65ee import: add help examples diff -r 24f5489452af -r b55129f7f039 mercurial/commands.py --- a/mercurial/commands.py Fri Sep 16 16:52:45 2011 -0500 +++ b/mercurial/commands.py Fri Sep 16 17:08:18 2011 -0500 @@ -3135,6 +3135,27 @@ a URL is specified, the patch will be downloaded from it. See :hg:`help dates` for a list of formats valid for -d/--date. + .. container:: verbose + + Examples: + + - import a traditional patch from a website and detect renames:: + + hg import -s 80 http://example.com/bugfix.patch + + - import a changeset from an hgweb server:: + + hg import http://www.selenic.com/hg/rev/5ca8c111e9aa + + - import all the patches in an Unix-style mbox:: + + hg import incoming-patches.mbox + + - attempt to exactly restore an exported changeset (not always + possible):: + + hg import --exact proposed-fix.patch + Returns 0 on success. """ patches = (patch1,) + patches