1. Steve Losh
  2. hg-paste

Commits

Steve Losh  committed 7aefb5a

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

  • Participants
  • Parent commits 6f98825
  • Branches default

Comments (0)

Files changed (1)

File paste.py

View file
  • Ignore whitespace
         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)