Skip to content
Snippets Groups Projects
  1. Feb 08, 2025
  2. Dec 03, 2024
  3. Nov 18, 2024
  4. Aug 30, 2024
    • Matt Harbison's avatar
      util: don't attempt to delete an open NamedTemporaryFile (fixes #440) · 2312779a
      Matt Harbison authored
      On Windows, I had problems both cloning and pulling new changes from the server.
      The workaround was the clone/pull in WSL using Linux python.  Not sure when this
      broke, but apparently `tempfile.NamedTemporaryFile` has a lot of... limitations
      on Windows.[1]
      
      My suggestion of using `mercurial.util.unlink()` in the bug report didn't work
      for pulling changes.  I didn't test if it would have worked for cloning.
      
      Note that this isn't a problem on the default branch, because support for
      `dulwich` prior to 0.20 drops this code.  It will generate a merge conflict, but
      can be thrown away.
      
      [1] https://stackoverflow.com/a/49868505
      2312779a
  5. Nov 09, 2023
    • Dan Villiom Podlaski Christiansen's avatar
      core: remove debugextrainmessage support · c09795e7
      Dan Villiom Podlaski Christiansen authored
      The stated purpose for this is for testing. However, it's not for
      testing of hg-git, but of git-remote-hg. The mode has been broken for
      years, though, and given that it doesn't actually rely on the
      known-good modes of hg-git, it doesn't offer much guarantee of
      anything actually working.
      
      Removing as general cruft that needlessly complicates the codebase.
      
      Closes: #281 !211
      c09795e7
  6. Jun 07, 2024
  7. Jun 25, 2024
  8. Jun 09, 2024
  9. Jun 07, 2024
  10. Jun 06, 2024
  11. Jun 01, 2024
    • Dan Villiom Podlaski Christiansen's avatar
      export: pack loose objects · f6a2624e
      Dan Villiom Podlaski Christiansen authored
      We do this in separate threads, by default up to the core count
      available or four, as a sensible limit.
      
      There are two possible ways that we could pack objects:
      
      1) Gather up the objects in-memory, and write them as a single pack.
      2) Write the objects as loose, and then pack them later.
      
      We want to pack as many objects as possible into a single pack, as
      that yields the best compression. However, the first option has two
      main downsides: First of all, we have to have the objects in memory,
      and for long-running conversions, this could be a _lot_ of objects.
      Second, hg-git currently assumes that it can just look up the tree in
      the Git repository. Sure, we could cache that, but that's extra
      complexity.
      
      Instead, we go for the second option. Packing is a rather slow
      operation, as it involves actually compressing the objects, and
      Dulwich doesn't seem particularly fast at that. However, as a mostly
      I/O and compression bound operation, it mostly sidesteps Python's
      infamous Global Interpreter Lock, making it amenable to normal
      threading. While this is _also_ somewhat complicated, it's complexity
      that we can isolate into a single module, avoiding further cluttering
      in the already complicated code we have elsewhere.
      
      The current implementation uses worker threads that regularly check
      whether the export is complete. Some systems have a _lot_ of cores,
      and the conversion will always be bound on the single-thread actual
      conversion anyway. Hence, I limited the default to using just three
      threads for packing; packing shouldn't take more than about three
      times as long as exporting, but we'll see…
      
      Closes: #429
      f6a2624e
  12. Jun 06, 2024
Loading