1. 10 Apr, 2021 1 commit
  2. 09 Apr, 2021 1 commit
    • Matt Harbison's avatar
      typing: add type hints to tortoisehg/hgqt/visdiff.py · b4c2c53d1349
      Matt Harbison authored
      There are a handful of `annotation-type-mismatch` suppressions for constructs
      like a function's Text arg being immediately overwritten with the bytes form of
      the argument.  This is an experimental diagnostic that needs to be explicitly
      enabled in pytype (for now), but such uses also seem to confuse PyCharm.  It
      does seem reasonable to overwrite the argument after converting between bytes
      and unicode, but one such overwrite at the end of the function wasn't as
      useful, so it has been elided away.
  3. 10 Apr, 2021 1 commit
  4. 07 Apr, 2021 1 commit
    • Matt Harbison's avatar
      thg: convert all `scmutil.revsymbol()` uses to `hglib.revsymbol()` · 710c0d416cbd
      Matt Harbison authored
      Since the function could theoretically return a workingctx, there are a couple
      places that need type assertions where attributes are accessed that are not on
      Additionally, pytype flagged the mq module for calling a function on the custom
      context subclass, so that is now suppressed.  I'm assuming these context
      subclass functions would be better off being unbound methods in a `contextutil`
      module or similar, because the hidden subclass is confusing the typing some
      times, and it's weird that some functions on a context return unicode.
  5. 31 Jul, 2020 1 commit
    • Matt Harbison's avatar
      cleanup: drop `procutil.quotecommand()` · 77c946f56861
      Matt Harbison authored
      This was dropped in hg 8e8fd938ca07 after py2.7.1 compat code was removed from
      it in hg 5258bffdb1d6, and it simply became an identity function.
      branch : stable
  6. 07 Feb, 2020 1 commit
  7. 04 Feb, 2020 1 commit
    • Matt Harbison's avatar
      visdiff: convert the tool command back to str before displaying in an error dlg · eb63baf582e8
      Matt Harbison authored
      The str cast is necessary, otherwise an AttributeError is raised saying (for
      example) that 'FileNotFoundError' object has no attribute 'decode'.  In testing
      this (by trying to `subprocess.Popen("NULL")`), the error dialog pops up with
      the title, but nothing else in the box.  The following message is printed in the
      terminal, and the whole process hangs:
          QObject::startTimer: Timers can only be used with threads started with QThread
      branch : stable
  8. 06 Feb, 2020 1 commit
  9. 04 Feb, 2020 4 commits
  10. 01 Feb, 2020 1 commit
  11. 15 Dec, 2019 1 commit
  12. 21 Mar, 2021 1 commit
  13. 10 Mar, 2021 1 commit
  14. 18 Nov, 2019 1 commit
  15. 15 Nov, 2019 1 commit
  16. 07 Sep, 2019 1 commit
  17. 11 Sep, 2019 1 commit
  18. 20 Sep, 2019 1 commit
  19. 11 Sep, 2019 1 commit
  20. 07 Sep, 2019 1 commit
    • kiilerix's avatar
      py3: fix visdiff.launchtool · f33d43f06d0a
      kiilerix authored
      Don't change that things are passed as byte string, but accept that the
      'replace' dict has system string as key so it can be created as 'dict()' with
      named parameters.
  21. 31 Aug, 2019 1 commit
  22. 25 Aug, 2019 1 commit
    • kiilerix's avatar
      assert: try to show some relevant value when an assert fails · 54976f208547
      kiilerix authored
      Debugging and print statements can tell more about failing asserts, but it is
      nice to get *some* information up front, also to make it easier to reproduce.
      General guidelines:
      Try to avoid anything that must compute something and thus can fail - try to
      just inspect local variables (or whatever assert looked at).
      For type related asserts, try to add repr().
      Sometimes, multiple variables are relevant - in that case use tuples.
  23. 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
        - `web.name` still takes a default because it is dynamicdefault
  24. 13 Jun, 2020 1 commit
    • Matt Harbison's avatar
      visdiff: account for the new `copies.branch_copies` class · 3fcde995dc6a
      Matt Harbison authored
      Double clicking any file in a merge commit that is a descendant of a commit with
      copies was triggering a crash dialog.  It didn't seem to happen in the original
      commit, or other merges in a private repo where the problem was discovered.
      branch : stable
  25. 19 May, 2019 1 commit
    • Matt Harbison's avatar
      py3: migrate unicode() to pycompat.unicode() · 6a0080d4e5a5
      Matt Harbison authored
      Fixed up after running `2to3 -w -n -f unicode .`, and re-adding the dropped u''
      prefixes.  The pycompat.unicode() hack is copied into setup.py because that
      module declares the dependency on mercurial.
  26. 14 Apr, 2019 1 commit
  27. 12 Apr, 2019 1 commit
  28. 24 Mar, 2019 1 commit
  29. 23 Mar, 2019 1 commit
  30. 08 Oct, 2018 1 commit
  31. 03 Oct, 2018 1 commit
    • Matt Harbison's avatar
      visdiff: use scmutil.revsymbol() to resolve --change · 2c8f85f3a8e7
      Matt Harbison authored
      I triggered this by accidentally double clicking a file in the shelved half of
      the shelf widget:
          Traceback (most recent call last):
            File "tortoisehg\hgqt\chunks.pyo", line 166, in vdiff
            File "tortoisehg\hgqt\visdiff.pyo", line 216, in visualdiff
            File "tortoisehg\hgqt\thgrepo.pyo", line 772, in __getitem__
            File "mercurial\localrepo.pyo", line 856, in __getitem__
            File "mercurial\context.pyo", line 439, in __init__
          ProgrammingError: unsupported changeid 'patch' of type <type 'str'>
      Now it pops up a message saying 'Unable to find changeset'.  Oddly, the value of
      --change in this case is 'patch', and I wasn't able to trigger this with visual
      branch : stable
  32. 26 May, 2018 2 commits
  33. 06 Dec, 2017 1 commit
  34. 25 Sep, 2016 1 commit
  35. 08 Dec, 2015 1 commit
  36. 11 Aug, 2015 1 commit
    • Matt Harbison's avatar
      visdiff: preserve the executable bit after editing a file · fbc4c289547c
      Matt Harbison authored
      I noticed on OS X that editing an executable shell script in visual diff would
      reset the file to 644 after saving.  The problem only occurred if a snapshot was
      required, e.g. if there was more than one file in the diff.  It looks like
      util.copyfile() preserves the mode when copying from $tmp back to wdir(), so it
      was just a matter of copying the mode when first creating the temp file.
      This code was ripped off from the extdiff extension prior to it switching to
      using archive, but I left out the symlink case since this code isn't using
      wopener.  Perhaps this should be switched to use archive as well, which would
      allow subrepo support.
      branch : stable