1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Angel Ezquerra  committed 1d4d97d

filedata: make getLog always return unicode

We always had to call hglib.tounicode with the getLog output, so it makes sense
to do it automatically within getLog.

  • Participants
  • Parent commits 51ca117
  • Branches default

Comments (0)

Files changed (1)

File tortoisehg/hgqt/filedata.py

View file
                                     opts['rev'][n] = rev[:-1]
                             commands.log(_ui, srepo, **opts)
                             logOutput += _ui.popbuffer()
-                        return logOutput
+                        return hglib.tounicode(logOutput)
 
                     opts = {'date':None, 'user':None, 'rev':[sfrom]}
                     subabspath = os.path.join(repo.root, subrelpath)
                                  + u'\n\n' + header
                         else:
                             try:
-                                subinfo = getLog(_ui, srepo, opts)
-                                slog = hglib.tounicode(subinfo)
+                                slog = getLog(_ui, srepo, opts)
                             except error.RepoError:
                                 header = _('[WARNING] Incomplete subrepo. '
                                    'Update to this revision to pull it.') \
                         sfromlog = _('changeset: %s') % sfrom[:12] + u'\n\n'
                         if not missingsub:
                             try:
-                                sfromlog = hglib.tounicode(getLog(_ui, srepo, opts))
+                                sfromlog = getLog(_ui, srepo, opts)
                             except error.RepoError:
                                 sfromlog = _('changeset: %s '
                                              '(not found on subrepository)') \
                                        '(not found on subrepository)') \
                                      % sto[:12] + u'\n\n'
                     out.append(header)
-                    out.append(hglib.tounicode(stolog))
+                    out.append(stolog)
 
                     if sfromlog:
-                        out.append(hglib.tounicode(sfromlog))
+                        out.append(sfromlog)
 
                     return out, sstatedesc