aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/commands/log.py
diff options
context:
space:
mode:
Diffstat (limited to 'MgaRepo/commands/log.py')
-rw-r--r--MgaRepo/commands/log.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/MgaRepo/commands/log.py b/MgaRepo/commands/log.py
index 6d742de..2181125 100644
--- a/MgaRepo/commands/log.py
+++ b/MgaRepo/commands/log.py
@@ -1,3 +1,4 @@
+#!/usr/bin/python
from MgaRepo import config, mirror, disable_mirror
from MgaRepo.command import *
from MgaRepo.layout import package_url, checkout_url
@@ -5,8 +6,6 @@ from MgaRepo.rpmutil import sync
from MgaRepo.util import execcmd
import sys
import os
-import subprocess
-import shlex
HELP = """\
Usage: mgarepo log [OPTIONS] [PACKAGE]
@@ -58,13 +57,9 @@ def svn_log(pkgdirurl, verbose=False, limit=None, revision=None, releases=None):
args.append("-r")
args.append(revision)
if os.isatty(sys.stdin.fileno()):
- pager = shlex.split(os.environ.get("PAGER", "less"))
- p = subprocess.Popen(args, stdout=subprocess.PIPE)
- p2 = subprocess.Popen(pager, stdin=p.stdout)
- p2.wait()
- p.wait()
- else:
- execcmd(args, show=True)
+ args.append("| less")
+ rawcmd = " ".join(args)
+ execcmd(rawcmd, show=True)
def main():
do_command(parse_options, svn_log)