8 """ |
8 """ |
9 |
9 |
10 from __future__ import unicode_literals |
10 from __future__ import unicode_literals |
11 |
11 |
12 import os |
12 import os |
13 import sys |
|
14 |
13 |
15 import pysvn |
14 import pysvn |
16 |
15 |
17 from PyQt5.QtCore import QMutexLocker, Qt |
16 from PyQt5.QtCore import QMutexLocker, Qt |
18 from PyQt5.QtWidgets import QHeaderView, QDialog, QDialogButtonBox, \ |
17 from PyQt5.QtWidgets import QHeaderView, QDialog, QDialogButtonBox, \ |
76 annotations = self.client.annotate(fname) |
75 annotations = self.client.annotate(fname) |
77 locker.unlock() |
76 locker.unlock() |
78 for annotation in annotations: |
77 for annotation in annotations: |
79 author = annotation["author"] |
78 author = annotation["author"] |
80 line = annotation["line"] |
79 line = annotation["line"] |
81 if sys.version_info[0] == 2: |
|
82 author = author.decode('utf-8') |
|
83 line = line.decode('utf-8') |
|
84 self.__generateItem( |
80 self.__generateItem( |
85 annotation["revision"].number, author, |
81 annotation["revision"].number, author, |
86 annotation["number"] + 1, line) |
82 annotation["number"] + 1, line) |
87 except pysvn.ClientError as e: |
83 except pysvn.ClientError as e: |
88 locker.unlock() |
84 locker.unlock() |