Skip to content
Snippets Groups Projects
  1. Nov 12, 2022
    • Pierre-Yves David's avatar
      profile: prevent a crash when line number is unknown · aab3d4c0
      Pierre-Yves David authored
      For some unknown reason, `self.lineno` can be None. The previous code crashed in
      such case, we now ignore the case, as we do for other error in this function.
      
      We also fallback to using `-1` in the output when this lack of line number
      makes it to the display code.
      
      The reason of unknown line-numbers is… unknown.
      aab3d4c0
  2. Nov 06, 2022
    • Matt Harbison's avatar
      upgrade: byteify requirement changes written to output · d1244676
      Matt Harbison authored
      ui.write() expects bytes, and internally uses `b''` as the default when getting
      the `label` keyword from `*args`.  So either we're missing test coverage, or
      there's some very subtle conversion from unicode somewhere.
      
      Also, slip in a type hint to flag this in the future.
      d1244676
  3. Nov 03, 2022
  4. Oct 16, 2022
    • Pierre-Yves David's avatar
      perf-unbundle: do a quick and dirty fix to make it run on more commit · 27bff608
      Pierre-Yves David authored
      Without this change, the perf commands fails within the
      f67741e8264b::18415fc918a1 range (boundary excluded).
      
      Check inline comment for details.
      
      With this fix, the command is able to run on this range, with a slightly
      different behavior (as no revset is "uninlined"). However this is still much
      better than not being able to run anything in this range. Especially because
      that range do see some performance regression for unbundle.
      27bff608
  5. Oct 18, 2022
  6. Oct 19, 2022
  7. Nov 03, 2022
    • Raphaël Gomès's avatar
      rhg: fallback when encountering ellipsis revisions · 7787174f
      Raphaël Gomès authored
      Ellipsis revisions are still experimental and buggy in non-trivial
      histories. We currently have no plans to improve this situation nor
      to add support for ellipsis revisions in `rhg`.
      
      Falling back should be done carefully (since we may have already done
      some work that is visible to the user), but in this case it's highly
      unlikely that we're doing anything useful with a repo with ellipsis
      revisions, so this should be strictly better, also since the
      error message is more explicit.
      7787174f
  8. Nov 02, 2022
  9. Nov 03, 2022
  10. Oct 19, 2022
  11. Sep 22, 2022
  12. Nov 04, 2022
    • Pierre-Yves David's avatar
      upgrade: no longer keep all revlogs in memory at any point · 19948429
      Pierre-Yves David authored
      Keeping all object open is unsustainable, so we will open them on demand. This
      mean opening them multiple times, but this is a lesser evil.
      
      Each revlog consume a small amount of memory (index content, associated nodemap,
      etc). While there are few "big" revlog, the sheer amount of small filelog can
      become a significant issue memory wise, consuming multiple GB of memory.  If you
      combines this extra usage with the use of multiprocessing, this usage can
      quickly get out of control. This can effectively block the upgrade of larger
      repository. This changeset fixes this issue.
      19948429
  13. Nov 02, 2022
    • Matt Harbison's avatar
      demandimport: convert ignored modules from bytes -> str in extensions · 5f22c92d
      Matt Harbison authored
      The default list of ignored modules are str, and test for bypassing the lazy
      import is `module.__name__ in ignores`, so these were effectively NOT ignored.
      Most of these date back to the grand byteification in 687b865b95ad, with some
      subsequent additions that followed the existing example.
      
      I have no idea if these modules in fact need to bypass lazy importing, but at
      least it follows the intent of the code.
      5f22c92d
  14. Oct 26, 2022
  15. Nov 04, 2022
    • Raphaël Gomès's avatar
      dirstate-v2: update constant that wasn't kept in sync · 5743e19b
      Raphaël Gomès authored
      Despite the best efforts of the comment, this constant wasn't kept in sync
      when the flags were being rewritten.
      
      The fact that this doesn't actually break anything in the Rust implementation
      too much (which does use directories) relies on the fact that all nodes
      can have children and that dirstate traversal is not based on that flag, but
      for metadata in optimizations. However the bug could become more serious should
      we start encoding stronger guarantees using a combination of flags including
      this one.
      5743e19b
  16. Oct 18, 2022
    • Matt Harbison's avatar
      lfs: avoid closing connections when the worker doesn't fork · 3556f039
      Matt Harbison authored
      Probably not much more than an minor optimization, but could be useful in the
      case of `hg verify` where missing blobs are fetched one at a time.
      3556f039
    • Matt Harbison's avatar
      lfs: fix blob corruption when tranferring with workers on posix · abf47186
      Matt Harbison authored
      The problem seems to be that the connection used to request the location of the
      blobs is sitting in the connection pool, and then when workers are forked, they
      all see and attempt to use the same connection.  This garbles everything.  I
      have no clue how this ever worked reliably (but it seems to, even on Linux, with
      SCM Manager 1.58).  See previous discussion when worker support was added[1].
      
      It shouldn't be a problem on Windows, since the workers are just threads in the
      same process, and can see which connections are marked available and which are
      in use.  (The fact that `mercurial.keepalive.ConnectionManager.set_ready()`
      doesn't acquire a lock does give me some pause though.)
      
      [1] https://phab.mercurial-scm.org/D1568#31621
      abf47186
    • Matt Harbison's avatar
      keepalive: add `__repr__()` to the HTTPConnection class to ease debugging · 76fbb1b6
      Matt Harbison authored
      By default, this just printed the class name and memory address.  By displaying
      the address and ports on both sides of the socket, it makes it easier to figure
      out what's in the ConnectionManager, and correlate with WireShark traces.
      
      It looks like the two connections mentioned in the previous commit come about
      because the LFS POST request to access the blobs opens connection 1, and gets a
      401.  Then for some reason, the follow up with credentials opens a new socket,
      instead of using the existing one in the pool.  I have no clue why.
      
      This can be seen with something like this in the blobstore:
      
      ```
          for h in self.urlopener.handlers:
              if hasattr(h, "close_all"):
                  print('open connections on %s in pid %d' % (type(h), os.getpid()))
                  for host, conns in h._cm.get_all().items():
                      for c in conns:
                          print('connection: %r' % c)
      ```
      76fbb1b6
    • Matt Harbison's avatar
      keepalive: ensure `close_all()` actually closes all cached connections · 8251f7cc
      Matt Harbison authored
      While debugging why LFS blob downloads are getting corrupted with workers, I
      noticed that prior to spinning up the workers, the ConnectionManager has 2
      connections to the server and calling `KeepAliveHandler.close_all()` left one
      behind.  The reason is the value component of `self._cm.get_all().items()` is a
      list, and `self._cm.remove()` modifies said list while the caller is iterating
      over it.  Now `get_all()` is a deep copy of both the dict and lists in all
      cases.
      8251f7cc
  17. Nov 02, 2022
  18. Oct 31, 2022
  19. Oct 24, 2022
  20. Oct 20, 2022
  21. Oct 19, 2022
Loading