Commits

Steve Losh committed 7aefb5a

Abort if there's nothing to paste (so pastebin sites don't hate me).

Comments (0)

Files changed (1)

         commands.diff(ui, repo, *fnames, **opts)
     content = ui.popbuffer()
     
+    if not content.strip():
+        raise util.Abort('nothing to paste!')
+    
     if ui.verbose:
         ui.status('Pasting:\n%s\n' % content)