Skip to content
Snippets Groups Projects
  1. Aug 05, 2018
  2. 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
  3. Aug 30, 2018
  4. Aug 29, 2018
  5. Aug 30, 2018
  6. Aug 27, 2018
  7. 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
  8. 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
  9. Jul 25, 2018
  10. Aug 29, 2018
  11. Aug 21, 2018
  12. Aug 26, 2018
  13. Jun 05, 2018
  14. May 29, 2018
    • Boris Feld's avatar
      shelve: rename method for data write/read · bab58b1d
      Boris Feld authored
      There are no user of this code nor any code related to obsshelve in the
      extensions right now, so we rename the function before using them.
      
      Note: The shelvedfile looks a bit strange. We should probably refactor it,
      however, this is an adventure for another series.
      bab58b1d
  15. Aug 22, 2018
  16. Aug 05, 2018
  17. Aug 18, 2018
  18. Aug 29, 2018
    • Boris Feld's avatar
      revlogdeltas: split candidate groups selection from the filtering logic · 1c6ff52f
      Boris Feld authored
      The group iteration has two main components:
      
      * walking candidates, the logic that we are about to extend to build
        intermediate snapshots,
      
      * Making sure we test diffs against interesting bases. No duplicated tests,
        skipping empty revisions, etc.
      
      We split `_candidategroups` to separate the two components. This achieves two
      goals:
      
      * It will be simpler to update the walking logic for intermediate snapshots,
      
      * We can gather the filtering logic from `finddeltainfo` into
        `_candidategroups` to centralize it.
      1c6ff52f
  19. Aug 18, 2018
    • Boris Feld's avatar
      revlogdeltas: pass revision number to _candidatesgroups · 1441eb38
      Boris Feld authored
      The `_candidates_groups` logic works on revisions, so the nodes are currently
      just converted to revs at the top of the function. It seems cleaner to instead
      pass revision numbers to the function.
      
      Having this conversion out of the way will help for further cleanups.
      1441eb38
    • Boris Feld's avatar
      revlogdeltas: extract _getcandidaterevs in a function · 507f5b1d
      Boris Feld authored
      The logic barely uses the object it is attached to. This is an important
      function that we will clean up in the coming changesets. Moving it at the top
      level helps us with that cleanup.
      507f5b1d
  20. Aug 16, 2018
  21. Aug 29, 2018
  22. Aug 16, 2018
    • Boris Feld's avatar
      revlog: split functionality related to deltas computation in a new module · 655b5b46
      Boris Feld authored
      The revlog module is getting big and this logic is getting more and more
      advanced. Moving it to `mercurial.revlogutils.deltas` split a lot off
      revlog.py and will help this logic to become less interleaved with revlog.
      
      The code is simply moved without modification (but for namespace changes).
      Refactoring and improvement will be made in later changesets.
      655b5b46
    • Boris Feld's avatar
      revlog: split constants into a new `revlogutils.constants` module · 729082bb
      Boris Feld authored
      We want to split some logic out of the main revlog file (the delta computing
      logic).  However, this logic needs access to multiple constants related to the
      revlog. So we move all revlog related constants into a new module that could
      be imported from multiple places.
      
      We don't copy the file (preserving blame history) because there are only a few
      moving lines. Also, copying the file would result in annoying merge conflicts
      with ongoing work from others contributors.
      729082bb
Loading