Skip to content
Snippets Groups Projects
  1. Apr 01, 2018
  2. Mar 31, 2018
    • Matt Harbison's avatar
      lfs: add an experimental knob to disable blob serving · dfb38c48
      Matt Harbison authored
      The use case here is the server admin may want to store the blobs elsewhere.  As
      it stands now, the `lfs.url` config on the client side is all that enforces this
      (the web.allow-* permissions aren't able to block LFS blobs without also
      blocking normal hg traffic).  The real solution to this is to implement the
      'verify' action on the client and server, but that's not a near term goal.
      Whether this is useful in its own right, and should be promoted out of
      experimental at some point is TBD.
      
      Since the other two tests that deal with LFS and `hg serve` are already complex
      and have #testcases, this seems like a good time to start a new test dedicated
      to access checks against the server.  Instead of conditionally wrapping the
      wire protocol handler, I put this in the handler because I'd still like to bring
      the annotations in from the evolve extension in order to set up the wrapping.
      The 400 status probably isn't great, but that's what it would be for existing
      `hg serve` instances without support for serving blobs.
      dfb38c48
    • Connor Sheehan's avatar
      stringutil: edit comment to reflect actual data type name · 2ed18011
      Connor Sheehan authored
      In development the data type used to hold an email/name pair
      was called a "mailmaptup" since it was implemented as a
      namedtuple. The implementation has since been changed to use
      an @attr.s decorated class named mailmapping. This commit
      changes a comment to reflect this change.
      
      Differential Revision: https://phab.mercurial-scm.org/D3004
      2ed18011
    • Connor Sheehan's avatar
      stringutil: improve check for failed mailmap line parsing · 0e7550b0
      Connor Sheehan authored
      The existing check for a bad mailmap file entry fails with inputs
      like b'>@<'. This commit adds a function to check if a sufficient
      amount of information has been parsed from a mailmap file entry.
      
      At minimum, one email must be found (assumed to be the commit email).
      If email is not empty and no names are found, then there must be
      two emails. If there are at least one email and name, the mapping
      is valid.
      
      Differential Revision: https://phab.mercurial-scm.org/D3003
      0e7550b0
    • Connor Sheehan's avatar
      stringutil: rename local email/names variables to their plural forms · 54b896f1
      Connor Sheehan authored
      email and name variables are renamed to emails and names (respectively).
      This is because the email variable name shadows the email function
      within the stringutil module. Since we are renaming email, we also rename
      name for consistency.
      
      Differential Revision: https://phab.mercurial-scm.org/D3002
      54b896f1
    • Connor Sheehan's avatar
  3. Feb 25, 2018
  4. Feb 26, 2018
    • Matt Harbison's avatar
      lfs: improve the client message when the server signals an object error · 67db8484
      Matt Harbison authored
      Two things here.  First, the previous message included a snippet of JSON, which
      tends to be long (and in the case of lfs-test-server, has no error message).
      Instead, give a concise message where possible, and leave the JSON to a debug
      output.  Second, the server can signal issues other than a missing individual
      file.  This change shows a corrupt file, but I'm debating letting the corrupt
      file get downloaded, because 1) the error code doesn't really fit, and 2) having
      it locally makes forensics easier.  Maybe need a config knob for that.
      67db8484
  5. Mar 31, 2018
  6. Mar 18, 2018
  7. Mar 20, 2018
  8. Mar 18, 2018
  9. Mar 19, 2018
  10. Mar 25, 2018
  11. Mar 31, 2018
  12. Mar 28, 2018
  13. Mar 31, 2018
  14. Mar 28, 2018
    • Matt Harbison's avatar
      server: add an error feedback mechanism for when the daemon fails to launch · f09a2eab
      Matt Harbison authored
      There's a recurring problem on Windows where `hg serve -d` will randomly fail to
      spawn a detached process.  The reason for the failure is completely hidden, and
      it takes hours to get a single failure on my laptop.  All this does is redirect
      stdout/stderr of the child to a file until the lock file is freed, and then the
      parent dumps it out if it fails to spawn.
      
      I chose to put the output into the lock file because that is always cleaned up.
      There's no way to report errors after that anyway.  On Windows, killdaemons.py
      is roughly `kill -9`, so this ensures that junk won't pile up.
      
      This may end up being a case of EADDRINUSE.  At least that's what I saw spit out
      a few times (among other odd errors and missing output on Windows).  But I also
      managed to get the same thing on Fedora 26 by running test-hgwebdir.t with
      --loop -j10 for several hours.  Running `netstat` immediately after killing that
      run printed a wall of sockets in the TIME_WAIT state, which were gone a couple
      seconds later.  I couldn't match up ports that failed, because --loop doesn't
      print out the message about the port that was used.  So maybe the fix is to
      rotate the use of HGPORT[12] in the tests.  But, let's collect some more data
      first.
      f09a2eab
Loading