Skip to content
Snippets Groups Projects
  1. Jun 05, 2018
    • Boris Feld's avatar
      shelve: add an "internal" extra · 5f8282f368b2
      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.
      5f8282f368b2
    • Boris Feld's avatar
      shelve: write metadata file on the fly if they are missing · 38373da1af02
      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).
      38373da1af02
    • Boris Feld's avatar
      shelve: look for shelved node in the repository before unbundling · c67c94c0e7ae
      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.
      c67c94c0e7ae
    • Boris Feld's avatar
      shelve: handle shelved node on unfiltered repository · 6a71324cb68b
      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.
      6a71324cb68b
  2. May 29, 2018
    • Boris Feld's avatar
      shelve: store shelved node in a new data file · da121c9dc0f2
      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.
      da121c9dc0f2
  3. Aug 05, 2018
  4. Aug 29, 2018
    • Pulkit Goyal's avatar
      copies: improve logic of deciding copytracing on based of config options · a41497b5117c
      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
      a41497b5117c
  5. Aug 30, 2018
  6. Aug 29, 2018
  7. Aug 30, 2018
  8. Aug 27, 2018
  9. Aug 26, 2018
    • Pulkit Goyal's avatar
      narrow: add server logic to send cg while widening without ellipsis · c8e4eae84808
      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
      c8e4eae84808
  10. Aug 27, 2018
    • Pulkit Goyal's avatar
      tests: add test to show widening is broken without ellipsis · bca0546a44bf
      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
      bca0546a44bf
    • Gregory Szorc's avatar
      stringutil: emit multiple chunks when pretty printing · 5ed7c6caf24d
      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
      5ed7c6caf24d
    • Gregory Szorc's avatar
      stringutil: refactor core of pprint so it emits chunks · 0d21b1f1722c
      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
      0d21b1f1722c
  11. Jul 25, 2018
  12. Aug 29, 2018
  13. Aug 21, 2018
  14. Aug 26, 2018
  15. Jun 05, 2018
  16. May 29, 2018
    • Boris Feld's avatar
      shelve: rename method for data write/read · bab58b1d87c7
      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.
      bab58b1d87c7
  17. Aug 22, 2018
  18. Aug 05, 2018
  19. Aug 18, 2018
Loading