Skip to content
Snippets Groups Projects
  1. Aug 18, 2018
    • Matt Harbison's avatar
      e8deaa77c1b6
    • Matt Harbison's avatar
      clone: allow local cloning to create more than one level of directories · 143efea71c2a
      Matt Harbison authored
      I figure cloning a remote repository is more common, thus it's more likely that
      some people might be relying on the less restrictive behavior.  Additionally,
      `hg init` will also create more than one level of missing directories.
      
      I also have a use case for reading the subrepos from .hgsub, and sharing them
      into the normal nested location on the server.  SCM Manager doesn't host
      subrepos in the normal nested location, which is nice for deduplicating the
      repository data, but confuses `hg verify`.  Some of the subrepos are in the root
      of the repositories, while others are one or two directories deep.  So not
      having to build up the parent path first is desirable.
      143efea71c2a
    • Matt Harbison's avatar
      tests: demonstrate an inconsistency when cloning to a missing directory tree · 8724de878268
      Matt Harbison authored
      I noticed that `hg share` is unable to create more than one missing directory on
      the path, and thought it was inconsistent with clone.  It turns out that the
      path for copying/linking the remote store has the same limitation, but cloning
      from a remote repo doesn't.
      8724de878268
  2. Aug 19, 2018
    • Matt Harbison's avatar
      tests: stabilize test-merge-tools.t on Windows · 7a111168659e
      Matt Harbison authored
      More fun with `hg import --bypass` to work around Windows limitations.  The
      diffs were generated on Linux, and had a tab to terminate the `+++b/...` lines.
      But check-code complained about trailing whitespace, and it seems to run without
      them.
      7a111168659e
  3. Aug 17, 2018
    • Gregory Szorc's avatar
      dagutil: remove module · d39b1f7e5dcf
      Gregory Szorc authored
      The previous commit removed the last consumer of this module.
      
      .. api:: dagutil module has been removed
      
         Some functionality has been moved to the dagop module. Other
         functionality can be accomplished via revsets.
      
      Differential Revision: https://phab.mercurial-scm.org/D4330
      d39b1f7e5dcf
    • Gregory Szorc's avatar
      dagop: port revlogdag.linearize() to standalone function · 0a934ee94f09
      Gregory Szorc authored
      The code should functionally be identical.
      
      We also port the one consumer in changegroup to use the new
      standalone function.
      
      After this commit, dagutil is no longer used!
      
      Differential Revision: https://phab.mercurial-scm.org/D4329
      0a934ee94f09
    • Gregory Szorc's avatar
      dagutil: use revlog.parentrevs() for resolving parent revisions · 8de526995844
      Gregory Szorc authored
      And remove parents() since it is no longer used.
      
      revlog.parentrevs() is almost the same as parents(). The main
      difference is that parentrevs() can return nullrev. dagop.headrevs()
      already handles nullrev. We add an inline check for nullrev in the
      other call site to account for the difference.
      
      .. api:: parents() removed from dagutil classes
      
         Use parentrevs() on the storage object instead.
      
      Differential Revision: https://phab.mercurial-scm.org/D4328
      8de526995844
    • Gregory Szorc's avatar
      dagop: extract headsetofconnecteds() from dagutil · 1c3184d7e882
      Gregory Szorc authored
      The functionality for resolving the set of DAG heads from a
      subset simply requires a function to resolve parent revisions.
      
      Let's establish a function in the dagop module to do this, which
      seems to be where generic DAG functionality goes these days.
      
      Differential Revision: https://phab.mercurial-scm.org/D4327
      1c3184d7e882
    • Gregory Szorc's avatar
      setdiscovery: precompute children revisions to avoid quadratic lookup · 274acf379dbb
      Gregory Szorc authored
      Moving away from dagutil a few commits ago introduced quadratic
      behavior when resolving children revisions during discovery.
      
      This commit introduces a precompute step of the children revisions
      to avoid the bad behavior.
      
      I believe the new code should have near identical performance to
      what dagutil was doing before. Behavior is still slightly different
      because we take into account filtered revisions. But this change was
      made when we moved off dagutil.
      
      I added a comment about multiple invocations of this function
      redundantly calculating the children revisions. I believe this
      potentially undesirable behavior was present when we used dagutil,
      as the call to inverse() previously in this function created a new
      object and required computing children on every invocation. I thought
      we should document the potential for a performance issue rather than
      let it go undocumented.
      
      Differential Revision: https://phab.mercurial-scm.org/D4326
      274acf379dbb
    • Gregory Szorc's avatar
      dagutil: remove unused classes · 4cf3f54cc8e7
      Gregory Szorc authored
      We only directly use revlogdag in changegroup code. We don't need
      all this abstraction. So remove various classes and levels
      of inheritance.
      
      Differential Revision: https://phab.mercurial-scm.org/D4325
      4cf3f54cc8e7
    • Gregory Szorc's avatar
      setdiscovery: use revset for resolving DAG heads in a subset · fec01c69b0f0
      Gregory Szorc authored
      This was the final use of dagutil in setdiscovery!
      
      For reasons I didn't investigate, feeding a set with nullrev
      into the heads() revset resulted in a bunch of tests failing.
      Filtering out nullrev from the input set fixes things.
      
      Differential Revision: https://phab.mercurial-scm.org/D4324
      fec01c69b0f0
    • Gregory Szorc's avatar
      dagutil: remove ability to invert instances · bbb855c412c6
      Gregory Szorc authored
      The previous commit removed the last consumer of this feature.
      
      .. api:: remove inverse() methods from classes in dagutil
      
      Differential Revision: https://phab.mercurial-scm.org/D4323
      bbb855c412c6
    • Gregory Szorc's avatar
      setdiscovery: don't use dagutil for parent resolution · 71d83b315778
      Gregory Szorc authored
      _updatesample()'s one remaining use of revlogdag is for resolving
      the parents of a revision.
      
      In 2 cases, we actually resolve parents. In 1, we operate on the
      inverted DAG and resolve children.
      
      This commit teaches _updatesample() to receive an argument defining
      the function to resolve "parent" revisions. Call sites pass in
      changelog.parentrevs() or a wrapper around changelog.children()
      accordingly.
      
      The use of children() is semantically correct. But it is quadratic,
      since revlog.children() does a range scan over all revisions starting
      at its input and effectively calls parentrevs() to build up the list
      of children. So calling it repeatedly in a loop is a recipe for
      bad performance. I will be implementing something better in a
      subsequent commit. I wanted to get the porting off of dagutil done
      in a way that was simple and correct.
      
      Like other patches in this series, this change is potentially impacted
      but revlogdag's ignorance of filtered revisions. The new code is
      filtering aware, since changelog's revs() (used by children() will
      skip filtered revisions and therefore hidden children won't appear.
      This is potentially backwards incompatible. But no tests fail and
      I think this code should respect visibility.
      
      Differential Revision: https://phab.mercurial-scm.org/D4322
      71d83b315778
    • Gregory Szorc's avatar
      setdiscovery: use revsets for computing a subset's heads and roots · 56279660d264
      Gregory Szorc authored
      revlogdag.headsetofconnecteds() obtains the set of DAG heads in a
      given set of revs.
      
      revlogdag.inverse() inverts the DAG order and makes
      headsetofconnecteds() obtain the DAG roots in a given subset.
      
      Both of these can be expressed with a revset.
      
      Like other patches in this series, revlogdag uses revlog.index
      and thus doesn't take filtering into account. Revsets do. So there
      is a chance for regressions with this change. But no tests fail.
      And I think this code should take filtering into account since
      hidden changesets shouldn't factor into discovery (unless operating
      on the hidden repository).
      
      Differential Revision: https://phab.mercurial-scm.org/D4321
      56279660d264
    • Gregory Szorc's avatar
      dagutil: remove heads() and localsubset from revlogdag.__init__ · 8973fc62bfff
      Gregory Szorc authored
      The previous commit removed the last consumer of this API.
      
      I'm not going to mark as API incompatible because I doubt anybody
      used this functionality (outside of possibly passing an argument
      to revlogdag.__init__). I intend to remove revlogdag later in
      this series and its API annotation will cover this one.
      
      Differential Revision: https://phab.mercurial-scm.org/D4320
      8973fc62bfff
    • Gregory Szorc's avatar
      setdiscovery: pass head revisions into sample functions · abce899c985f
      Gregory Szorc authored
      This eliminates the last remaining consumer of heads() and
      related functionality in dagutil.
      
      Differential Revision: https://phab.mercurial-scm.org/D4319
      abce899c985f
    • Gregory Szorc's avatar
      setdiscovery: pass heads into _updatesample() · 754f389b87f2
      Gregory Szorc authored
      In preparation for eliminating the use of dagutil. Since
      _takefullsample() operates on the inverted DAG, it is easier
      to have the caller pass in the relevant set instead of teaching
      _updatesample() about when to invert the DAG.
      
      We keep the logic identical for now: future commits will remove
      dagutil.
      
      Differential Revision: https://phab.mercurial-scm.org/D4318
      754f389b87f2
    • Gregory Szorc's avatar
      setdiscovery: use a revset for finding DAG heads in a subset · 140992750187
      Gregory Szorc authored
      The march towards moving away from dagutil continues.
      
      Like other patches moving us away from dagutil, there is the
      potential for regressions to occur because revlogdag's
      headsetofconnecteds() uses revlog.index, which doesn't take
      filtering into account. The revset layer does. But no tests
      fail, so we appear to be in the clear.
      
      Differential Revision: https://phab.mercurial-scm.org/D4317
      140992750187
    • Gregory Szorc's avatar
      setdiscovery: reflect use of revs instead of nodes · 2d218db7389b
      Gregory Szorc authored
      This code all operates on revision numbers. Update variable names
      and comments accordingly.
      
      Differential Revision: https://phab.mercurial-scm.org/D4316
      2d218db7389b
    • Gregory Szorc's avatar
      dagutil: remove descendantset() and ancestorset() · 136ed75bbe12
      Gregory Szorc authored
      descendantset() is unused after the previous commit. And
      ancestorset() was only used by descendantset(), so it can be removed
      as well.
      
      .. api:: descendantset() and ancestorset() removed from dagutil
      
         Use a revset instead when operating on the changelog. Or use
         various functionality in the ancestor or dagop modules.
      
      Differential Revision: https://phab.mercurial-scm.org/D4315
      136ed75bbe12
    • Gregory Szorc's avatar
      setdiscovery: use a revset instead of dagutil.descendantset() · 484c9fe570a7
      Gregory Szorc authored
      This is the only use of descendantset() in the repo.
      
      Strictly speaking, the revset behaves slightly differently than
      dagutil. The reason is that dagutil is using revlog.index for
      DAG traversal and this data structure isn't aware of visibility /
      filtering. So it can operate on revisions it shouldn't operate on.
      
      But our test coverage of this code is pretty comprehensive and
      this change causes no tests to fail. So I think we are good.
      
      Also, the revset parser failed to parse `%ld:: - %ld::`, hence
      the use of descendants(). I'm not sure if that is a feature or
      a bug.
      
      Differential Revision: https://phab.mercurial-scm.org/D4314
      484c9fe570a7
  4. Aug 16, 2018
  5. Jul 20, 2018
  6. Jul 23, 2018
  7. Mar 07, 2018
  8. Jul 20, 2018
  9. Aug 15, 2018
  10. Jul 27, 2018
  11. Jul 20, 2018
    • Paul Morelle's avatar
      revlog: also detect intermediate snapshots · f39efa885a6d
      Paul Morelle authored
      Also detect intermediate-snapshot done against another previous snapshot.
      
      Doing an intermediate snapshot instead of a full one can reduce the number of
      full snapshots we need. They are especially useful for content with a lot of
      churn on the same line (eg: the manifest) where having a delta over multiple
      revisions can end up being significantly smaller than the sum of these
      revision deltas.
      
      A revlog built using intermediate snapshots can be a bit smaller and reuse
      snapshot much more efficiently. This last property is useful combined with
      constraints on chain length. Using intermediate snapshot can produce
      repository with delta chain ten times shorter without impact on the storage
      size.  Shorter chain lengths are faster to restore, greatly improving read
      performance.
      
      This changesets (and the following ones) focus on getting the core principle
      of intermediate snapshots into Mercurial core. Later changeset will introduce
      the strategy to create them.
      f39efa885a6d
    • Paul Morelle's avatar
      revlog: add a method to tells whether rev is stored as a snapshot · f8db458651c8
      Paul Morelle authored
      For now we only have one type of snapshot: full snapshot versus nullrev.
      However we are looking into adding intermediate snapshot where a large diff
      against another snapshot is performed instead of storing a full new text.
      
      The conditional is a bit strange and is done in order to help readability of a
      some later changesets.
      f8db458651c8
  12. Aug 15, 2018
  13. Aug 17, 2018
Loading