Anonymous committed f2e8161

Rename --nopaste to --nocopy, and add docstring.

  • Participants
  • Parent commits 6cc5540

Comments (0)

Files changed (1)

 def paste(ui, repo, *pats, **opts):
+    """Paste current working directory changes or a specified changeset.
+    When -r REV is not given, treat the remaining arguments as for the
+    "hg diff" command and paste the resulting diff.  When -r REV is
+    given, export the revision and paste that.
+    The paste is done on by default, but a
+    different server with a compatible XMLRPC interface can be selected
+    in the configuration (add a "server" value in a "paste" section).
+    By default, the pasted text is also copied to the system clipboard;
+    the -n option prevents that.
+    """
     import xmlrpclib
     server = ui.config('paste', 'server', '')
     if not server.endswith('/'):
         url = '%sshow/%s/' % (server, rv)
         ui.status(url + '\n')
-        if not opts['nopaste']:
+        if not opts['nocopy']:
 cmdtable = {
          [('r', 'rev', [], 'paste specified revision(s)'),
-          ('n', 'nopaste', None, 'do not copy to clipboard')] + commands.diffopts,
+          ('n', 'nocopy', None, 'do not copy to clipboard')] + commands.diffopts,
          'hg paste [-r REV | FILE...]')