mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-09-30 03:11:29 +02:00
The blame module now only shows progress in text format output.
This commit is contained in:
parent
77111094b6
commit
e4a1b6ea15
3
blame.py
3
blame.py
@ -21,6 +21,7 @@ from __future__ import print_function
|
|||||||
from changes import FileDiff
|
from changes import FileDiff
|
||||||
import comment
|
import comment
|
||||||
import filtering
|
import filtering
|
||||||
|
import format
|
||||||
import missing
|
import missing
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import re
|
import re
|
||||||
@ -103,7 +104,7 @@ class Blame:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def output_progress(pos, length):
|
def output_progress(pos, length):
|
||||||
if sys.stdout.isatty():
|
if sys.stdout.isatty() and format.is_interactive_format():
|
||||||
terminal.clear_row()
|
terminal.clear_row()
|
||||||
print("\bChecking how many rows belong to each author (Progress): {0:.0f}%".format(100 * pos / length), end="")
|
print("\bChecking how many rows belong to each author (Progress): {0:.0f}%".format(100 * pos / length), end="")
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
@ -34,6 +34,10 @@ def select(format):
|
|||||||
|
|
||||||
return format in __available_formats__
|
return format in __available_formats__
|
||||||
|
|
||||||
|
def is_interactive_format():
|
||||||
|
global __selected_format__
|
||||||
|
return __selected_format__ == "text"
|
||||||
|
|
||||||
def output_header():
|
def output_header():
|
||||||
if __selected_format__ == "html":
|
if __selected_format__ == "html":
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user