Commits

Ronny Pfannschmidt committed ee40a93

add support for private pastes

Comments (0)

Files changed (1)

         ui.warn('Error: nothing to paste.\n')
         return
 
-    rv = proxy.pastes.newPaste('diff', content, None, '', '', False)
+    rv = proxy.pastes.newPaste('diff', content, None, '', '', bool(opts.get('private')))
     if not rv:
         ui.warn('Could not create paste; server returned failure.\n')
     else:
 cmdtable = {
     '^paste': (
         paste,
-        commands.table['^diff'][1] + [('n', 'nocopy', None, 'do not copy to clipboard')],
+        commands.table['^diff'][1] + [
+            ('n', 'nocopy', None, 'do not copy to clipboard'),
+            ('', 'private', None, 'create a private paste'),
+        ],
         commands.table['^diff'][2],
     )
 }