Skip to content
Snippets Groups Projects
  1. Dec 04, 2018
  2. Nov 17, 2018
  3. Nov 15, 2018
    • Boris Feld's avatar
      cache: create `wcache` directory at init time · d5622dfe
      Boris Feld authored
      The cache directory will be needed very quickly, so it seems simpler to create
      it early to make sure it has the same owner and permission than the other
      directory in the repository.
      d5622dfe
    • Boris Feld's avatar
      cache: create `cache` directory at init time · 64cdfcc7
      Boris Feld authored
      The cache directory will be needed very quickly, so it seems simpler to create
      it early to make sure it has the same owner and permission than the other
      directory in the repository.
      64cdfcc7
    • Boris Feld's avatar
      check-exec: write file in 'wcache' instead of 'cache' · 47e3f554
      Boris Feld authored
      Some cache are relevant or affected by the working copy used. So the `.hg/cache`
      directory is not the best place for them because multiple shared repository can
      end up fighting over them.
      
      To address this issue, we introduce a new 'wcache' directory to host this kind
      of cache.
      
      The first user are the `checkisexec` type file. These files describe property of
      the working copy and fit the use-case well.
      47e3f554
  4. Dec 02, 2018
    • Martin von Zweigbergk's avatar
      match: drop unnecessary wrapping of regex in group · 3984409e
      Martin von Zweigbergk authored
      It seems the regexes have been wrapped in an unnamed group since
      b6c42714d900 (Add locate command., 2005-07-05). In that commit, the
      grouping was needed because there was a "head" ('^') added before the
      group and a "tail" (os.sep) added after it. It seems the head was
      moved inside the group in 1c0c413cccdd (Get add and locate to use new
      repo and dirstate walk code., 2005-07-18) and the tail was moved
      inside the group in 89985a1b3427 (Clean up walk and changes code to
      use normalised names properly., 2005-07-31), So it seems to me that
      we've carried around the unnecessary group for 13 years. This patch
      removes it.
      
      Differential Revision: https://phab.mercurial-scm.org/D5352
      3984409e
    • Matt Harbison's avatar
      tests: apply binary mode to output in seq.py · 06057261
      Matt Harbison authored
      I noticed this when playing with running tests using WSL, and iterating over the
      output yielded '0\r', '1\r',...  Most of the other *.py tools do this, and `seq`
      on MSYS lacks '\r' in the output, so this is more consistent.
      06057261
  5. Nov 21, 2018
    • Boris Feld's avatar
      perf: add a `perfbranchmapupdate` command · f7230146
      Boris Feld authored
      This command benchmark the time necessary to update the branchmap between two
      sets of revisions. This changeset introduce a first version, doing nothing fancy
      regarding cache or other internal details.
      f7230146
  6. Nov 05, 2018
    • Anton Shestakov's avatar
      push: config option to control behavior when pushing to a publishing server · 33d30fb1
      Anton Shestakov authored
      Pushing to a publishing server by mistake can lead to a difficult situation to
      solve because evolution doesn't work on public changesets. This new
      experimental config tries to help avoiding unintentionally (or at least being
      aware of) pushing to publishing remotes.
      
      `hg push --publish` can be used to make push succeed even when auto-publish is
      set to 'abort'.
      33d30fb1
  7. Oct 05, 2018
  8. Nov 22, 2018
    • Boris Feld's avatar
      perf: add a perfignore command · 45a0047c
      Boris Feld authored
      The command is meant to benchmark operations related to hgignore. Right now the
      command is benchmarking the loading time of the hgignore rules.
      45a0047c
  9. Nov 26, 2018
  10. Nov 25, 2018
  11. Nov 26, 2018
  12. Nov 12, 2018
  13. Nov 24, 2018
    • Matt Harbison's avatar
      tests: disable remotefilelog on Windows · 0800d9e6
      Matt Harbison authored
      I've spent a non trivial amount of time trying to eliminate the test errors, but
      it's looking like this is pretty dependent on Unix support.  For example, there
      are attempts to delete open files, and uses of threads that report I/O attempts
      on closed files.  (Maybe this is a race condition?  Don't we usually use
      processes as workers on Windows?)
      
      In any event, I don't want real new errors elsewhere to be masked by these known
      problems.
      
      For some reason $CACHEDIR is reported as missing in test-remotefilelog-repack.t,
      but it actually exists in the hgcloneshallow call inside
      shallowutil.mkstickygroupdir().  By the time the process exits, it's gone.  I
      don't see it being removed by code that calls 'rmdir' or 'remove' in the
      extension itself.
      0800d9e6
  14. Nov 23, 2018
  15. Nov 22, 2018
  16. Nov 19, 2018
  17. Oct 27, 2018
  18. Nov 21, 2018
  19. Nov 20, 2018
  20. Nov 18, 2018
  21. Nov 19, 2018
    • Valentin Gatien-Baron's avatar
      tests: make test-alias.t pass with re2 · 557d3509
      Valentin Gatien-Baron authored
      Locally, these "non-ASCII character in alias" errors don't show up,
      though I get them when the alias is defined at the command line rather
      than in an hgrc.
      The brokenness comes from the fact that hgrcs are parsed with regexes,
      and re/re2 differ in this way:
      
      $ python -c 'import re; print(re.compile("(.*)").match("aaa\xc0bbbb").groups())'
      ('aaa\xc0bbbb',)
      $ python -c 'import re2; print(re2.compile("(.*)").match("aaa\xc0bbbb").groups())'
      ('aaa',)
      
      Apparently re2 stops when it encounters invalid utf8 (which I suppose makes sense
      given that '.' matches what appears to be a codepoint rather than a byte). This is
      presumably a bug in hg, but not very important, so just change the test to stick
      to valid utf8.
      
      Differential Revision: https://phab.mercurial-scm.org/D5288
      557d3509
  22. Nov 15, 2018
    • Boris Feld's avatar
      checkexec: create destination directory if necessary · bd087497
      Boris Feld authored
      Since 460733327640, a "share" use the cache of the source repository. A side
      effect is that no `.hg/cache` directory exists in the "share" anymore. As a
      result, the checkexec logic can't use it to create its temporary file and have
      to use the working copy for that.
      
      This is suboptimal, it pollutes the working copy and prevents them to keep the
      file around in cache. We do not want to use the cache directory for the share
      target, it might be on a different file system.
      
      So instead, we (try to) create the directory if it is missing. This is a
      simple change that fixes the current behavior regression on stable.
      
      On default, we should probably ensure the proper directories are created when
      initializing the repository. We should also introduce a 'wcache' directory to
      hold cache file related to the working copy. This would clarify the cache
      situation regarding shares.
      
      The tests catch a couple of other affected cases.
      bd087497
  23. Nov 09, 2018
  24. Nov 16, 2018
  25. Nov 15, 2018
    • Matt Harbison's avatar
      lfs: make the exception messages consistent · 93e5d182
      Matt Harbison authored
      I don't love that it repeats 'HTTP Error' in an already long message, but I
      doubt that we should assume that it will always say that on the original
      exception message.
      93e5d182
    • Matt Harbison's avatar
      lfs: handle URLErrors to add additional information · 380f5131
      Matt Harbison authored
      Sometimes the blob server is hit first (e.g. on push), and sometimes it's hit
      last (e.g. pull).  Throw in depth first subrepo operations, and things quickly
      get insane.  It wasn't even mentioning LFS, so just saying "connection refused"
      can be confusing- especially if the blob server is a secondary server and
      connecting to the repo server works.
      
      The exception handler for the transfer handler will print the full path to the
      blob, but that seems fine given that it might be necessary to debug a second
      server.  (We don't yet support a standalone blob server, so the handler for the
      Batch API will cover 99.9% of the current problems.  But it might as well be
      handled now while I'm thinking about it.)
      
      The function for translating to a message was mostly borrowed from
      scmutil.catchall().
      380f5131
    • Matt Harbison's avatar
      lfs: improve the hints for common errors in the Batch API · 9f78d107
      Matt Harbison authored
      The previous message was too debug-ish and less action oriented than a hint
      should be.  The remaining errors that aren't handled are more along the lines of
      programming errors (not using POST, bad accept type, etc), so I'm not bothering
      with that.
      
      The friendly errors purposely use `self.baseurl` instead of the full Batch API
      endpoint because I'd expect some copy/paste/modify on the part of the user here,
      and it would be more confusing if '/objects/batch' magically appeared, but
      shouldn't be used in the config setting.  It still seems like the right thing
      for debugging in the catchall case.
      9f78d107
    • Matt Harbison's avatar
      lfs: provide more Batch API error info via a hint in the raised exception · 8863f08c
      Matt Harbison authored
      A coworker had a typo in `lfs.url`, forgot it was even set because usually the
      blob server is inferred, and then got a 404.  It would have been easier to debug
      with the failing URL printed.
      8863f08c
    • Yuya Nishihara's avatar
      graft: do not try to skip rev derived from ancestor more than once (issue6024) · 3bc2e550
      Yuya Nishihara authored
      We check 'x in revs' in other cases, so let's do the same.
      
      The test case credits to Tom Prince.
      3bc2e550
  26. Nov 16, 2018
    • Matt Harbison's avatar
      subrepo: print the status line before creating the peer for better diagnostics · 69d4c8c5
      Matt Harbison authored
      I ran into a problem where I tried updating to a different branch, and the
      process appeared to hang.  It turned out that the subrepo revision wasn't
      available locally, and I must have originally cloned it from an `hg serve -S` on
      a machine that currently wasn't serving anything.  It took 2+ minutes to
      timeout, and didn't mention what it was connecting to even then.
      
      There are a couple of other issues in this scenario too.
      
        - The repo is dirty after the failed checkout because the top level repo is
          updated first.  We should probably make 2 passes- top down to pull
          everything needed, and then do an update once everything is in place.
      
        - Something must be reading .hgsubstate from wdir because if the same merge
          command is run after the timeout, a prompt is issued that the local and
          remote subrepo diverged, instead of hanging.  But it lists the local version
          and remote version as having the same hash.
      69d4c8c5
  27. Nov 15, 2018
  28. Nov 13, 2018
  29. Nov 15, 2018
  30. Nov 14, 2018
Loading