Skip to content
Snippets Groups Projects
  1. Dec 14, 2020
  2. Dec 12, 2020
    • Jörg Sonnenberger's avatar
      revlog: support none compression · 84130fd74a22
      Jörg Sonnenberger authored
      revlog files had uncompressed revlog entries support since forever, but
      it wasn't selectable or exposed explicitly. It is occassionally useful
      for performance testing as it avoids the latency of zlib or zstd. It
      also has the nice side effect of providing a non-default compression
      engine out-of-the-box.
      
      Differential Revision: https://phab.mercurial-scm.org/D9572
      84130fd74a22
  3. Nov 12, 2020
  4. Nov 24, 2020
  5. Nov 23, 2020
    • Martin von Zweigbergk's avatar
      errors: raise InputError on early parse error in dispatch · db5dddb38f5b
      Martin von Zweigbergk authored
      I didn't think this would have any effect on the tests, but it does
      because the catching in `scmutil.callcatch()` still happens. That's
      because `dispatch` passes in the function that includes the parsing as
      an argument to that function.
      
      I initially used `ConfigError` here but Matt Harbison convinced me to
      use `InputError`. I think that makes sense since error is not in a
      config file.
      
      Differential Revision: https://phab.mercurial-scm.org/D9387
      db5dddb38f5b
  6. Nov 19, 2020
  7. Dec 10, 2020
  8. Dec 01, 2020
  9. Dec 14, 2020
  10. Dec 03, 2020
  11. Dec 11, 2020
  12. Dec 09, 2020
    • Martin von Zweigbergk's avatar
      mergetools: add new conflict marker format with diffs in · bdc2bf68f19e
      Martin von Zweigbergk authored
      I use 3-way conflict markers. Often when I resolve them, I manually
      compare one the base with one side and apply the differences to the
      other side. That can be hard when the conflict marker is large. This
      patch introduces a new type of conflict marker, which I'm hoping will
      make it easier to resolve conflicts.
      
      The new format uses `<<<<<<<` and `>>>>>>>` to open and close the
      markers, just like our existing 2-way and 3-way conflict
      markers. Instead of having 2 or 3 snapshots (left+right or
      left+base+right), it has a sequence of diffs. A diff looks like this:
      
      ```
      ------- base
      +++++++ left
       a
      -b
      +c
       d
      ```
      
      A diff that adds one side ("diff from nothing") has a `=======` header
      instead and does not have have `+` prefixed on its lines. A regular
      3-way merge can be viewed as adding one side plus a diff between the
      base and the other side. It thus has two ways of being represented,
      depending on which side is being diffed:
      
      ```
      <<<<<<<
      ======= left
      contents
      on
      left
      ------- base
      +++++++ right
       contents
       on
      -left
      +right
      >>>>>>>
      ```
      or
      ```
      <<<<<<<
      ------- base
      +++++++ left
       contents
       on
      -right
      +left
      ======= right
      contents
      on
      right
      >>>>>>>
      ```
      
      I've made it so the new merge tool tries to pick a version that has
      the most common lines (no difference in the example above).
      
      
      I've called the new tool "mergediff" to stick to the convention of
      starting with "merge" if the tool tries a regular 3-way merge.
      
      The idea came from my pet VCS (placeholder name `jj`), which has
      support for octopus merges and other ways of ending up with merges of
      more than 3 versions. I wanted to be able to represent such conflicts
      in the working copy and therefore thought of this format (although I
      have not yet implemented it in my VCS). I then attended a meeting with
      Larry McVoy, who said BitKeeper has an option (`bk smerge -g`) for
      showing a similar format, which reminded me to actually attempt this
      in Mercurial.
      
      Differential Revision: https://phab.mercurial-scm.org/D9551
      bdc2bf68f19e
  13. Dec 10, 2020
  14. Dec 09, 2020
  15. Dec 08, 2020
    • Matt Harbison's avatar
      hghave: update the check for virtualenv · 1b5e0d0bdb05
      Matt Harbison authored
      This started as `hghave --test-features` failing on Windows in `test-hghave.t`.
      IDK how this worked, as neither my Linux nor Windows machines have the old
      attribute with virtualenv 20.2.2, even on py2.  I think this was noticed
      recently because 357d8415aa27 mentioned an AttributeError, and mitigated by
      making this py2 only.  But as mentioned, this is also a problem on py2 (where
      the failure was observed).
      
      When I got this working by removing the attribute reference, the command in the
      test failed because the `--no-site-package` argument was removed some time ago.
      Therefore, this backs out 357d8415aa27 and references a known good attribute
      (which was done to suppress the warning about an unused import) that also
      ensures the command does not need the argument.  Since there appears to be
      (minor) broken stuff on py3, manually apply the `no-py3` guard that was backed
      out of the check itself.
      
      Differential Revision: https://phab.mercurial-scm.org/D9547
      1b5e0d0bdb05
  16. Dec 05, 2020
  17. Dec 03, 2020
    • Kyle Lippincott's avatar
      treemanifest: stop storing full path for each item in manifest._lazydirs · 93e09d370003
      Kyle Lippincott authored
      This information is obtainable, if needed, based on the lazydirs key (which is
      the entry name) and the manifest's `dir()` method.
      
      ### Performance
      
      This is actually both a memory and a performance improvement, but it's likely to
      be a very small one in most situations. In the pathological repo I've been using
      for testing other performance work I've done recently, this reduced the time for
      a rebase operation (rebasing two commits across a public-phase change that
      touches a sibling of one of my tracked directories where the common parent is
      massive (>>10k entries)):
      
      #### Before
      
      ```
        Time (mean ± σ):      4.059 s ±  0.121 s    [User: 0.9 ms, System: 0.6 ms]
        Range (min … max):    3.941 s …  4.352 s    10 runs
      ```
      
      #### After
      
      ```
        Time (mean ± σ):      3.707 s ±  0.060 s    [User: 0.8 ms, System: 0.8 ms]
        Range (min … max):    3.648 s …  3.818 s    10 runs
      ```
      
      Differential Revision: https://phab.mercurial-scm.org/D9553
      93e09d370003
  18. Dec 08, 2020
    • Matt Harbison's avatar
      extensions: avoid including `__index__` in the disabled extension list · 1ced08423d59
      Matt Harbison authored
      This generated module contains a dictionary of all bundled extension names and
      their help for builds that cannot enumerate extensions in the filesystem.
      
      The disabled list gets displayed in `hg help extensions`, and is also used by
      `setup.py` to populate `__index__.py` when building.  I haven't seen it sneak
      into either py2exe or PyOxidizer builds, but it does show up when running tests
      locally after having created an installer.
      
      Differential Revision: https://phab.mercurial-scm.org/D9544
      1ced08423d59
  19. Dec 09, 2020
    • Matt Harbison's avatar
      windows: continue looking at `%HOME%` for user config files with py3.8+ · 224af78021de
      Matt Harbison authored
      The `%HOME%` variable is explicitly called out in `hg help config` as a location
      that is consulted when reading user files, but python stopped looking at it
      when expanding '~' in py3.8+.[1]  Restore that old functionality by copying in
      the old implementation (and simplifying it to just use bytes).  It could be
      simplfied further, since only '~' is passed, but I'm not sure yet if we need to
      make this a generic utility function on Windows.  There are other uses of
      `os.path.expanduser()`, but this is the only case I know of that documents
      `%HOME%` usage.
      
      (The reason for removing it was that it typically isn't set, but it actually is
      set in MSYS and PowerShell, and `%HOME%` and `%USERPROFILE%` are different in
      MSYS.  I could be convinced to just replace all uses with this as a general
      utility, so we don't have to think too hard about BC.)
      
      [1] https://bugs.python.org/issue36264
      
      Differential Revision: https://phab.mercurial-scm.org/D9559
      224af78021de
    • Matt Harbison's avatar
      run-tests: configure the environment to expand `~` properly with Windows py38+ · 08fd76a553c9
      Matt Harbison authored
      This was causing tests to point to the actual home path on the system, not the
      test defined one.
      
      Differential Revision: https://phab.mercurial-scm.org/D9558
      08fd76a553c9
    • Matt Harbison's avatar
      run-tests: fix `HGTESTEXTRAEXTENSIONS` with py3 · af3a6900f893
      Matt Harbison authored
      Since `extensions` was a str and `section` bytes, it never populated anything.
      If it had, it would have put bytes into the environment dictionary that is all
      str.  As everything starts and ends as str, remove the incomplete attempt at
      byteification.  It doesn't appear that we had any test coverage of this bit of
      code, so also add a non-extension config to make sure it is filtered out
      properly.
      
      Differential Revision: https://phab.mercurial-scm.org/D9557
      af3a6900f893
  20. Dec 04, 2020
  21. Dec 07, 2020
    • Simon Sapin's avatar
      persistent-nodemap: properly ignore non-existent `.nd` data file · 8ff2d8359d0f
      Simon Sapin authored
      This code was meant to handle the case of a nodemap docket file
      pointing to a nodemap data file that doesn’t exist (anymore),
      but most likely caused an `UnboundLocalError` exception instead
      when `data` was used on the next line without being defined.
      
      This case is theoretically possible with a race condition
      between two hg processes, but is hard to reproduce or test:
      
      * Process A reads a docket file and finds a UID in it
        that points to a given data file name.
      * Process B decides that this same data file needs compacting.
        It writes a new one with a different UID,
        overwrites the docket file,
        then removes the old data file.
      * Only then process A tries to a open a file that doesn’t exist anymore.
      
      Differential Revision: https://phab.mercurial-scm.org/D9533
      8ff2d8359d0f
  22. Dec 10, 2020
Loading