Skip to content
Snippets Groups Projects
  1. Aug 26, 2018
  2. Sep 01, 2018
  3. Aug 25, 2018
  4. Aug 31, 2018
  5. Sep 01, 2018
    • Yuya Nishihara's avatar
    • Yuya Nishihara's avatar
    • Yuya Nishihara's avatar
      test-check-py3-compat: exclude thirdparty and cffi which are known to fail · 722eab64
      Yuya Nishihara authored
      Otherwise the following errors would be spilled out:
      
        mercurial/cffi/bdiff.py: error importing: <ImportError> cannot import
        name '_bdiff' (error at bdiff.py:*)
        mercurial/cffi/bdiffbuild.py: error importing: <ModuleNotFoundError> No
        module named 'cffi' (error at bdiffbuild.py:*)
        mercurial/cffi/mpatch.py: error importing: <ImportError> cannot import
        name '_mpatch' (error at mpatch.py:*)
        mercurial/cffi/mpatchbuild.py: error importing: <ModuleNotFoundError> No
        module named 'cffi' (error at mpatchbuild.py:*)
        mercurial/cffi/osutilbuild.py: error importing: <ModuleNotFoundError> No
        module named 'cffi' (error at osutilbuild.py:*)
        mercurial/thirdparty/concurrent/futures/_base.py: invalid syntax: invalid
        syntax (<unknown>, line *)
        mercurial/thirdparty/concurrent/futures/process.py: error importing:
        <SyntaxError> invalid syntax (_base.py, line 416) (error at __init__.py:*)
        mercurial/thirdparty/concurrent/futures/thread.py: error importing:
        <SyntaxError> invalid syntax (_base.py, line 416) (error at __init__.py:*)
        mercurial/thirdparty/zope/interface/_flatten.py: error importing:
        <ImportError> cannot import name 'Declaration' (error at _flatten.py:*)
      
      Some of them can be suppressed by building cffi modules for example, but
      I don't think it's worth keeping these modules covered by the compatibility
      checker.
      722eab64
    • Yuya Nishihara's avatar
      test-check-py3-compat: remove false output from "python3 check-py3-compat.py" · 875e635c
      Yuya Nishihara authored
      If python3 were python2, these errors would be reported, but we're running
      check-py3-compat.py on Python 3 here.
      875e635c
  6. Aug 01, 2018
  7. Aug 31, 2018
  8. Aug 30, 2018
  9. Aug 27, 2018
    • Gregory Szorc's avatar
      stringutil: teach pprint() to indent · 0f549da5
      Gregory Szorc authored
      This will make data structure dumping in various places a bit
      easier to read and diff. Since I wanted this for `hg debugwireproto`
      output, I added indentation to it.
      
      A more advanced pretty printer implementation would conditionally
      add newlines if output is too long. But it is vastly simpler to
      be consistent and always add newlines when indenting.
      
      Again, I'm not crazy about the verbosity of the code and there is
      room to consolidate logic for "print a collection." But this isn't
      the most complicated code in the world and I'm not convinced it is
      worth doing.
      
      Differential Revision: https://phab.mercurial-scm.org/D4399
      0f549da5
  10. Aug 22, 2018
  11. Jun 05, 2018
    • Boris Feld's avatar
      shelve: add an "internal" extra · 5f8282f3
      Boris Feld authored
      Keeping shelve changeset around increase the risk of collision with normal
      changesets. To prevent such collision and help with overall clarity, we add an
      'internal' key in extra that mark the changeset as created by "shelve".
      
      Node changes in tests are expected.
      5f8282f3
    • Boris Feld's avatar
      shelve: write metadata file on the fly if they are missing · 38373da1
      Boris Feld authored
      Keeping an explicit reference to the shelve node in order to reuse it directly
      if the unshelved is repeated (eg: unshelve --keep).
      38373da1
    • Boris Feld's avatar
      shelve: look for shelved node in the repository before unbundling · c67c94c0
      Boris Feld authored
      This prepares the version of shelve that would not strip the shelved node from
      the repository. If we have the node information, search for it in the
      repository and only fallback on unbundling if it is missing.
      
      To be able to find such nodes, we operate on an unfiltered repository.
      c67c94c0
    • Boris Feld's avatar
      shelve: handle shelved node on unfiltered repository · 6a71324c
      Boris Feld authored
      To build a version of shelve that use hiding instead of stripping, we need
      shelve to be able to find these revisions. This it does not hurt the bundle
      version, so we introduce the necessary code in the relevant place.
      6a71324c
  12. May 29, 2018
    • Boris Feld's avatar
      shelve: store shelved node in a new data file · da121c9d
      Boris Feld authored
      It is useful for a version of shelve not based on bundle and strip. Having
      more data does not hurt the bundle based case so we introduce it in all cases
      before doing more rework.
      
      We also keep storing the patch using another method.
      
      note: We could have this metadata file list all the file involved in the
      shelve and use that for cleanup. This would be more future proof than having a
      hard-coded list of file to purge. However, this is an adventure for another
      series.
      da121c9d
  13. Aug 05, 2018
  14. Aug 29, 2018
    • Pulkit Goyal's avatar
      copies: improve logic of deciding copytracing on based of config options · a41497b5
      Pulkit Goyal authored
      Few months ago or maybe a year ago, I imported Fb's heuristics based copytracing
      algorithms. While importing that, I renamed `experimental.disablecopytrace` with
      `experimental.copytrace` and the behavior of the new config option was like
      this:
      
        * "heuristics" : Fb's heuristic copytracing algorithm
        * "off" : copytracing is turned off
        * something else: copytracing is on
      
      This is the behavior right now also and this is bad because it hardcodes the
      string 'off' to turn off the copytracing. On big repositories, copytracing is
      very slow and people wants to turn copytracing off. However if the user sets it
      to 'False', 'Off', '0', none of them is going to disbale copytracing while they
      should.
      I lacked the understanding of why this can be bad when I coded it.
      
      After this patch, the new behavior of the config option will be:
      
        * "heuristics": Fb's heuristic copytracing algorithm
        * '0', 'false', 'off', 'never', 'no', 'NO', all the values which
          repo.ui.configbool() evaluates to False: copytracing in turned off
        * something else: copytracing is on
      
      Since 'off' still evaluates to copytracing being turned off, this is not BC.
      Also the config option is experimental.
      
      Differential Revision: https://phab.mercurial-scm.org/D4416
      a41497b5
  15. Aug 30, 2018
  16. Aug 29, 2018
  17. Aug 30, 2018
  18. Aug 27, 2018
  19. Aug 26, 2018
    • Pulkit Goyal's avatar
      narrow: add server logic to send cg while widening without ellipsis · c8e4eae8
      Pulkit Goyal authored
      Before this patch, if you try to widen a narrow clone without ellipsis enabled,
      it will be broken and the exchange.pull() done by tracked command to widen the
      clone will be no-op because no custom logic exists for this and server sees that
      we have all csets and it says `no changes found`.
      
      The widening with ellipsis send KILL for existing changegroups and send new
      changegroups because of the change in ellipsis hash, but we can prevent that in
      non-ellipsis cases.
      
      This patch adds server side logic to send the changegroups for the changesets
      which are on the client again with filelogs and manifests for the new includes.
      This is a very starting implementation and we send changegroups and manifests
      too while we can prevent them.
      
      Following things can definitely be improved in the logic this patch adds:
      
        1) Send just the filelogs and treemanifests
        2) Send the filelogs only for the additions in the include
      
      I tried 1) here but the code is coupled tightly and the way I was able to do
      that was hacking into the changegroup generation code in a very dirty way, like
      adding conditionals and preventing the yield.
      
      This patch also adds a 'widen' kwarg to prevent other commands except widening
      to go through that codepath.
      
      The test changes demonstrate that the new implementation is correct and fixes
      things.
      
      Differential Revision: https://phab.mercurial-scm.org/D4383
      c8e4eae8
  20. Aug 27, 2018
    • Pulkit Goyal's avatar
      tests: add test to show widening is broken without ellipsis · bca0546a
      Pulkit Goyal authored
      This patch adds a test to show that widening a narrow clone is broken if
      ellipsis is disabled.
      
      I don't think I can add cases to existing test-narrow-widen.t and check-in a
      failing version of that. So I created a copy. Once the test is fixed, we can
      merge this new test file back into the original one using testcases.
      
      Also, this is just testing treemanifest case because having two cases and both
      or are failing with different outputs is a bit hard to manage.
      
      This is important because upcoming patches will try to fix the broken part.
      
      Differential Revision: https://phab.mercurial-scm.org/D4382
      bca0546a
    • Gregory Szorc's avatar
      stringutil: emit multiple chunks when pretty printing · 5ed7c6ca
      Gregory Szorc authored
      This avoids concatenating output inside pprintgen() itself. But
      the real reason for this is it will make it easier to add
      indentation, as we'll need to account for indentation when emitting
      each individual object in a collection.
      
      The verbosity of this code compared to the original is a bit
      unfortunate. But I suppose this is the price to pay for having
      nice things (streaming and indenting).
      
      We could probably abstract the "print a collection" bits into a
      generic function to avoid some duplication. But I'm not
      overly inclined to do this.
      
      Differential Revision: https://phab.mercurial-scm.org/D4398
      5ed7c6ca
    • Gregory Szorc's avatar
      stringutil: refactor core of pprint so it emits chunks · 0d21b1f1
      Gregory Szorc authored
      This commit splits the core of pprint() to a new function that is
      a generator of chunks instead of a function returning a single
      value. This will make it possible to stream output without waiting for
      all data to be formatted first. And it will make it easier to
      implement support for indenting.
      
      Differential Revision: https://phab.mercurial-scm.org/D4397
      0d21b1f1
Loading