jsvn: do not use a pager with "propedit" command
This commit is contained in:
parent
a47ff416a1
commit
e08d51d0a8
8
jsvn
8
jsvn
@ -465,13 +465,15 @@ def main(argv):
|
|||||||
realsvn = findInPath('svn')
|
realsvn = findInPath('svn')
|
||||||
colorsvn = findInPath('colorsvn')
|
colorsvn = findInPath('colorsvn')
|
||||||
out = sys.stdout
|
out = sys.stdout
|
||||||
stdout_is_a_tty = sys.stdout.isatty()
|
using_pager = False
|
||||||
if stdout_is_a_tty:
|
if sys.stdout.isatty():
|
||||||
|
if not (len(argv) >= 1 and argv[0] in ('propedit')):
|
||||||
pager = 'less -FRX'
|
pager = 'less -FRX'
|
||||||
if 'PAGER' in os.environ and os.environ['PAGER'] != '':
|
if 'PAGER' in os.environ and os.environ['PAGER'] != '':
|
||||||
pager = os.environ['PAGER']
|
pager = os.environ['PAGER']
|
||||||
pager_proc = Popen(pager, shell=True, stdin=PIPE)
|
pager_proc = Popen(pager, shell=True, stdin=PIPE)
|
||||||
out = pager_proc.stdin
|
out = pager_proc.stdin
|
||||||
|
using_pager = True
|
||||||
|
|
||||||
if realsvn == '':
|
if realsvn == '':
|
||||||
sys.stderr.write("Error: 'svn' not found in path\n")
|
sys.stderr.write("Error: 'svn' not found in path\n")
|
||||||
@ -506,7 +508,7 @@ def main(argv):
|
|||||||
|
|
||||||
if do_normal_exec:
|
if do_normal_exec:
|
||||||
Popen([realsvn] + argv, stdout=out).wait()
|
Popen([realsvn] + argv, stdout=out).wait()
|
||||||
if stdout_is_a_tty:
|
if using_pager:
|
||||||
out.close()
|
out.close()
|
||||||
pager_proc.wait()
|
pager_proc.wait()
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user