Skip to content
Snippets Groups Projects
  1. Aug 25, 2016
  2. Aug 23, 2016
    • Gregory Szorc's avatar
      help: document wire protocol commands · 80c11c1a64bf
      Gregory Szorc authored
      80c11c1a64bf
    • Gregory Szorc's avatar
      help: document wire protocol "handshake" protocol · f0d47aca1d47
      Gregory Szorc authored
      There isn't a formal handshake protocol in the wire protocol. But
      clients almost certainly need to perform particular actions before they
      can communicate with a server optimally. So document what that is
      so people understand what's going on at connection establishment time.
      f0d47aca1d47
    • Gregory Szorc's avatar
      help: document wire protocol capabilities · 2435ba6c82e6
      Gregory Szorc authored
      All capabilities from the history of the project are now documented.
      2435ba6c82e6
    • Gregory Szorc's avatar
      help: document wire protocol transport protocols · b42c26b0a785
      Gregory Szorc authored
      The HTTP and SSH transport protocols are documented. This
      includes how commands and arguments are serialized as well as
      response types.
      b42c26b0a785
    • Gregory Szorc's avatar
      help: internals topic for wire protocol · a1092e2d70a3
      Gregory Szorc authored
      The Mercurial wire protocol is under-documented. This includes a lack
      of source docstrings and comments as well as pages on the official
      wiki.
      
      This patch adds the beginnings of "internals" documentation on the
      wire protocol.
      
      The documentation should have nearly complete coverage on the
      lower-level parts of the protocol, such as the different transport
      mechanims, how commands and arguments are sent, capabilities, and,
      of course, the commands themselves.
      
      As part of writing this documentation, I discovered a number of
      deficiencies in the protocol and bugs in the implementation. I've
      started sending patches for some of the issues. I hope to send a lot
      more.
      
      This patch starts with the scaffolding for a new internals page.
      a1092e2d70a3
  3. Aug 18, 2016
  4. Jul 05, 2016
  5. Aug 25, 2016
    • Matt Mackall's avatar
      templater: add template path to __base__ search · b1f69dbdd76b
      Matt Mackall authored
      This does a fall-back check for style files or directories that are
      in Mercurial's template path for user convenience.
      
      We intentionally don't use this for the built-in coal style because we don't
      want the style to mysteriously break if the working directory just
      happens to have a file named "paper".
      b1f69dbdd76b
  6. Aug 23, 2016
    • Augie Fackler's avatar
      blackbox: also log alias expansions · 318e2b600b80
      Augie Fackler authored
      This should be extremely useful for helping users debug without having
      to see their complete configuration.
      
      Shell aliases do not get their expansion logged, because we don't look
      and see if we're in a repo before we dive into the execution of a
      shell alias. As a result, the ui object doesn't know where to log.
      318e2b600b80
  7. Aug 25, 2016
  8. Aug 23, 2016
    • Augie Fackler's avatar
      extensions: change magic "shipped with hg" string · d5883fd055c6
      Augie Fackler authored
      I've caught multiple extensions in the wild lying about being
      'internal', so it's time to move the goalposts on people. Goalpost
      moving will continue until third party extensions stop trying to
      defeat the system.
      d5883fd055c6
  9. Aug 25, 2016
    • Yuya Nishihara's avatar
      version: add formatter support · 4435d4c951ec
      Yuya Nishihara authored
      The license message isn't exported, which I don't think is useful and I
      couldn't find a way to restructure it for JSON or template outputs.
      4435d4c951ec
  10. Aug 16, 2016
  11. Mar 13, 2016
    • Yuya Nishihara's avatar
      formatter: add fm.nested(field) to either write or build sub items · 5b886289a1ca
      Yuya Nishihara authored
      We sometimes need to build nested items by formatter, but there was no
      convenient way other than building and putting them manually by fm.data():
      
        exts = []
        for n, v in extensions:
            fm.plain('%s %s\n' % (n, v))
            exts.append({'name': n, 'ver': v})
        fm.data(extensions=exts)
      
      This should work for simple cases, but doing this would make it harder to
      change the underlying data type for better templating support.
      
      So this patch provides fm.nested(field), which returns new nested formatter
      (or self if items aren't structured and just written to ui.) A nested formatter
      stores items which will later be rendered by the parent formatter.
      
        fn = fm.nested('extensions')
        for n, v in extensions:
            fn.startitem()
            fn.write('name ver', '%s %s\n', n, v)
        fn.end()
      
      Nested items are directly exported to a template for now:
      
        {extensions % "{name} {ver}\n"}
      
      There's no {extensions} nor {join(extensions, sep)} yet. I have a plan for
      them by extending fm.nested() API, but I want to revisit it after trying
      out this API in the real world.
      5b886289a1ca
  12. Aug 15, 2016
  13. Aug 24, 2016
    • Jun Wu's avatar
      crecord: restore SIGWINCH handler before return · bff109e6398a
      Jun Wu authored
      Previously, the SIGWINCH handler does not get cleared and if the commit
      message editor also needs SIGWINCH handling (like vim), the two SIGWINCH
      handlers (the editor's, ours) will have a race. And we may erase the
      editor's screen content.
      
      This patch restores SIGWINCH handler to address the above issue.
      bff109e6398a
  14. Aug 20, 2016
  15. Jul 28, 2016
  16. Aug 19, 2016
  17. Aug 24, 2016
    • Siddharth Agarwal's avatar
      merge: remove files with extra actions from merge action list · 1316c7cccc76
      Siddharth Agarwal authored
      See the comment for a detailed explanation why.
      
      Even though this is a bug, I've sent it to 'default' rather than 'stable'
      because it isn't triggered in any code paths in stock Mercurial, just with the
      merge driver included. For the same reason I haven't included any tests here --
      the merge driver is getting a new test.
      1316c7cccc76
  18. Aug 23, 2016
    • Gregory Szorc's avatar
      revlog: use an LRU cache for delta chain bases · 92ac2baaea86
      Gregory Szorc authored
      Profiling using statprof revealed a hotspot during changegroup
      application calculating delta chain bases on generaldelta repos.
      Essentially, revlog._addrevision() was performing a lot of redundant
      work tracing the delta chain as part of determining when the chain
      distance was acceptable. This was most pronounced when adding
      revisions to manifests, which can have delta chains thousands of
      revisions long.
      
      There was a delta chain base cache on revlogs before, but it only
      captured a single revision. This was acceptable before generaldelta,
      when _addrevision would build deltas from the previous revision and
      thus we'd pretty much guarantee a cache hit when resolving the delta
      chain base on a subsequent _addrevision call. However, it isn't
      suitable for generaldelta because parent revisions aren't necessarily
      the last processed revision.
      
      This patch converts the delta chain base cache to an LRU dict cache.
      The cache can hold multiple entries, so generaldelta repos have a
      higher chance of getting a cache hit.
      
      The impact of this change when processing changegroup additions is
      significant. On a generaldelta conversion of the "mozilla-unified"
      repo (which contains heads of the main Firefox repositories in
      chronological order - this means there are lots of transitions between
      heads in revlog order), this change has the following impact when
      performing an `hg unbundle` of an uncompressed bundle of the repo:
      
      before: 5:42 CPU time
      after:  4:34 CPU time
      
      Most of this time is saved when applying the changelog and manifest
      revlogs:
      
      before: 2:30 CPU time
      after:  1:17 CPU time
      
      That nearly a 50% reduction in CPU time applying changesets and
      manifests!
      
      Applying a gzipped bundle of the same repo (effectively simulating a
      `hg clone` over HTTP) showed a similar speedup:
      
      before: 5:53 CPU time
      after:  4:46 CPU time
      
      Wall time improvements were basically the same as CPU time.
      
      I didn't measure explicitly, but it feels like most of the time
      is saved when processing manifests. This makes sense, as large
      manifests tend to have very long delta chains and thus benefit the
      most from this cache.
      
      So, this change effectively makes changegroup application (which is
      used by `hg unbundle`, `hg clone`, `hg pull`, `hg unshelve`, and
      various other commands) significantly faster when delta chains are
      long (which can happen on repos with large numbers of files and thus
      large manifests).
      
      In theory, this change can result in more memory utilization. However,
      we're caching a dict of ints. At most we have 200 ints + Python object
      overhead per revlog. And, the cache is really only populated when
      performing read-heavy operations, such as adding changegroups or
      scanning an individual revlog. For memory bloat to be an issue, we'd
      need to scan/read several revisions from several revlogs all while
      having active references to several revlogs. I don't think there are
      many operations that do this, so I don't think memory bloat from the
      cache will be an issue.
      92ac2baaea86
    • Gregory Szorc's avatar
      revlog: remove unused variables · dae97049345b
      Gregory Szorc authored
      dae97049345b
    • Gregory Szorc's avatar
      util: properly implement lrucachedict.get() · 79add5a4e857
      Gregory Szorc authored
      Before, it was returning the raw _lrucachenode instance instead of its
      value.
      79add5a4e857
  19. Aug 17, 2016
    • Durham Goode's avatar
      manifest: change changectx to access manifest via manifestlog · a22b3de3b65a
      Durham Goode authored
      This is the first place where we'll start using manifestctx instances instead of
      manifestdict. This will facilitate using different manifestctx implementations
      in the future.
      a22b3de3b65a
    • Durham Goode's avatar
      manifest: use property instead of field for manifest revlog storage · 93b44aa17691
      Durham Goode authored
      The file caches we're using to avoid reloading the manifest from disk everytime
      has an annoying bug that causes the in memory structure to not be reloaded if
      the mtime and the size haven't changed. This causes a breakage in the tests
      because the manifestlog is not being reloaded after a commit+strip operation in
      mq (the mtime is the same because it all happens in the same second, and the
      resulting size is the same because we add 1 and remove 1). The only reason this
      doesn't affect the manifest itself is because we touch it so often that we
      had already reloaded it after the commit, but before the strip.
      
      Once the entire manifest has migrated to manifestlog, we can get rid of these
      properties, since then the manifestlog will be touched after the commit, but
      before the strip, as well.
      93b44aa17691
    • Durham Goode's avatar
      manifest: introduce manifestlog and manifestctx classes · 426d931e5db2
      Durham Goode authored
      This is the start of a large refactoring of the manifest class. It introduces
      the new manifestlog and manifestctx classes which will represent the collection
      of all manifests and individual instances, respectively.
      
      Future patches will begin to convert usages of repo.manifest to
      repo.manifestlog, adding the necessary functionality to manifestlog and instance
      as they are needed.
      426d931e5db2
    • Durham Goode's avatar
      manifest: make manifest derive from manifestrevlog · 58d4ecdc531e
      Durham Goode authored
      As part of our refactoring to split the manifest concept from its storage, we
      need to start moving the revlog specific parts of the manifest implementation to
      a new class. This patch creates manifestrevlog and moves the fulltextcache onto
      the base class.
      58d4ecdc531e
    • Durham Goode's avatar
      manifest: break mancache into two caches · 27c0792e834c
      Durham Goode authored
      The old manifest cache cached both the inmemory representation and the raw text.
      As part of the manifest refactor we want to separate the storage format from the
      in memory representation, so let's split this cache into two caches.
      
      This will let other manifest implementations participate in the in memory cache,
      while allowing the revlog based implementations to still depend on the full text
      caching where necessary.
      27c0792e834c
Loading