Skip to content
Snippets Groups Projects
  1. Feb 10, 2021
    • Pierre-Yves David's avatar
      tweak-default: no longer enable the experimental return code · 839cacdf
      Pierre-Yves David authored
      The change is quite new and undocumented (since it is experimental) so it seems
      premature to make it available in tweak default. In addition, I am not sure the
      new return code are frozen yet (eg: some of the initial feedback have not been
      incorporated). Before the release I doubled check (probably with Martin) that
      they were not enabled by default and got replied that they were only enabled in
      the tests. Have I been aware that they have been also enabled in tweak default I
      would I have lobbied to delay that.
      
      I discovered they were in tweak default from users feedback. They found it an
      unpleasant and unexpected surprise of 5.7.
      
      So I suggest we no enable enable this experimental feature for Mercurial 5.7 and
      revisit this later, when the feature will be more mature.
      
      Differential Revision: https://phab.mercurial-scm.org/D9975
      839cacdf
  2. Feb 09, 2021
  3. Jan 18, 2021
  4. Feb 04, 2021
    • Jordi Gutiérrez Hermoso's avatar
      largefiles: properly pass kwargs into url.open · 32da5891
      Jordi Gutiérrez Hermoso authored
      The url.open function has acquired a lot of kwargs over the years.
      When running `hg import http://example.com/hg/diff/1`, since at least
      a708e1e4d7a8 in March, 2018, the calling sites for url.open try to
      pass a `sendaccept` parameter that largefiles' override doesn't accept.
      
      Currently that stack traces something like this:
      
        Traceback (most recent call last):
          File "/tmp/hgtests.sv744r5t/install/bin/hg", line 59, in <module>
            dispatch.run()
          File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 143, in run
            status = dispatch(req)
          File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 245, in dispatch
            status = _rundispatch(req)
          File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 289, in _rundispatch
            ret = _runcatch(req) or 0
          File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 465, in _runcatch
            return _callcatch(ui, _runcatchfunc)
          File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 475, in _callcatch
            return scmutil.callcatch(ui, func)
          File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/scmutil.py", line 155, in callcatch
            return func()
          File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 455, in _runcatchfunc
            return _dispatch(req)
          File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 1259, in _dispatch
            lui, repo, cmd, fullargs, ui, options, d, cmdpats, cmdoptions
          File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 913, in runcommand
            ret = _runcommand(ui, options, cmd, d)
          File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 1270, in _runcommand
            return cmdfunc()
          File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 1256, in <lambda>
            d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
          File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/util.py", line 1867, in check
            return func(*args, **kwargs)
          File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/commands.py", line 4184, in import_
            patchfile = hg.openpath(ui, patchurl, sendaccept=False)
          File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/hg.py", line 181, in openpath
            return url.open(ui, path, sendaccept=sendaccept)
        TypeError: openlargefile() got an unexpected keyword argument 'sendaccept'
      
      So, just accept and pass along any kwargs of the overridden function.
      32da5891
    • Yuya Nishihara's avatar
  5. Feb 02, 2021
  6. Jan 29, 2021
  7. Feb 01, 2021
  8. Jan 27, 2021
    • Kyle Lippincott's avatar
      wix: tell ComponentSearch that it is finding a directory (not a file) · 8deab876
      Kyle Lippincott authored
      This is to fix an issue we've noticed where fresh installations start at
      `C:\Program Files\Mercurial`, and then upgrades "walk up" the tree and end up in
      `C:\Program Files` and finally `C:\` (where they stay).
      
      ComponentSearch defaults to finding files, which I think means "it produces a
      string like `C:\Program Files\Mercurial`", whereas with the type being
      explicitly a directory, it would return `C:\Program Files\Mercurial\` (note the
      final trailing backslash). Presumably, a latter step then tries to turn that
      file name into a proper directory, by removing everything after the last `\`.
      
      This could likely also be fixed by actually searching for the component for
      hg.exe itself. That seemed a lot more complicated, as the GUID for hg.exe isn't
      known in this file (it's one of the "auto-derived" ones). We could also consider
      adding a Condition that I think could check the Property and ensure it's either
      empty or ends in a trailing slash, but that would be an installer runtime check
      and I'm not convinced it'd actually be useful.
      
      This will *not* cause existing installations that are in one of the bad
      directories to fix themselves. Doing that would require a fair amount more
      understanding of wix and windows installer than I have, and it *probably*
      wouldn't be possible to be 100% correct about it either (there's nothing
      preventing a user from intentionally installing it in C:\, though I don't know
      why they would do so).
      
      If someone wants to tackle fixing existing installations, I think that the first
      installation is actually the only one that shows up in "Add or Remove Programs",
      and that its registry keys still exist. You might be able to find something
      under HKEY_USERS that lists both the "good" and the "bad" InstallDirs. Mine was
      under `HKEY_USERS\S-1-5-18\Software\Mercurial\InstallDir` (C:\), and
      `HKEY_USERS\S-1-5-21-..numbers..\Software\Mercurial\InstallDir` (C:\Program
      Files\Mercurial). If you find exactly two, with one being the default path, and
      the other being a prefix of it, the user almost certainly hit this bug :D
      
      We had originally thought that this bug might be due to unattended
      installations/upgrades, but I no longer think that's the case. We were able to
      reproduce the issue by uninstalling all copies of Mercurial I could find,
      installing one version (it chose the correct location), and then starting the
      installer for a different version (higher or lower didn't matter). I did not
      need to deal with an unattended or headless installation/upgrade to trigger the
      issue, but it's possible that my system was "primed" for this bug to happen
      because of a previous unattended installation/upgrade.
      
      Differential Revision: https://phab.mercurial-scm.org/D9891
      8deab876
    • Matt Harbison's avatar
      copyright: update to 2021 · ed43b6fa
      Matt Harbison authored
      Differential Revision: https://phab.mercurial-scm.org/D9885
      ed43b6fa
  9. Jan 28, 2021
  10. Jan 25, 2021
  11. Jan 08, 2021
  12. Jan 22, 2021
  13. Jan 20, 2021
  14. Jan 19, 2021
  15. Jan 18, 2021
  16. Jan 15, 2021
  17. Jan 18, 2021
    • Pulkit Goyal's avatar
      share: rework config options to be much clearer and easier · 25be21ec
      Pulkit Goyal authored
      Recently I implemented various boolean configs which control how to behave when
      there is a share-safe mismatch between source and share repository. Mismatch
      means that source supports share-safe where as share does not or vice versa.
      
      However, while discussion and documentation we realized that it's too
      complicated and there are some combinations of values which makes no sense.
      
      We decided to introduce a config option with 4 possible values which
      makes controlling and understanding things easier.
      
      The config option `share.safe-mismatch.source-{not-}safe` can have
      following 4 values:
      
      * abort (default): error out if there is mismatch
      * allow: allow to work with respecting share source configuration
      * {up|down}grade-abort: try to {up|down}grade, if it fails, abort
      * {up|down}grade-allow: try to {up|down}grade, if it fails, continue in allow
      mode
      
      
      I am not sure if I can explain 3 config options which I deleted right now in
      just 5 lines which is a sign of how complex they became.
      
      No test changes demonstrate that functionality is same, only names have changed.
      
      Differential Revision: https://phab.mercurial-scm.org/D9785
      25be21ec
  18. Jan 14, 2021
  19. Jan 18, 2021
  20. Jan 14, 2021
  21. Jan 18, 2021
Loading