Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""
+import re
import sys
from stgit.argparse import opt
from stgit.commands import common
if options.series == '-':
f = sys.stdin
else:
- f = file(args[0])
+ f = file(options.series)
patches = []
for line in f:
import tempfile
if not url:
- parser.error('URL argument required')
+ raise CmdException('URL argument required')
patch = os.path.basename(urllib.unquote(url))
filename = os.path.join(tempfile.gettempdir(), patch)
else:
filename = None
- if filename:
+ if not options.url and filename:
filename = os.path.abspath(filename)
directory.cd_to_topdir()
'stgit.keepoptimized': 'no',
'stgit.extensions': '.ancestor .current .patched',
'stgit.shortnr': '5',
- 'stgit.pager': 'less -FRSX'
+ 'stgit.pager': 'less'
}
__cache = None
global config
os.environ.setdefault('PAGER', config.get('stgit.pager'))
+ os.environ.setdefault('LESS', '-FRSX')
# FIXME: handle EDITOR the same way ?
class ConfigOption: