Skip to content
Snippets Groups Projects
  1. Oct 31, 2018
    • Yuya Nishihara's avatar
      fix: disable use of thread-based worker · 8ebb05f747e5
      Yuya Nishihara authored
      getfixes() accesses to repo, changectx, filectx, etc., so I believe there
      are code paths triggering data race. Mercurial API isn't thread safe in
      general.
      8ebb05f747e5
    • Pulkit Goyal's avatar
      configitems: rename the config to prevent adding an alias in future · 14b6afc6cb28
      Pulkit Goyal authored
      Right now the config option looks like:
      
      [experimental.server]
      stream-narrow-clones=
      
      which does not match how config options are generally defined in core. So let's
      rename this to:
      
      [experimental]
      server.stream-narrow-clones=
      
      before the new release so that we don't have to add an alias in future for this.
      
      Differential Revision: https://phab.mercurial-scm.org/D5198
      14b6afc6cb28
    • Boris Feld's avatar
      sparse-revlog: only refine delta candidates in the sparse case (issue6006) · bafa1c4bb7a8
      Boris Feld authored
      Starting with 5aef5afa8654, a valid delta parent might be "refined". This
      allows repository using sparse-revlog to produce better delta chain by using
      better intermediate snapshot base.
      
      However, this refining step was performed in all cases, including for
      repository not using sparse-revlog. This could produce a strange chain in the
      general delta case and corrupted repository in the non-general delta case.
      
      We now skip this step unless sparse-revlog is in use.
      
      In issue 6006, Yuya Nishihara provided a test case using an external
      repository, so we did not include it. Finding "laboratory" condition to
      reproduce this case and implementing an efficient test reproducing it is a bit
      tricky. We do not foresee to have the time to provide one by the release date.
      
      Differential Revision: https://phab.mercurial-scm.org/D5197
      bafa1c4bb7a8
  2. Oct 29, 2018
    • Augie Fackler's avatar
      http: work around custom http client classes that refuse extra attrs · 588f1e9a4d16
      Augie Fackler authored
      I have no idea what is going on with our custom http client code at Google,
      but it chokes on these extra attributes we're tucking on http clients. Since
      it feels more than a little wrong to just stuff extra data on a client, let's
      degrade gracefully when the client class refuses the attributes.
      588f1e9a4d16
  3. Oct 25, 2018
  4. Oct 24, 2018
  5. Oct 25, 2018
  6. Oct 17, 2018
    • Boris Feld's avatar
      phase: add an archived phase · 49c7b701fdc2
      Boris Feld authored
      This phase allows for hidden changesets in the "user space". It differs from
      the "internal" phase which is intended for internal by-product only. There
      have been discussions at the 4.8 sprint to use such phase to speedup cleanup
      after history rewriting operation.
      
      Shipping it in the same release as the 'internal-phase' groups the associated
      `requires` entry. The important bit is to have support for this phase in the
      earliest version of mercurial possible. Adding the UI to manipulate this new
      phase later seems fine.
      
      The current plan for archived usage and user interface are as follow. On a
      repository with internal-phase on and evolution off:
      
      * history rewriting command set rewritten changeset in the archived phase.
        (This mean updating the cleanupnodes method).
      * keep `hg unbundle .hg/strip-backup/X.hg` as a way to restore changeset for
        now
        (backup bundle need to contains phase data)
      * [maybe] add a `hg strip --soft` advance flag
        (a light way to expose the feature without getting in the way of a better
        UI)
      
      Mercurial 4.8 freeze is too close to get the above in by then.
      
      We don't introduce a new repository `requirement` as we reuse the one
      introduced with the 'archived' phase during the 4.8 cycle.
      49c7b701fdc2
  7. Oct 23, 2018
  8. Oct 22, 2018
  9. Aug 17, 2018
    • Boris Feld's avatar
      profiling: move default mode to "real" time · db0dba2d157d
      Boris Feld authored
      Mercurial operations involve a lot of disks or network access. These impact
      command runtime significantly and it seems important to report them in our
      default profiling output.
      
      Having the right default means that we don't forget them when asking people to
      produces profiling traces or when doing profiling ourselves.
      
      Moving to "real time" by default will remove the need to think about
      activating it on most occasions. The "CPU" time-based profiling is still
      accessible when necessary.
      db0dba2d157d
  10. Oct 05, 2018
  11. Oct 19, 2018
  12. Oct 18, 2018
  13. Oct 19, 2018
    • Gregory Szorc's avatar
      exchangev2: support fetching shallow files history · 229d23cdb203
      Gregory Szorc authored
      This commit teaches the exchangev2 client code to handle fetching shallow
      files data.
      
      Only shallow fetching of files data is supported: shallow fetching of
      changeset and manifest data is explicitly not yet supported.
      
      Previously, we would fetch file revisions for changesets that were received
      by the current pull operation. In the new model, we calculate the set of
      "relevant" changesets given the pull depth and only fetch files data for
      those changesets.
      
      We also teach the "filesdata" command invocation to vary parameters as needed.
      
      The implementation here is far from complete or optimal. Subsequent pulls will
      end up re-fetching a lot of files data. But the application of this data should
      mostly be a no-op on the client, so it isn't a big deal.
      
      Depending on the order file revisions are fetched in, revisions could get
      inserted with the wrong revision number relationships. I think the best way
      to deal with this is to remove revision numbers from storage and to either
      dynamically derive them (by reconstructing a DAG from nodes/parents) or remove
      revision numbers from the file storage interface completely.
      
      A missing API that we'll likely want to write pretty soon is "ensure files
      for revision(s) are present." We can kind of cajole exchangev2.pull() to do
      this. But it isn't very efficient. For example, in simple cases like
      widening the store to obtain data for a single revision, it is probably
      more efficient to walk the manifest and find exactly which file revisions
      are missing and to make explicit requests for just their data. In more
      advanced cases, asking the server for all files data may be more efficient,
      even though it requires sending data the client already has. There is tons
      of room for future experimentation here. And TBH I'm not sure what the
      final state will be.
      
      Anyway, this commit gets us pretty close to being able to have shallow
      and narrow checkouts with exchangev2/sqlite storage. Close enough that a
      minimal extension should be able to provide fill in the gaps until the code
      in core stabilizes and there is a user-facing way to trigger the
      narrow/shallow bits from `hg clone` without also implying using of the
      narrow extension...
      
      Differential Revision: https://phab.mercurial-scm.org/D5169
      229d23cdb203
  14. Oct 17, 2018
    • Gregory Szorc's avatar
      sqlitestore: support for storing revisions without their parents · 595641bd8404
      Gregory Szorc authored
      This commit kinda/sorta implements the equivalent of ellipsis nodes for
      the SQLite storage backend.
      
      Without implementing full blown ellipsis nodes (and the necessary support for
      them in the wire protocol), we instead teach the store to rewrite the p1 and
      p2 nodes to nullid when the incoming parent isn't in the local store. This allows
      servers to remain dumb and send the real parent and have the clients deal
      with the missing parent problem.
      
      This obviously isn't ideal because a benefit of ellipsis nodes is we can
      insert a fake parent to ellide missing changesets. But neither solution is
      ideal because it drops the original parent from storage. We could probably
      teach the SQLite store to retain the original parent and handle missing
      parents at read time. However, parent revisions are stored as integers and
      it isn't trivial to store an "empty" revision in the store yet, which would
      be necessary to represent the "missing" parent.
      
      The store is somewhat intelligent in trying to remove the missing parents
      metadata when the revision is re-added. But, revision numbers will be all
      messed up in that case, so I'm not sure it is worth it. At some point we'll
      likely want to remove the concept of revision numbers from the database and
      have the store invent them at index generation time. Or even better, we can
      do away with revision numbers from the file storage interface completely.
      We'll get there eventually...
      
      Differential Revision: https://phab.mercurial-scm.org/D5168
      595641bd8404
  15. Oct 19, 2018
    • Gregory Szorc's avatar
      wireprotov2: support exposing linknode of file revisions · abbd077965c0
      Gregory Szorc authored
      When supporting shallow file storage, clients may fetch file revisions
      by changeset. But they may not readily know which changeset introduced a
      specific file revision. The "linknode" is used to record which changeset
      introduces which file revision.
      
      This commit teaches the "filedata" and "filesdata" wire protocol commands
      to expose the linknode for file revisions. The implementation is likely
      wrong when hidden changesets are in play, since the linknode may refer to
      a hidden changeset. We can deal with this problem later.
      
      Differential Revision: https://phab.mercurial-scm.org/D5167
      abbd077965c0
    • Gregory Szorc's avatar
      localrepo: support marking repos as having shallow file storage · 7e3b6c4f01a2
      Gregory Szorc authored
      Various operations against repositories need to know if repository
      storage is full or partial. For example, a checkout (including possibly
      a widening of a sparse checkout), needs to know if it can assume all file
      revisions are available or whether to look for missing revisions first.
      
      This commit lays the plumbing for doing that.
      
      We define a repo creation option that indicates that shallow file storage
      is desired.
      
      The SQLite store uses this creation option to add an extra repo requirement
      indicating file storage is shallow.
      
      A new repository feature has been added to indicate that file storage is
      shallow. The SQLite store adds this feature when the shallow file store
      requirement is present.
      
      Code can now look at repo.features to determine if repo file storage may
      be shallow and take additional actions if so.
      
      While we're here, we also teach the SQLite store to handle the narrow repo
      requirement, which gets added when making narrow clones.
      
      Differential Revision: https://phab.mercurial-scm.org/D5166
      7e3b6c4f01a2
  16. Sep 26, 2018
    • Gregory Szorc's avatar
      repository: teach addgroup() to receive data with missing parents · 1b183edbb68e
      Gregory Szorc authored
      The way the narrow extension works today, the server rewrites
      outgoing changegroup data to lie about parents when the parents
      data is missing. It adds the ellipsis flag to the revision so
      it can be recorded as such in the revlog.
      
      In the new wire protocol, such rewriting does not occur on
      the server (at least not yet anyway). Instead, it is up to the
      client to recognize when it has received a revision without its
      parents. This means rewriting will be performed on the client.
      
      Furthermore, the mechanism for storing a shallow revision may
      differ from store to store. For example, the revlog store uses
      the ellipsis flag to denote a revision's parents have been
      rewritten. But a non-revlog store may wish to store things
      differently. And, some stores may not even support receiving
      shallow revision data!
      
      Therefore, it makes sense for the store itself to be making
      decisions about what to do when they receive revision data
      without their parents.
      
      This commit teaches the addgroup() bulk insert method to accept
      a boolean argument that indicates whether the incoming data may
      lack parent revisions. This flag can be set when receiving
      "shallow" data from a remote.
      
      The revlog implementation of this method has been taught to rewrite
      the missing parent(s) to nullid and to add the ellipsis flag to
      the revision when a missing parent is encountered. But it only
      does this if ellipsis flags are enabled on the repo and the
      incoming data is marked as possibly shallow. An error occurs
      otherwise.
      
      Differential Revision: https://phab.mercurial-scm.org/D5165
      1b183edbb68e
  17. Oct 19, 2018
  18. Oct 03, 2018
    • Gregory Szorc's avatar
      filelog: add a hasnode() method (API) · f1a39128da95
      Gregory Szorc authored
      Missing in the file storage interface is the ability to query whether
      a specified value is a known node.
      
      This commit defines that interface member and implements it on the
      revlog and sqlite file stores.
      
      Storage unit tests have been added.
      
      The revlog implementation is a bit more complicated because index lookups
      don't consistently raise the same exception. For SQLite, we can simply look
      for a key in a dict.
      
      Differential Revision: https://phab.mercurial-scm.org/D5163
      f1a39128da95
  19. Oct 22, 2018
    • Matt Harbison's avatar
      lfs: consult the narrow matcher when extracting pointers from ctx (issue5794) · 4a81d82474e9
      Matt Harbison authored
      I added a testcase for lfs to all narrow tests, and the following failed:
      
          test-narrow-acl.t
          test-narrow-exchange.t
          test-narrow-patterns.t
          test-narrow-strip.t
          test-narrow-trackedcmd.t
          test-narrow-widen.t
          test-narrow.t
      
      The first two still have errors in the pretxnchangegroup on clone and (receiving
      a) push, which I'm still looking into (4d63f3bc1e1a fixed something in this area
      already).  These two modified tests seem to cover the things that failed in the
      remaining narrow tests, i.e. `hg tracked` and `hg strip`, so I didn't bother
      enabling the testcases elsewhere.  Maybe we should, but it's 68 tests total.
      4a81d82474e9
  20. Oct 20, 2018
  21. Oct 19, 2018
Loading