1. 23 Aug, 2019 1 commit
    • Matt Harbison's avatar
      configitems: drop the default parameters for registered items · 2cd812a72398
      Matt Harbison authored
      A couple of notable things:
      
        - `tortoisehg.autoresolve` still gets a default value in backout and rebase,
          even though it is not registered dynamicdefault.
      
        - the following were left with '' as the default, because it is used to set
          text with a QString, and it is unknown how far back None would be accepted.
          (Any other '' -> None conversions are not used to set text)
      
          * email.cc
          * email.to
          * gpg.key
          * hostfingerprints.*  (strange the default here is a list)
      
        - `tortoisehg.overlayicons` in nautilus-thg needs to be registered, as does
          `debug.delaylock`.
      
        - `web.name` still takes a default because it is dynamicdefault
      2cd812a72398
  2. 25 Aug, 2019 1 commit
  3. 21 Aug, 2019 1 commit
    • kiilerix's avatar
      app: disable bug reporter dialog when using --traceback · 0a165fc4638e
      kiilerix authored
      The user-friendly bug reporter dialog is user-friendly, but is sometimes
      annoying during development - it require extra interaction, and doesn't leave a
      backlog of previous errors on the console. Sometimes, a stack trace on the
      console and termination is preferable.
      
      The existing thg --traceback mimics hg --traceback and sets the Mercurial
      ui.traceback flag that in some cases might make Mercurial show more verbose
      errors. It seems reasonable that thg --traceback also make thg show tracebacks
      on the console and terminate without using the bug reporter dialog.
      
      To implement this, introduce a config setting:
      
        [tortoisehg]
        traceback = on
      
      and let thg --traceback set it True.
      0a165fc4638e
  4. 22 Aug, 2019 2 commits
  5. 21 Aug, 2019 3 commits
  6. 20 Aug, 2019 1 commit
  7. 19 Aug, 2019 2 commits
    • kiilerix's avatar
      py3: fix crash in copydynamicconfig on .hgrc modification · 3ac8abd33d60
      kiilerix authored
      Fix
          Traceback (most recent call last):
            File ".../tortoisehg/hgqt/thgrepo.py", line 518, in _onConfigChanged
              self._repo.invalidateui()
            File ".../tortoisehg/hgqt/thgrepo.py", line 945, in invalidateui
              hglib.copydynamicconfig(origui, self.ui)
            File ".../tortoisehg/util/hglib.py", line 643, in copydynamicconfig
              if ':' in source:
          TypeError: a bytes-like object is required, not 'str'
      3ac8abd33d60
    • kiilerix's avatar
      py3: fix bytes in About window's "License" button · efd600470dd8
      kiilerix authored
      Fix
            File ".../tortoisehg/hgqt/about.py", line 222, in __init__
              self.lic_txt.setPlainText(lic)
          TypeError: setPlainText(self, str): argument 1 has unexpected type 'bytes'
      efd600470dd8
  8. 20 Aug, 2019 2 commits
    • kiilerix's avatar
      py3: pass "initial selection" as bytes · 50dafd8dcd76
      kiilerix authored
      Fix
        File ".../tortoisehg/hgqt/repomodel.py", line 672, in defaultIndex
          rev = repo[changeid].rev()
        File ".../tortoisehg/hgqt/thgrepo.py", line 773, in __getitem__
          changectx = super(thgrepository, self).__getitem__(changeid)
        File "...hgext/largefiles/reposetup.py", line 47, in __getitem__
          ctx = super(lfilesrepo, self).__getitem__(changeid)
        File "...mercurial/localrepo.py", line 1430, in __getitem__
          (changeid, type(changeid)))
      TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'str'
      50dafd8dcd76
    • kiilerix's avatar
      py3: commit messages are bytes · 2341f053f05f
      kiilerix authored
      Fix:
        File ".../tortoisehg/hgqt/revpanel.py", line 53, in revline_data
          return str(ctx.rev()), str(ctx), summary_line(desc), hl, branch
        File ".../tortoisehg/hgqt/revpanel.py", line 48, in summary_line
          return hglib.longsummary(desc.replace('\0', ''))
      TypeError: a bytes-like object is required, not 'str'
      2341f053f05f
  9. 15 Aug, 2019 2 commits
  10. 18 Aug, 2019 1 commit
    • kiilerix's avatar
      py3: basenode as XML attribute must be written as string · 434e830ef49a
      kiilerix authored
      Fix:
        File .../tortoisehg/hgqt/repotreeitem.py, line 350, in dump
          xw.writeAttribute('basenode', node.hex(self.basenode()))
      TypeError: arguments did not match any overloaded call:
        writeAttribute(self, str, str): argument 2 has unexpected type 'bytes'
        writeAttribute(self, str, str, str): argument 2 has unexpected type 'bytes'
        writeAttribute(self, QXmlStreamAttribute): argument 1 has unexpected type 'str'
      434e830ef49a
  11. 20 Aug, 2019 1 commit
    • kiilerix's avatar
      py3: fix how _ui.py files are generated from Qt .ui files · ef4916ffa013
      kiilerix authored
      Just do like the original qtproxies class and use their as_string.
      
      Avoid crash on "unknown encoding: string-escape" or generating strings like
        'b'Foo''
      
      "python3 setup.py build" now pass "running build_ui" (but fails in
      "running build_mo").
      ef4916ffa013
  12. 18 Aug, 2019 4 commits
  13. 15 Aug, 2019 2 commits
    • kiilerix's avatar
      py3: flags are bytes · 99fe1ce935aa
      kiilerix authored
      Because for example:
        File ".../tortoisehg/hgqt/filedata.py", line 295, in _readStatus
          if (wfile in ctx and 'l' in ctx.flags(wfile)) or \
      TypeError: a bytes-like object is required, not 'str'
      99fe1ce935aa
    • kiilerix's avatar
      py3: defaults for file names must be bytes too · b38e6c0d4665
      kiilerix authored
      Fix for example:
        File ".../tortoisehg/hgqt/filedata.py", line 170, in filePath
          return hglib.tounicode(posixpath.join(self._rpath, self._wfile))
      ...
      TypeError: Can't mix strings and bytes in path components
      b38e6c0d4665
  14. 18 Aug, 2019 1 commit
  15. 15 Aug, 2019 1 commit
  16. 18 Aug, 2019 2 commits
    • kiilerix's avatar
      py3: pass byte string constants to vfs join methods · 325fe759c1d4
      kiilerix authored
      Avoid mercurial vfs layer ending up with:
          raise TypeError("Can't mix strings and bytes in path components")
      325fe759c1d4
    • kiilerix's avatar
      py3: default 'workbench' alias must be bytes too · c93aa21ad1dc
      kiilerix authored
      Fix:
        File ".../tortoisehg/hgqt/run.py", line 298, in _parse
          aliases, i = cmdutil.findcmd(alias, table, ui.config(b"ui", b"strict"))
        File "...mercurial/cmdutil.py", line 676, in findcmd
          choice, allcmds = findpossible(cmd, table, strict)
        File "...mercurial/cmdutil.py", line 660, in findpossible
          if a.startswith(cmd):
      TypeError: startswith first arg must be bytes or a tuple of bytes, not str
      c93aa21ad1dc
  17. 14 Aug, 2019 1 commit
    • kiilerix's avatar
      py3: fix 'setup.py build' crashing in msgfmt · 9ecaafe41b98
      kiilerix authored
      In Python3, read the .po file as unicode strings, but make sure the binary
      encoding is done using bytes.
      
      This operation is usually run at build time, and only working on translations
      stored in the repository at build time - not exposed to any user content.
      
      With this, "setup.py build" passes, both with python2 and python3.
      9ecaafe41b98
  18. 18 Aug, 2019 12 commits