Skip to content
Snippets Groups Projects
  1. Mar 06, 2018
  2. Feb 13, 2018
  3. Feb 07, 2018
    • Jun Wu's avatar
      changegroup: do not delta lfs revisions · d031609b
      Jun Wu authored
      There is no way to distinguish whether a delta base is LFS or non-LFS.
      
      If the delta is against LFS rawtext, and the client trying to apply it has
      the base revision stored as fulltext, the delta (aka. bundle) will fail to
      apply.
      
      This patch forbids using delta for LFS revisions in changegroup so bad
      deltas won't be transmitted.
      
      Note: this does not solve the problem entirely. It solves LFS delta applying
      to non-LFS base. But the other direction: non-LFS delta applying to LFS base
      is not solved yet.
      
      Differential Revision: https://phab.mercurial-scm.org/D2067
      d031609b
    • Jun Wu's avatar
      lfs: add a test showing bundle application could be broken · 4e41b596
      Jun Wu authored
      When a bundle containing LFS delta uses non-LFS delta-base, or vice-versa,
      the bundle will fail to apply.
      
      Differential Revision: https://phab.mercurial-scm.org/D2066
      4e41b596
  4. Mar 04, 2018
  5. Mar 01, 2018
  6. Feb 28, 2018
    • Matt Harbison's avatar
      test-subrepo: demonstrate problems with subrepo sharing and absolute paths · 0c14b3f2
      Matt Harbison authored
      This affects remote paths in .hgsub, as well as clone pooling from a remote
      source.
      
      For reasons unknown, there are stability issues with the relative-path.t tests.
      If run as a single test, it is stable.  If run with --loop, or with -jX for X>1,
      the hash of the parent repo changes.  I'm seeing this on both Windows and Fedora
      26.  I added an `hg log --debug`, and the manifest hash changes, but I have no
      idea why.
      0c14b3f2
  7. Feb 21, 2018
    • Yuya Nishihara's avatar
      annotate: do not poorly split lines at CR (issue5798) · 0a7c59a4
      Yuya Nishihara authored
      mdiff and lines(text) take only LF as a line separator, but str.splitlines()
      breaks our assumption. Use mdiff.splitnewlines() consistently.
      
      It's hard to read \r in tests, so \r is replaced with [CR]. I had to wrap
      sed by a shell function to silence check-code warning.
      0a7c59a4
  8. Feb 24, 2018
    • Gregory Szorc's avatar
      setup: only allow Python 3 from a source checkout (issue5804) · fb39f6a8
      Gregory Szorc authored
      People are running `pip install Mercurial` with Python 3 and that
      is working because not everything performs a Python version
      compatibility check.
      
      Modern versions of pip do recognize the "python_requires" keyword
      (https://packaging.python.org/tutorials/distributing-packages/#python-requires)
      which we set if using setuptools. But this isn't set nor recognized
      everywhere.
      
      To prevent people from accidentally installing Mercurial with Python
      3 until Python 3 is officially supported, have setup.py fail when
      run with Python 3. But don't fail if we're running from a source
      checkout, as we don't want to anger Mercurial developers hacking
      on Python 3 nor Mercurial's test automation running from source
      checkouts. People running setup.py from source checkouts could still
      fall through a Python 3 crack. But at least the
      `pip install Mercurial` attempt will get nipped in the bud.
      fb39f6a8
  9. Feb 21, 2018
  10. Feb 22, 2018
  11. Feb 19, 2018
    • Gregory Szorc's avatar
      tests: expand test coverage for updating phases · c19e66da
      Gregory Szorc authored
      Consolidating the tests demonstrated that there are behavior
      differences when pushing phases between bundle1 and bundle2.
      
      A reason for this is the behavior of legacy pushes where the client
      queries the state of phases and then conditionally updates phases
      after an "unbundle" is processed. This behavior is expected.
      
      The tests were incomplete because they only tested the case of a
      publishing repo. In this commit, we add a variant for a non-publishing
      repo. We still see some differences between the legacy and bundle2
      exchanges. But they are less pronounced.
      
      The behavior of not firing a pushkey hook when phases are updated as
      part of changegroup application feels weird to me. I'm not sure if
      this is a feature or a bug. By the time the "pushkey" or "phases"
      bundle2 part is applied, the phases have already been moved on
      a publishing repository. We fire the "pushkey" hook regardless,
      even though it would be a no-op. This is the part that feels the
      most buggy.
      c19e66da
  12. Feb 18, 2018
    • Gregory Szorc's avatar
      tests: consolidate test-push-http.t and test-push-http-bundle1.t · 47728063
      Gregory Szorc authored
      These tests were initially copies of each other. Now that we have
      #testcases support in .t tests, we can consolidate them.
      
      The changes to test-push-http.t reflect the differences between that
      file and test-push-http-bundle1.t.
      
      The variances in phases push behavior are the biggest differences.
      The test will be updated in a subsequent commit to make the differences
      more clear and to expand test coverage. For now, let's just port
      the differences verbatim to get the tests consolidated.
      47728063
    • Gregory Szorc's avatar
      tests: port value-less unbundle capability test to test-push-http.t · fefd57bd
      Gregory Szorc authored
      This test is present in test-push-http-bundle1.t. Let's add it to
      test-push-http.t to further unify the tests.
      fefd57bd
    • Gregory Szorc's avatar
      tests: add phase testing to test-push-http-bundle1.t · e978e0c1
      Gregory Szorc authored
      test-push-http.t and test-push-http-bundle1.t were initially copies.
      Now that we have support for inline test variants, we can combine them.
      
      One of the variances between the tests is testing of phase moving.
      We add the missing code to test-push-http-bundle1.t.
      e978e0c1
  13. Feb 16, 2018
    • Jun Wu's avatar
      date: fix parsing months · 48783333
      Jun Wu authored
      Thanks nemo for discovering this on #mercurial IRC channel.
      
      Test Plan:
      Add a test. It fails before this patch:
      
      ```
      +  hg: parse error: invalid date: 'Feb 2018'
      +  hg: parse error: invalid date: 'Apr 2018'
      +  hg: parse error: invalid date: 'Jun 2018'
      +  hg: parse error: invalid date: 'Sep 2018'
      +  hg: parse error: invalid date: 'Nov 2018'
      ```
      
      Differential Revision: https://phab.mercurial-scm.org/D2289
      48783333
  14. Feb 13, 2018
  15. Feb 07, 2018
  16. Feb 01, 2018
  17. Jan 31, 2018
  18. Jan 28, 2018
    • Matt Harbison's avatar
      revset: evaluate filesets against each revision for 'file()' (issue5778) · f6ca1e11
      Matt Harbison authored
      After f2aeff8a87b6, the fileset was evaluated to a set of files against the
      working directory, and then those files were applied against each revision.  The
      result was nonsense.  For example, `hg log -r 'file("set:exec()")'` on the
      Mercurial repo listed revision 0 because it has the `hg` script, which is
      currently +x.  But that bit wasn't applied until revision 280 (which
      'contains()' properly indicates).
      
      This technique was borrowed from checkstatus(), which services adds(),
      modifies(), and removes(), so it seems safe enough.  The 'r:' case is explicitly
      assigned to wdirrev, freeing up rev=None to mean "re-evaluate at each revision".
      The distinction is important to avoid behavior changes with `hg log set:...`
      (test-largefiles-misc.t and test-fileset-generated.t drop current log output
      without this).  I'm not sure what the right behavior for that is (1fd352aa08fc
      explicitly enabled this behavior for graphlog), but the day before the release
      isn't the time to experiment.
      f6ca1e11
  19. Feb 01, 2018
  20. Jan 31, 2018
  21. Jan 29, 2018
  22. Jan 30, 2018
  23. Jan 31, 2018
    • Jun Wu's avatar
      lazymanifest: avoid reading uninitialized memory · 113a30b8
      Jun Wu authored
      I got errors running tests with clang UBSAN [1] enabled. One of them is:
      
      ```
      --- test-dirstate.t
      +++ test-dirstate.t.err
      @@ -85,9 +85,115 @@
         $ echo "[extensions]" >> .hg/hgrc
         $ echo "dirstateex=../dirstateexception.py" >> .hg/hgrc
         $ hg up 0
      -  abort: simulated error while recording dirstateupdates
      -  [255]
      +  mercurial/cext/manifest.c:781:13: runtime error: load of value 190, which is not a valid value for type 'bool'
      +      #0 0x7f668a8cf748 in lazymanifest_diff mercurial/cext/manifest.c:781
      +      #1 0x7f6692fc1dc4 in call_function Python-2.7.11/Python/ceval.c:4350
      +      .......
      +  SUMMARY: UndefinedBehaviorSanitizer: invalid-bool-load mercurial/cext/manifest.c:781:13 in
      +  [1]
         $ hg log -r . -T '{rev}\n'
         1
         $ hg status
      -  ? a
      ```
      
      While the code is not technically wrong, but switching the condition would
      make clang UBSAN happy. So let's do it.
      
      The uninitialized memory could come from, for example, `lazymanifest_copy`
      allocates `self->maxlines` items but only writes the first `self->lines`
      items.
      
      [1]: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
      
      Test Plan:
      Run `test-dirstate.t` with UBSAN and it no longer reports the issue.
      
      Differential Revision: https://phab.mercurial-scm.org/D1948
      113a30b8
  24. Jan 26, 2018
  25. Jan 29, 2018
  26. Jan 30, 2018
    • Matt Harbison's avatar
      lfs: don't require the .hglfs file to be tracked to control the policy · 4425790f
      Matt Harbison authored
      The .hgignore file doesn't need to be tracked, nor does the git equivalent of
      this file.  I'm still a little concerned about the effects of forgetting to
      commit this file.  But the fact that conversions maintain the hashes if only the
      normal vs external storage changes, should make this less risky.
      4425790f
  27. Jan 28, 2018
  28. Jan 26, 2018
  29. Jan 24, 2018
Loading