Skip to content
Snippets Groups Projects
  1. Aug 26, 2016
  2. Aug 29, 2016
  3. Aug 26, 2016
  4. Aug 29, 2016
  5. Aug 24, 2016
    • Pierre-Yves David's avatar
      journal: rename on disk files to 'namejournal' · 6d11ae3c
      Pierre-Yves David authored
      The 'journal' naming is already used by the transaction journal. Having an
      unrelated group of file with such a close naming is confusing and error prone.
      We rename the file used by the 'journal' extension to use 'namejournal' as the
      extension track the location of various 'names'.
      6d11ae3c
  6. Aug 25, 2016
  7. Aug 23, 2016
    • Gregory Szorc's avatar
      help: document wire protocol commands · 80c11c1a
      Gregory Szorc authored
      80c11c1a
    • Gregory Szorc's avatar
      help: document wire protocol "handshake" protocol · f0d47aca
      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.
      f0d47aca
    • Gregory Szorc's avatar
      help: document wire protocol capabilities · 2435ba6c
      Gregory Szorc authored
      All capabilities from the history of the project are now documented.
      2435ba6c
    • Gregory Szorc's avatar
      help: document wire protocol transport protocols · b42c26b0
      Gregory Szorc authored
      The HTTP and SSH transport protocols are documented. This
      includes how commands and arguments are serialized as well as
      response types.
      b42c26b0
    • Gregory Szorc's avatar
      help: internals topic for wire protocol · a1092e2d
      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.
      a1092e2d
  8. Aug 18, 2016
  9. Jul 05, 2016
  10. Aug 25, 2016
    • Matt Mackall's avatar
      templater: add template path to __base__ search · b1f69dbd
      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".
      b1f69dbd
  11. Aug 23, 2016
    • Augie Fackler's avatar
      blackbox: also log alias expansions · 318e2b60
      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.
      318e2b60
  12. Aug 25, 2016
  13. Aug 23, 2016
    • Augie Fackler's avatar
      extensions: change magic "shipped with hg" string · d5883fd0
      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.
      d5883fd0
  14. Aug 25, 2016
    • Yuya Nishihara's avatar
      version: add formatter support · 4435d4c9
      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.
      4435d4c9
  15. Aug 16, 2016
  16. Mar 13, 2016
    • Yuya Nishihara's avatar
      formatter: add fm.nested(field) to either write or build sub items · 5b886289
      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.
      5b886289
  17. Aug 15, 2016
  18. Aug 24, 2016
    • Jun Wu's avatar
      crecord: restore SIGWINCH handler before return · bff109e6
      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.
      bff109e6
  19. Aug 20, 2016
  20. Jul 28, 2016
  21. Aug 19, 2016
  22. Aug 24, 2016
    • Siddharth Agarwal's avatar
      merge: remove files with extra actions from merge action list · 1316c7cc
      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.
      1316c7cc
  23. Aug 23, 2016
    • Gregory Szorc's avatar
      revlog: use an LRU cache for delta chain bases · 92ac2baa
      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.
      92ac2baa
Loading