Read about our upcoming Code of Conduct on this issue

  1. 08 Dec, 2020 1 commit
  2. 17 Dec, 2020 2 commits
  3. 28 Nov, 2020 1 commit
  4. 15 Dec, 2020 1 commit
  5. 14 Dec, 2020 1 commit
    • Matt Harbison's avatar
      hook: set `HGPLAIN=1` for external hooks · 8fa87bce4929
      Matt Harbison authored
      External hooks will probably turn around and run hg commands, so this seems like
      a reasonable convenience for people who miss it in the documentation.
      
      There are no test changes because `printenv.py` filters out anything without a
      "HG_" prefix.  It wouldn't be a useful test anyway, because this is already
      inherited from the test environment.
      
      Differential Revision: https://phab.mercurial-scm.org/D9605
      8fa87bce4929
  6. 17 Dec, 2020 1 commit
    • Matt Harbison's avatar
      mergetools: alphabetize the config settings · ceaf1646f420
      Matt Harbison authored
      This will make it easier to identify differences with the TortoiseHg config
      file.  It was simply piped through `sort`, and then the spacing and comments
      restored into the proper place.  The `UltraCompare` config was positioned such
      that the sort is case insensitive- it's the only camelcase config in here.
      
      Differential Revision: https://phab.mercurial-scm.org/D9620
      ceaf1646f420
  7. 14 Dec, 2020 1 commit
  8. 12 Dec, 2020 1 commit
    • 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
  9. 12 Nov, 2020 1 commit
  10. 24 Nov, 2020 1 commit
  11. 23 Nov, 2020 1 commit
    • 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
  12. 10 Dec, 2020 3 commits
  13. 01 Dec, 2020 1 commit
  14. 11 Dec, 2020 3 commits
  15. 09 Dec, 2020 1 commit
    • 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
  16. 10 Dec, 2020 5 commits
  17. 09 Dec, 2020 3 commits
  18. 05 Dec, 2020 1 commit
  19. 03 Dec, 2020 1 commit
    • 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
  20. 08 Dec, 2020 1 commit
    • 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
  21. 09 Dec, 2020 1 commit
    • 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
  22. 07 Dec, 2020 1 commit
    • 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
  23. 10 Dec, 2020 2 commits
  24. 03 Dec, 2020 2 commits
  25. 02 Dec, 2020 2 commits
    • Pulkit Goyal's avatar
      dispatch: disable line ending normalization on sys.stdin if its None · 7e1b4154cdca
      Pulkit Goyal authored
      Fixes test-chg.t on python 3 with chg.
      
      Differential Revision: https://phab.mercurial-scm.org/D9501
      7e1b4154cdca
    • Pulkit Goyal's avatar
      procutils: don't try to get `.buffer` if sys.stdin is None · 81c1f5d1801f
      Pulkit Goyal authored
      While hunting down following test failure of test-chg.t on Python 3, I stumbled
      the case when `.buffer` is not available as sys.stdin is None.
      
      	--- /home/pulkit/repo/hg-committed/tests/test-chg.t
      	+++ /home/pulkit/repo/hg-committed/tests/test-chg.t.err
      	@@ -203,7 +203,31 @@
      	   $ CHGDEBUG=1 chg version -q 0<&-
      		 chg: debug: * stdio fds are missing (glob)
      	     chg: debug: * execute original hg (glob)
      		 -  Mercurial Distributed SCM * (glob)
      		 +  Traceback (most recent call last):
      		 +    File "/tmp/hgtests.avspvsq4/install/bin/hg", line 43, in <module>
      		 +      dispatch.run()
      		 +    File "/usr/lib/python3.6/importlib/util.py", line 233, in
      		 __getattribute__
      		 +      self.__spec__.loader.exec_module(self)
      		 +    File "<frozen importlib._bootstrap_external>", line 678, in
      		 exec_module
      		 +    File "<frozen importlib._bootstrap>", line 219, in
      		 _call_with_frames_removed
      		 +    File
      		 "/tmp/hgtests.avspvsq4/install/lib/python/mercurial/dispatch.py", line
      		 726, in <module>
      		 +      class lazyaliasentry(object):
      		 +    File
      		 "/tmp/hgtests.avspvsq4/install/lib/python/mercurial/dispatch.py", line
      		 737, in lazyaliasentry
      		 +      @util.propertycache
      		 +    File "/usr/lib/python3.6/importlib/util.py", line 233, in
      		 __getattribute__
      		 +      self.__spec__.loader.exec_module(self)
      		 +    File "<frozen importlib._bootstrap_external>", line 678, in
      		 exec_module
      		 +    File "<frozen importlib._bootstrap>", line 219, in
      		 _call_with_frames_removed
      		 +    File "/tmp/hgtests.avspvsq4/install/lib/python/mercurial/util.py",
      		 line 3473, in <module>
      		 +      f=procutil.stderr,
      		 +    File "/usr/lib/python3.6/importlib/util.py", line 233, in
      		 __getattribute__
      		 +      self.__spec__.loader.exec_module(self)
      		 +    File "<frozen importlib._bootstrap_external>", line 678, in
      		 exec_module
      		 +    File "<frozen importlib._bootstrap>", line 219, in
      		 _call_with_frames_removed
      		 +    File
      		 "/tmp/hgtests.avspvsq4/install/lib/python/mercurial/utils/procutil.py",
      		 line 127, in <module>
      		 +      stdin = sys.stdin.buffer
      		 +  AttributeError: 'NoneType' object has no attribute 'buffer'
      		 +  [1]
      
      		  server lifecycle
      		   ----------------
      
      Differential Revision: https://phab.mercurial-scm.org/D9500
      81c1f5d1801f
  26. 08 Dec, 2020 1 commit