Skip to content
Snippets Groups Projects
  1. Oct 14, 2015
  2. Oct 15, 2015
  3. Oct 14, 2015
  4. Oct 13, 2015
    • Ryan McElroy's avatar
      rebase: factor out nothing to rebase return code · 66dc39cd
      Ryan McElroy authored
      A rebase call that results in nothing to rebase might be considered successful
      in some contexts. This factors out the return code from places where hg
      determines that there is nothing to rebase, so an extenion might change this
      return code to be something that would allow scripts to run without seeing this
      as an error.
      66dc39cd
  5. Oct 14, 2015
    • Anton Shestakov's avatar
      gitweb: visually highlight source lines when hovering over line numbers · ab2cd800
      Anton Shestakov authored
      Due to how the line links now reside outside of the source lines, hovering over
      line numbers doesn't count as hovering over the appropriate source line. It can
      be worked around by using a "+" css selector. However, it's necessary to
      reorder the elements and put <a> before <span> (which is actually quite
      logical). It works without further css tweaks because <a> is already
      absolute-positioned and so the order doesn't matter visually.
      ab2cd800
  6. Oct 13, 2015
  7. Oct 14, 2015
    • Anton Shestakov's avatar
      monoblue: visually highlight source lines when hovering over line numbers · ceb44643
      Anton Shestakov authored
      Due to how the line links now reside outside of the source lines, hovering over
      line numbers doesn't count as hovering over the appropriate source line. It can
      be worked around by using a "+" css selector. However, it's necessary to
      reorder the elements and put <a> before <span> (which is actually quite
      logical). It works without further css tweaks because <a> is already
      absolute-positioned and so the order doesn't matter visually.
      ceb44643
    • Anton Shestakov's avatar
      monoblue: make the size of line links bigger to cover line numbers better · 721274ce
      Anton Shestakov authored
      Due to how the line numbers in monoblue are formed (via css counters), the size
      of the area with the numbers and the size of the actually clickable links are
      not tied together well enough. Before this patch, there were noticeable "gaps"
      between line links - clicking on the bottom part of a visible line number did
      nothing as opposed to selecting this line.
      
      Let's set font-size for everything in pre.sourcelines so that it also affects
      the links and then add a bit of padding to them so compensate for layout
      differences.
      
      This way the sizes are still not 100% the same, but should be very close.
      721274ce
  8. Sep 26, 2015
    • Anton Shestakov's avatar
      gitweb: don't drop current revision context on graph page · e901df65
      Anton Shestakov authored
      In hgweb, some pages have a context of current revision; e.g. changelog and
      shortlog show changesets starting from this current revision. However, some
      gitweb templates were dropping current revision from some urls _to_ /graph page
      and _on_ that page. This patch fixes it.
      e901df65
  9. Oct 13, 2015
    • Sean Farley's avatar
      util: also catch IndexError · 6331a0c3
      Sean Farley authored
      This makes life so, so much easier for hgwatchman, which provides a named tuple
      but throws an IndexError instead of a TypeError.
      6331a0c3
  10. Oct 14, 2015
  11. Oct 12, 2015
  12. Aug 19, 2015
  13. Aug 21, 2015
  14. Oct 12, 2015
  15. Oct 01, 2015
  16. Sep 29, 2015
    • Siddharth Agarwal's avatar
      merge.mergestate: add support for persisting driver-resolved files · 6ff5534c
      Siddharth Agarwal authored
      A driver-resolved file is a file that's handled specially by the driver. A
      common use case for this state would be autogenerated files, the generation of
      which should happen only after all source conflicts are resolved.
      
      This is done with an uppercase letter because older versions of Mercurial will
      not know how to treat such files at all.
      6ff5534c
  17. Oct 01, 2015
    • Siddharth Agarwal's avatar
      merge.mergestate: add support for persisting a custom merge driver · f618b6aa
      Siddharth Agarwal authored
      A 'merge driver' is a coordinator for the overall merge process. It will be
      able to control:
      
      - tools for individual files, much like the merge-patterns configuration does
        today
      - tools that can work across groups of files
      - the ordering of file resolution
      - resolution of automatically generated files
      - adding and removing additional files to and from the dirstate
      
      Since it is a critical part of the merge process, it really is part of the
      merge state.
      
      This is a lowercase character (i.e. optional) because ignoring this is fine for
      older versions of Mercurial -- however, if there are any files that are
      specially treated by the driver, we should abort. That will happen in upcoming
      patches.
      
      There is a potential security issue with storing the merge driver in the merge
      state. See the inline comments for more details.
      f618b6aa
  18. Oct 13, 2015
    • Gregory Szorc's avatar
      exchange: support sorting URLs by client-side preferences · c347d532
      Gregory Szorc authored
      Not all bundles are appropriate for all clients. For example, someone
      with a slow Internet connection may want to prefer bz2 bundles over gzip
      bundles because they are smaller and don't take as long to transfer.
      This is information that a server cannot know on its own. So, we invent
      a mechanism for "preferring" server-advertised URLs based on their
      attributes.
      
      We could invent a negotiation between client and server where the client
      sends its preferences and the sorting/filtering is done server-side.
      However, this feels complex. We can avoid complicating the wire protocol
      and exposing ourselves to backwards compatible concerns by performing
      the sorting locally.
      
      This patch defines a new config option for expressing preferred
      attributes in server-advertised bundles.
      
      At Mozilla, we leverage this feature so clients in fast data centers
      prefer uncompressed bundles. (We advertise gzip bundles first because
      that is a reasonable default.)
      
      I consider this an advanced feature. I'm on the fence as to whether it
      should be documented in `hg help config`.
      c347d532
    • Gregory Szorc's avatar
      exchange: extract bundle specification components into own attributes · 62b0fa0d
      Gregory Szorc authored
      An upcoming patch will enable clients to prefer certain bundles over
      others. The idea is that we define values of attributes from manifests
      that are desirable.
      
      The BUNDLESPEC attribute is a complex value consisting of multiple
      parts. Clients may wish to only prefer one of these parts. Having to
      specify every combination of BUNDLESPEC would be annoying. So, we
      extract the components of BUNDLESPEC into their own attributes so
      clients can easily filter on a sub-component.
      62b0fa0d
    • Gregory Szorc's avatar
      exchange: support preserving external names when parsing bundle specs · 77769354
      Gregory Szorc authored
      This will be needed to make client-side preferences work easier.
      77769354
    • Gregory Szorc's avatar
      clonebundles: filter on SNI requirement · 2faa7671
      Gregory Szorc authored
      Server Name Indication (SNI) is commonly used in CDNs and other hosted
      environments. Unfortunately, Python <2.7.9 does not support SNI and when
      these older Python versions attempt to negotiate TLS to an SNI server,
      they raise an opaque error like
      "_ssl.c:507: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert
      handshake failure."
      
      We introduce a manifest attribute to denote the URL requires SNI and
      have clients without SNI support filter these entries.
      2faa7671
    • Gregory Szorc's avatar
      clonebundles: filter on bundle specification · 74de1c59
      Gregory Szorc authored
      Not all clients are capable of reading every bundle. Currently, content
      negotiation to ensure a server sends a client a compatible bundle
      format is performed at request time. The response bundle is dynamically
      generated at request time, so this works fine.
      
      Clone bundles are statically generated *before* the request. This means
      that a modern server could produce bundles that a legacy client isn't
      capable of reading. Without some kind of "type hint" in the clone
      bundles manifest, a client may attempt to download an incompatible
      bundle. Furthermore, a client may not realize a bundle is incompatible
      until it has processed part of the bundle (imagine consuming a 1 GB
      changegroup bundle2 part only to discover the bundle2 part afterwards is
      incompatibl). This would waste time and resources. And it isn't very
      user friendly.
      
      Clone bundle manifests thus need to advertise the *exact* format of the
      hosted bundles so clients may filter out entries that they don't know
      how to read. This patch introduces that mechanism.
      
      We introduce the BUNDLESPEC attribute to declare the "bundle
      specification" of the entry. Bundle specifications are parsed using
      exchange.parsebundlespecification, which uses the same strings as the
      "--type" argument to `hg bundle`. The supported bundle specifications
      are well defined and backwards compatible.
      
      When a client encounters a BUNDLESPEC that is invalid or unsupported, it
      silently ignores the entry.
      74de1c59
    • Gregory Szorc's avatar
      clonebundle: support bundle2 · d2e16419
      Gregory Szorc authored
      exchange.readbundle() can return 2 different types. We weren't handling
      the bundle2 case. Handle it.
      
      At some point we'll likely want a generic API for applying a bundle from
      a file handle. For now, create another one-off until we figure out what
      the unified bundle API should look like (addressing this is a can of
      worms I don't want to open right now).
      d2e16419
  19. Oct 06, 2015
  20. Sep 29, 2015
    • Pierre-Yves David's avatar
      destupdate: also include bookmark related logic · 5c57d01f
      Pierre-Yves David authored
      For the same reason, we move the bookmark related update logic into the
      'destupdate' function. This requires to extend the returns of the function to
      include the bookmark that needs to move (more or less) and the bookmark to
      activate at the end of the function. See function documentation for details on
      this returns.
      5c57d01f
  21. Oct 13, 2015
    • Gregory Szorc's avatar
      exchange: refactor bundle specification parsing · b13fdcc4
      Gregory Szorc authored
      The old code was tailored to `hg bundle` usage and not appropriate for
      use as a general API, which clone bundles will require. The code has
      been rewritten to make it more generally suitable.
      
      We introduce dedicated error types to represent invalid and unsupported
      bundle specifications. The reason we need dedicated error types (rather
      than error.Abort) is because clone bundles will want to catch these
      exception as part of filtering entries. We don't want to swallow
      error.Abort on principle.
      b13fdcc4
    • Gregory Szorc's avatar
      exchange: move bundle specification parsing from cmdutil · 92d67e57
      Gregory Szorc authored
      Clone bundles require a well-defined string to specify the type of
      bundle that is listed so clients can filter compatible file types. The
      `hg bundle` command and cmdutil.parsebundletype() already establish the
      beginnings of a bundle specification format.
      
      As part of formalizing this format specification so it can be used by
      clone bundles, we move the specification parsing bits verbatim to
      exchange.py, which is a more suitable place than cmdutil.py. A
      subsequent patch will refactor this code to make it more appropriate as
      a general API.
      92d67e57
  22. Mar 23, 2015
    • Yuya Nishihara's avatar
      revset: add optional offset argument to limit() predicate · 7afaf256
      Yuya Nishihara authored
      It's common for GUI or web frontend to fetch chunk of revisions per batch
      size. Previously it was possible only if revisions were sorted by revision
      number.
      
        $ hg log -r 'limit({revspec} & :{last_known}, 101)'
      
      So this patch introduces a general way to retrieve chunk of revisions after
      skipping offset revisions.
      
        $ hg log -r 'limit({revspec}, 100, {last_count})'
      
      This is a dumb implementation. We can optimize it for baseset and spanset
      later.
      7afaf256
  23. Oct 12, 2015
Loading