Skip to content
Snippets Groups Projects
  1. Oct 20, 2015
  2. Oct 15, 2015
  3. Oct 19, 2015
  4. Oct 16, 2015
  5. Oct 14, 2015
  6. Oct 15, 2015
  7. Oct 16, 2015
  8. Oct 18, 2015
    • Yuya Nishihara's avatar
      parsers: suppress warning of signed and unsigned comparison at nt_init · 3c259710
      Yuya Nishihara authored
      Spotted by CC=clang CFLAGS='-Wall -Wextra -Wno-missing-field-initializers
      -Wno-unused-parameter -Wshorten-64-to-32':
      
        mercurial/parsers.c:1580:24: warning: comparison of integers of different
        signs: 'Py_ssize_t' (aka 'long') and 'unsigned long' [-Wsign-compare]
                        if (self->raw_length > INT_MAX / sizeof(nodetree)) {
      3c259710
  9. Oct 17, 2015
    • Yuya Nishihara's avatar
      parsers: correct type of temporary variables for dirstate tuple fields · 04ab2348
      Yuya Nishihara authored
      These fields are defined as int. This eliminates the following warning
      spotted by CC=clang CFLAGS='-Wall -Wextra -Wno-missing-field-initializers
      -Wno-unused-parameter -Wshorten-64-to-32':
      
        mercurial/parsers.c:625:29: warning: comparison of integers of different
        signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
                        if (state == 'n' && mtime == now) {
      04ab2348
  10. Oct 16, 2015
  11. Oct 17, 2015
  12. Oct 15, 2015
  13. Oct 17, 2015
    • Durham Goode's avatar
      histedit: make histedit prune when obsolete is enabled · 50fc80e4
      Durham Goode authored
      Back in June we made histedit use obsolete markers to cleanup when possible.
      This was rolled back as part of 54f9561088c7 (which should have only rolled back
      the --abort stuff, but rolled back everything). This caused a nasty bug when
      used in conjuction with the inhibit+directaccess extensions where histedit would
      leave old nodes around even after they had been squashed away.
      
      The root of the problem is that we first clean up old nodes, and then we clean
      up temp nodes. In the first pass, when we obsoleted old nodes, some would become
      unobsolete because they had temp nodes on top of them, thus making them stick
      around even after the histedit finished.
      
      The fix is to A) move the temp node cleanup to be before the old node cleanup
      (since they are topological on top of the old nodes), and B) use obsolete
      markers instead of stripping.
      50fc80e4
    • Gregory Szorc's avatar
      clonebundles: rewrite documentation · 26f62285
      Gregory Szorc authored
      There are a lot of considerations server operators need to know before
      deploying clone bundles. They should be documented. So I rewrote the
      extension docs to contain this information.
      26f62285
    • Gregory Szorc's avatar
      exchange: support streaming clone bundles in clone bundles · 8270ee35
      Gregory Szorc authored
      Now that we have support for detecting compatible stream clone bundles
      in bundle specifications, we can safely add support for applying stream
      clone bundles to the clone bundles feature.
      8270ee35
    • Gregory Szorc's avatar
      exchange: parse requirements from stream clone specification string · a18ee7da
      Gregory Szorc authored
      Stream clone bundles can only be consumed if the consumer supports the
      exact format requirements that were present on the producer.
      
      This patch adds support for encoding and verifying the format
      requirements on the bundle specification string for a stream clone
      bundle are supported by the local repository. If they aren't, we raise
      an UnsupportedBundleSpecification, just like we do when an unknown
      compression or bundle type is encountered.
      
      The impetus for this patch is so the clone bundles manifest can
      advertise stream clone bundles and so clients can filter out stream
      clones with unsupported format requirements. e.g. a stream clone
      produced with the not-yet-invented "revlogv2" format will be ignored by
      clients that only support "revlogv1."
      a18ee7da
  14. Oct 15, 2015
    • Gregory Szorc's avatar
      exchange: support parameters in bundle specification strings · c0f475ac
      Gregory Szorc authored
      Sometimes a basic type string is not sufficient for representing the
      contents of a bundle. Take bundle2 for example: future bundle2 files may
      contain parts that today's bundle2 parser can't read. Another example is
      stream clone data. These require clients to support specific
      repository formats or they won't be able to read the written files. In
      both scenarios, we need to describe additional metadata beyond the outer
      container type. Furthermore, this metadata behaves more like an
      unordered set, so an order-based declaration format (such as static
      strings) is not sufficient.
      
      We introduce support for "parameters" into the bundle specification
      string. These are essentially key-value pairs that can be used to encode
      additional metadata about the bundle.
      
      Semicolons are used as the delimiter partially to increase similarity to
      MIME parameter values (see RFC 2231) and because they are relatively
      safe from the command line (although values will need quotes to avoid
      interpretation as multiple shell commands). Alternatives considered were
      spaces (a bit annoying to encode) and '&' (similar to URL query strings)
      (which will do bad things in a shell if unquoted).
      
      The parsing function now returns a dict of parsed parameters and
      consumers have been updated accordingly.
      c0f475ac
    • Gregory Szorc's avatar
      commands: support consuming stream clone bundles · bde7ef23
      Gregory Szorc authored
      For the same reasons that we don't produce stream clone bundles with `hg
      bundle`, we don't support consuming stream clone bundles with `hg
      unbundle`. We introduce a complementary debug command for applying
      stream clone bundles. This command is mostly to facilitate testing.
      Although it may be used to manually apply stream clone bundles until a
      more formal mechanism is (possibly) adopted.
      bde7ef23
  15. Oct 17, 2015
    • Gregory Szorc's avatar
      commands: support creating stream clone bundles · 43708f92
      Gregory Szorc authored
      Now that we have support for recognizing the streaming clone bundle
      type, add a debug command for creating them.
      
      I decided to create a new debug command instead of adding support to `hg
      bundle` because stream clone bundles are not exactly used the same way
      as normal bundle files and I don't want to commit to supporting them
      through the official `hg bundle` command forever. A debug command,
      however, can be changed without as much concern for backwards
      compatibility.
      
      As part of this, `hg bundle` will explicitly reject requests to produce
      stream bundles.
      
      This command will be required by server operators using stream clone
      bundles with the clone bundles feature.
      43708f92
  16. Oct 15, 2015
    • Gregory Szorc's avatar
      exchange: support for streaming clone bundles · 9e272a96
      Gregory Szorc authored
      Now that we have a mechanism to produce and consume streaming clone
      bundles, we need to teach the human-facing bundle specification parser
      and the internal bundle file header reading code to be aware of this new
      format. This patch does so.
      
      For the human-facing bundle specification, we choose the name "packed"
      to describe "streaming clone bundles" because the bundle is essentially
      a "pack" of raw revlog files that are "packed" together. There should
      probably be a bikeshed over the name, especially since it is human
      facing.
      9e272a96
  17. Oct 17, 2015
    • Gregory Szorc's avatar
      streamclone: support for producing and consuming stream clone bundles · bb0b955d
      Gregory Szorc authored
      Up to this point, stream clones only existed as a dynamically generated
      data format produced and consumed during streaming clones. In order to
      support this efficient cloning format with the clone bundles feature, we
      need a more formal, on disk representation of the streaming clone data.
      
      This patch introduces a new "bundle" type for streaming clones. Unlike
      existing bundles, it does not contain changegroup data. It does,
      however, share the same concepts like the 4 byte header which identifies
      the type of data that follows and the 2 byte abbreviation for
      compression types (of which only "UN" is currently supported).
      
      The new bundle format is essentially the existing stream clone version 1
      data format with some headers at the beginning.
      
      Content negotiation at stream clone request time checked for repository
      format/requirements compatibility before initiating a stream clone. We
      can't do active content negotiation when using clone bundles. So, we put
      this set of requirements inside the payload so consumers have a built-in
      mechanism for checking compatibility before reading and applying lots of
      data. Of course, we will also advertise this requirements set in clone
      bundles. But that's for another patch.
      
      We currently don't have a mechanism to produce and consume this new
      bundle format. This will be implemented in upcoming patches.
      
      It's worth noting that if a legacy client attempts to `hg unbundle` a
      stream clone bundle (with the "HGS1" header), it will abort with:
      "unknown bundle version S1," which seems appropriate.
      bb0b955d
    • Matt Mackall's avatar
      e7e1528c
  18. Oct 15, 2015
    • Katsunori FUJIWARA's avatar
      transaction: reorder unlinking .hg/journal and .hg/journal.backupfiles · 96dd93de
      Katsunori FUJIWARA authored
      After this reordering, absence of '.hg/journal' just before starting
      new transaction means also absence of '.hg/journal.backupfiles'.
      
      In this case, all temporary files for preceding transaction should be
      completely unlinked, and HG_PENDING doesn't cause unintentional
      reading stalled temporary files in.
      
      Otherwise, 'repo.transaction()' raises exception with "run 'hg
      recover' to clean up transaction" hint.
      96dd93de
Loading