Error when using File History

Issue #4906 open
Jean-Pierre Bordes
created an issue

!python

** Mercurial version (4.3.2).  TortoiseHg version (4.3.1+147-3e1da5d95185)
** Command: 
** CWD: /Users/jpb
** Encoding: UTF-8
** Extensions loaded: strip, mq, purge, rebase, histedit
** Python version: 2.7.14 (default, Sep 25 2017, 09:53:22) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]
** System: Darwin Jeans-MacBook-Air.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
** Qt-5.9.1 PyQt-5.9 QScintilla-2.10.1
Traceback (most recent call last):
  File "/Users/jpb/Documents/Uhnder/Bitbucket/thg/tortoisehg/hgqt/fileview.py", line 1117, in _onAnnotateFinished
    for l in data[0]['lines']:
KeyError: 'lines'

Comments (7)

  1. Sebastián Marró

    Hi, i have same error:

    ** Mercurial version (4.6).  TortoiseHg version (4.6+32-679c3a080e06)
    ** Command: log
    ** CWD: /media/sebastian/SOURCE/src/sanjorge/modules_extra
    ** Encoding: UTF-8
    ** Extensions loaded: strip, mq, tortoisehg.util.configitems
    ** Python version: 2.7.15 (default, May  1 2018, 05:55:50) [GCC 7.3.0]
    ** System: Linux sebanote 4.15.0-3-amd64 #1 SMP Debian 4.15.17-1 (2018-04-19) x86_64
    ** Qt-5.10.1 PyQt-5.10.1 QScintilla-2.10.4
    Traceback (most recent call last):
      File "/media/sebastian/SOURCE/workspace/tortoisehg/tortoisehg/hgqt/fileview.py", line 1120, in _onAnnotateFinished
        for l in data[0]['lines']:
    KeyError: 'lines'
    

    I executed hg verify and all seems ok: checking changesets checking manifests crosschecking files in changesets and manifests checking files 1008 files, 1435 changesets, 4173 total revisions

  2. Yuya Nishihara

    Can you attach an output of the following command?

    hg annotate -Tjson -rREV FILE
    

    (REV and FILE is the revision and the file to annotate)

    Mask out sensitive contents as needed.

  3. Sebastián Marró

    Did the same with other repository and have same error:

    ** Mercurial version (4.6).  TortoiseHg version (4.6+32-679c3a080e06)
    ** Command: log
    ** CWD: /media/sebastian/SOURCE/src/kalenis/sandbox/kalenislims
    ** Encoding: UTF-8
    ** Extensions loaded: strip, mq, tortoisehg.util.configitems
    ** Python version: 2.7.15 (default, May  1 2018, 05:55:50) [GCC 7.3.0]
    ** System: Linux sebanote 4.15.0-3-amd64 #1 SMP Debian 4.15.17-1 (2018-04-19) x86_64
    ** Qt-5.10.1 PyQt-5.10.1 QScintilla-2.10.4
    Traceback (most recent call last):
      File "/media/sebastian/SOURCE/workspace/tortoisehg/tortoisehg/hgqt/fileview.py", line 1120, in _onAnnotateFinished
        for l in data[0]['lines']:
    KeyError: 'lines'
    

    I'm attaching the output of hg annotate for that repository

  4. Yuya Nishihara

    Appears that you're using incompatible hg version. Check hg version and thg version.

    If you have multiple hg binaries installed, you might have to specify the right one by HG environment variable.

  5. Sebastián Marró

    Indeed, i had an old mercurial version 3.6 in /usr/local/bin making conflict with my debian package 4.6 version. Removed old version and everything works fine. Thank you and sorry.

  6. Log in to comment