Skip to content
Snippets Groups Projects
  1. Apr 07, 2017
  2. Apr 08, 2017
  3. Apr 09, 2017
  4. Apr 06, 2017
  5. Apr 08, 2017
  6. Mar 08, 2017
    • Olivier Trempe's avatar
      fsmonitor: match watchman and filesystem encoding · 1064a296a2a7
      Olivier Trempe authored
      watchman's paths encoding can differ from filesystem encoding. For example,
      on Windows, it's always utf-8.
      
      Before this patch, on Windows, mismatch in path comparison between fsmonitor
      state and osutil.statfiles would yield a clean status for added/modified files.
      
      In addition to status reporting wrong results, this leads to files being
      discarded from changesets while doing history editing operations such as rebase.
      
      Benchmark:
      
      There is a little overhead at module import:
      python -m timeit "import hgext.fsmonitor"
      Windows before patch: 1000000 loops, best of 3: 0.563 usec per loop
      Windows after patch: 1000000 loops, best of 3: 0.583 usec per loop
      Linx before patch: 1000000 loops, best of 3: 0.579 usec per loop
      Linux after patch: 1000000 loops, best of 3: 0.588 usec per loop
      
      10000 calls to _watchmantofsencoding:
      python -m timeit -s "from hgext.fsmonitor import _watchmantofsencoding, _fixencoding" "fname = '/path/to/file'" "for i in range(10000):" "    if _fixencoding: fname = _watchmantofsencoding(fname)"
      Windows (_fixencoding is True): 100 loops, best of 3: 19.5 msec per loop
      Linux (_fixencoding is False): 100 loops, best of 3: 3.08 msec per loop
      1064a296a2a7
  7. Apr 07, 2017
  8. Apr 03, 2017
    • Jun Wu's avatar
      bundlerepo: use raw revision in revdiff() · 37e793918c07
      Jun Wu authored
      This is similar to "revlog: use raw revisions in revdiff". revdiff()
      generates raw text used in revlog directly.
      
      This makes test-flagprocessor.t happy.
      37e793918c07
  9. Apr 07, 2017
    • Jun Wu's avatar
      bundlerepo: fix raw handling in revision() · 4598e8f43e20
      Jun Wu authored
      Similar to fixes in revlog.py, this patch uses "rawtext" to explicitly label
      contents expected to be raw, and makes sure content stored in _cache is raw
      text.
      
      Now test-flagprocessor.t points us to another issue.
      4598e8f43e20
    • Jun Wu's avatar
      bundlerepo: build revlog index with flags · 4bafc80f827e
      Jun Wu authored
      This fixes bundlerevlog.flags(rev) for any revisions provided by the bundle.
      
      Now test-flagprocessor.t points us to another issue.
      4bafc80f827e
    • Jun Wu's avatar
      bundlerepo: make baserevision return raw text · 433ab46f6bb4
      Jun Wu authored
      "baserevision" returns the text that will be used to apply deltas. Since
      deltas are against raw texts, "baserevision" should return raw text.
      
      Now test-flagprocessor.t points us to a new error.
      433ab46f6bb4
    • Jun Wu's avatar
      test-flagprocessor: add tests about bundlerepo · 723c1ab2f77e
      Jun Wu authored
      This shows flag processor is broken with a bundle repo.
      
      The test creates non-liner history to exercise code path where the
      deltaparent cannot be reused.
      723c1ab2f77e
    • Jun Wu's avatar
      test-flagprocessor: use changegroup3 in bundle2 · 77f746e5383a
      Jun Wu authored
      This will force "hg bundle" to use changegroup3 in the test. It is
      important since only changegroup3 preserves revlog flags.
      77f746e5383a
    • Jun Wu's avatar
      bundle: allow bundle command to use changegroup3 in tests · 1da9b2a4cbb8
      Jun Wu authored
      Since bundle2 writes changegroup version, we can just reuse the bundle2
      format for changegroup3.
      
      This won't enable the bundle command to write changegroup3 in the wild,
      since exchange.parsebundlespec only returns changegroup2. It unlocks tests
      to override exchange.parsebundlespec and get "hg bundle" write changegroup3.
      1da9b2a4cbb8
  10. Apr 06, 2017
    • Matt Harbison's avatar
      d34316ae5c58
    • Matt Harbison's avatar
      run-tests: support per-line conditional output in tests · 4eec2f04a672
      Matt Harbison authored
      Duplicating entire tests just because the output is different is both error
      prone and can make the tests harder to read.  This harnesses the existing '(?)'
      infrastructure, both to improve readability, and because it seemed like the path
      of least resistance.
      
      The form is:
      
        $ test_cmd
        output (hghave-feature !) # required if hghave.has_feature(), else optional
        out2 (no-hghave-feature2 !) # req if not hghave.has_feature2(), else optional
      
      I originally extended the '(?)' syntax.  For example, this:
      
        2 r4/.hg/cache/checkisexec (execbit ?)
      
      pretty naturally reads as "checkisexec, if execbit".  In some ways though, this
      inverts the meaning of '?'.  For '(?)', the line is purely optional.  In the
      example, it is mandatory iff execbit.  Otherwise, it is carried forward as
      optional, to preserve the test output.  I tried it the other way, (listing
      'no-exec' in the example), but that is too confusing to read.  Kostia suggested
      using '!', and that seems fine.
      4eec2f04a672
    • Matt Harbison's avatar
      test-run-tests: pad the failure test to preserve the run order · ff60498211f3
      Matt Harbison authored
      Test size seems to dictate the order in which the tests are run, and the next
      patch will add to test-success.t.  Similar to c0cecc153d25.
      ff60498211f3
    • Matt Harbison's avatar
      run-tests: prevent a (glob) declaration from reordering (?) lines · 220d4bffd23e
      Matt Harbison authored
      Previously, if a series of optional output lines marked with '(?)' had a (glob)
      in one of the first lines, the output would be reordered such that it came last
      if none of the lines were output.  The (re) declaration wasn't affected, which
      was helpful in figuring this out.  There were no tests for '(re) (?)' so add
      that to make sure everything plays nice.
      220d4bffd23e
  11. Apr 07, 2017
  12. Apr 06, 2017
  13. Apr 05, 2017
  14. Apr 04, 2017
  15. Apr 03, 2017
Loading