ejwa / gitinspector

:bar_chart: The statistical analysis tool for git repositories
GNU General Public License v3.0
2.36k stars 327 forks source link

Heavily garbled text output #101

Closed yarikoptic closed 8 years ago

yarikoptic commented 8 years ago

E.g. looking at fail2ban repository (gitinspector 0.4.3 from debian) result of running these commands:

 git clone git://github.com/fail2ban/fail2ban
 cd fail2ban
 gitinspector --grading

looks like

$ git clone git://github.com/Checking how many rows belong to each author (Progress): 57%
Author                     Rows      Stability          Age       % in commentss belong to each author (ProgresArtur Penttinen               1           14.3        145.1              100.00        Checking how many rows bArturo 'Buanzo' Busl         22           42.3        331.1               27.27
Chris Reffett                 2          100.0        191.9                0.00
Cyril Jaquier              3970           35.0        361.3               39.19(Progress): 57%
Daniel Black               1024           57.7        113.1                8.69y rows belong to each author (PrDaniel Schaal                15          100.0         68.1                6.67             Checking how many rDavid Engeset                29           55.8        165.0               27.59
Enrico Labedzki               1            2.8        140.1              100.00files/
Hank Leininger               39          100.0         94.3                0.00thor (Progress): 56%
Konstantin Manna              1          100.0         22.1                0.00w many rows belong to each authoLee Clemens                 718           60.3         69.1               10.17setup.cfg         Checking how mLeonardo Chiquitto           62          140.9        215.0              100.00setup.py*
M. Maraun                     1           50.0         26.4                0.00
Markos Chandras               1           33.3        215.4                0.00ch author (Progress): 55%
Nicolas Collignon            17           81.0        143.9               23.53ng how many rows belong to each Orion Poplawski               8          100.0        113.6                0.00tory:                  Checking Pascal Borreli                5           71.4        147.1              100.00
Ruben Kerkhof                 9          112.5         93.0               44.44%
Sean DuBois                  10           90.9         77.4                0.00to each author (Progress): 54%
Serg G. Brester            1156           64.4         39.7                9.17hecking how many rows belong to Steven Hiscocks            6163           62.4        113.6               11.65                            ChecTeubel György                 4           80.0         48.0                0.00
Tom Hendrikx                  1           50.0        217.0                0.00): 53%
Ville Skyttä                  2          100.0         16.1              100.00long to each author (Progress): Yaroslav Halchenko         2564           72.5        142.0               22.54    Checking how many rows belonpacop                         1          100.0         79.0                0.00
KChecking how many rows belong to each author (Progress): 52% 1            0.00
The following history timeline has been gathered from the repository:uthor (Progress): 52%
Leonardo Chiquitto               1            44           Checking how many rows belong to each author (ProgreAuthor                  2004W41    2004W42    2004W43    2004W45    2004W47    2005W07    2005W08    2005W09 s Cyril Jaquier          ++++++++   --++++++   -+++++++   -+++++++   ----++++  ----+++++   -+++++++   --++++++ 
Modified Rows:              475        692         14         83          2  
...
yarikoptic commented 8 years ago

more info -- what is happening is that my terminal size is 111x53 and progressbar indicator from gitinspector starts to climb up ruining previous lines in various spots and even climbs higher than original point where gitinspector was executed

adam-waldenberg commented 8 years ago

What terminal and shell is this under? I recently changed the behavior of how the progress bar is outputted (using \r). Could you try the master branch version and see if there is a difference?

yarikoptic commented 8 years ago

Was a released version as shipped in debian proper (the latest release). I will check later today the master

On January 19, 2016 3:38:50 AM EST, Adam Waldenberg notifications@github.com wrote:

What system is this under? Are you running the master branch or one of the releases? I recently changed the behavior of how the progress bar is outputted (using \r).


Reply to this email directly or view it on GitHub: https://github.com/ejwa/gitinspector/issues/101#issuecomment-172776087

yarikoptic commented 8 years ago

with master 6.20160114-57-gdaf852e the issue is better but not fixed fully:

(venv)                                                                          Statistical information for the repository 'git-annex' was gathered on 2016/01/19.
The following historical commit information, by author, was found:                                             

Author                     Commits    Insertions      Deletions    % of changes
Joey Hess                       83        130395           4338           77.36
Sören Brunk           Below are the number of rows from each author that have survived and are still intact in the current revision:

Author                     Rows      Stability          Age       % in comments
Joey Hess                  5140            3.9         34.6                7.53
Sören Brunk                8883           43.7         18.4               18.09

As you can see that "Below" injection I have reported in #102 and then "Statistical information ..." one sitting 1 line above where original shell prompt was

adam-waldenberg commented 8 years ago

Ok. I'm guessing this is a terminal and/or shell issue. I run Debian myself and have no issue. What terminal and shell are you using? With that, I may be able to reproduce it and create a workaround.

yarikoptic commented 8 years ago

Zsh under urxvt. I will check home in different shell/terminal

On January 20, 2016 1:54:27 PM EST, Adam Waldenberg notifications@github.com wrote:

Ok. I'm guessing this is a terminal and/or shell issue. I run Debian myself and have no issue. What terminal and shell are you using? I may then be able to reproduce it and create a workaround.


Reply to this email directly or view it on GitHub: https://github.com/ejwa/gitinspector/issues/101#issuecomment-173323560

adam-waldenberg commented 8 years ago

I just tried rxvt with bash; same problem. It breaks in this terminal. At least the progress bar updates correctly.

The culprit is the terminal.clear_row() function which seems to break in this terminal. It looks like this terminal parses the \b (backspace) code beyond column zero on the current line and jumps up to the previous line.

I'll see if I can solve this differently in order not to break things in this terminal.

adam-waldenberg commented 8 years ago

Done. The fix above should resolve it.