Mercurial > hg > pyhgsh
comparison contrib/patchbomb @ 1204:b0f6053df539
patchbomb: continue if we can't import readline.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Sun, 04 Sep 2005 15:12:20 -0700 |
parents | c3cb9f39a91f |
children | f3837564ed03 |
comparison
equal
deleted
inserted
replaced
1203:cb4c423cbb38 | 1204:b0f6053df539 |
---|---|
50 from mercurial import fancyopts | 50 from mercurial import fancyopts |
51 from mercurial import hg | 51 from mercurial import hg |
52 from mercurial import ui | 52 from mercurial import ui |
53 import os | 53 import os |
54 import popen2 | 54 import popen2 |
55 import readline | |
56 import smtplib | 55 import smtplib |
57 import socket | 56 import socket |
58 import sys | 57 import sys |
59 import tempfile | 58 import tempfile |
60 import time | 59 import time |
60 | |
61 try: | |
62 # readline gives raw_input editing capabilities, but is not | |
63 # present on windows | |
64 import readline | |
65 except ImportError: pass | |
61 | 66 |
62 def diffstat(patch): | 67 def diffstat(patch): |
63 fd, name = tempfile.mkstemp() | 68 fd, name = tempfile.mkstemp() |
64 try: | 69 try: |
65 p = popen2.Popen3('diffstat -p1 -w79 2>/dev/null > ' + name) | 70 p = popen2.Popen3('diffstat -p1 -w79 2>/dev/null > ' + name) |