Skip to content
Snippets Groups Projects
  1. Jun 01, 2015
    • Jordi Gutiérrez Hermoso's avatar
      phases: rewrite "immutable changeset" to "public changeset" · d298805f
      Jordi Gutiérrez Hermoso authored
      The phrase "cannot edit immutable changeset" is kind of tautological.
      Of course unchangeable things can't be changed. We instead mention
      "public" and provide a hint so that we can point to the actual
      problem. Even in cases where some operation other than edition cannot
      be performed, "public" gives the root cause that results in the
      "immutable" effect.
      
      There is a precedent for saying "public" instead of "immutable", for
      example, in `hg commit --amend`.
      d298805f
  2. Jun 02, 2015
    • Jordi Gutiérrez Hermoso's avatar
      revlog: raise an exception earlier if an entry is too large (issue4675) · eee88912
      Jordi Gutiérrez Hermoso authored
      Before we were relying on _pack to error out when trying to pass an
      integer that was too large for the "i" format specifier. Now we check
      this earlier so we can form a better error message.
      
      The error message unfortunately must exclude the filename at this
      level of the call stack. The problem is that this name is not
      available here, and the error can be triggered by a large manifest or
      by a large file itself. Although perhaps we could provide the name of
      a revlog index file (from the revlog object, instead of the revlogio
      object), this seems like too much leakage of internal data structures.
      It's not ideal already that an error message even mentions revlogs,
      but this does seem unavoidable here.
      eee88912
  3. Jun 03, 2015
  4. May 20, 2015
    • Pierre-Yves David's avatar
      sshpeer: run the ssh command unbuffered · c88975a4
      Pierre-Yves David authored
      This is necessary to use non-blocking IO base on polling. Such polling is
      needed to restore real time output with ssh peer.
      
      Changeset fce065538bcf is talking about 5x regression on Mac OS X when playing
      with this value. So we introduced our own buffering layer in previous
      changesets. This seems to keep the regression away (we are even issuing much
      less read).
      c88975a4
  5. May 31, 2015
    • Pierre-Yves David's avatar
      sshpeer: use a 'bufferedinputpipe' for standard output of the ssh process · e461230c
      Pierre-Yves David authored
      We need this pipe to still be buffered when will switch to unbuffered pipe.
      (switch motivated by the need of using polling to restore real time output from
      ssh server). This is the only pipe that needs to be wrapped because this is the
      one who do extensive usage of 'readline'. The stderr pipe of the process is
      alway read in non blocking raw chunk, so it won't benefit from the
      buffering.
      e461230c
    • Pierre-Yves David's avatar
      util: introduce a bufferedinputpipe utility · be930f16
      Pierre-Yves David authored
      To restore real time server output through ssh, we need to using polling feature
      (like select) on the pipes used to communicate with the ssh client. However
      we cannot use select alongside python level buffering of these pipe (because we
      need to know if the buffer is non-empty before calling select).
      
      However, unbuffered performance are terrible, presumably because the 'readline'
      call is issuing 'read(1)' call until it find a '\n'. To work around that we
      introduces our own overlay that do buffering by hand, exposing the state of the
      buffer to the outside world.
      
      The usage of polling IO will be introduced later in the 'sshpeer' module. All
      its logic will be very specific to the way mercurial communicate over ssh and
      does not belong to the generic 'util' module.
      be930f16
  6. May 28, 2015
  7. Feb 06, 2015
    • Pierre-Yves David's avatar
      bundle2: use bundle2 by default · ff955e7b
      Pierre-Yves David authored
      All the test change have been isolated and validated. We have free to turn on
      bundle2 as the default exchange protocol.
      
      "To reach a port we must set sail –
      Sail, not tie at anchor
      Sail, not drift."
      ff955e7b
  8. Jun 01, 2015
    • Pierre-Yves David's avatar
      wireprotocol: distinguish list and set in getbundle argument · 30ab130a
      Pierre-Yves David authored
      The 'bundlecaps' argument is expected to be a set, but 'listkeys' is
      expected to be a list where ordering matters. We introduce a new 'scsv'
      argument type for the 'set' version and move 'csv' to the 'list'
      version.
      
      'test-ssh.t' is changed because this introduced an instability in the order we
      were producing listkeys parts.
      30ab130a
  9. May 26, 2015
    • Gregory Szorc's avatar
      exchange: support transferring .hgtags fnodes mapping · 0c2ded04
      Gregory Szorc authored
      On Mozilla's mozilla-beta repository .hgtags fnodes resolution takes
      ~18s from a clean cache on my machine. This means that the first time
      a user runs `hg tags`, `hg log`, or any other command that displays or
      accesses tags data, a ~18s pause will occur. There is no output during
      this pause. This results in a poor user experience and perception
      that Mercurial is slow.
      
      The .hgtags changeset to filenode mapping is deterministic. This
      patch takes advantage of that property by implementing support
      for transferring .hgtags filenodes mappings in a dedicated bundle2
      part. When a client advertising support for the "hgtagsfnodes"
      capability requests a bundle, a mapping of changesets to .hgtags
      filenodes will be sent to the client.
      
      Only mappings of head changesets included in the bundle will be sent. The
      transfer of this mapping effectively eliminates one time tags cache related
      pauses after initial clone.
      
      The mappings are sent as binary data. So, 40 bytes per pair of
      SHA-1s. On the aforementioned mozilla-beta repository,
      659 * 40 = 26,360 raw bytes of mappings are sent over the wire
      (in addition to the bundle part headers). Assuming 18s to populate
      the cache, we only need to transfer this extra data faster than
      1.5 KB/s for overall clone + tags cache population time to be shorter.
      Put into perspective, the mozilla-beta repository is ~1 GB in size.
      So, this additional data constitutes <0.01% of the cloned data.
      The marginal overhead for a multi-second performance win on clones
      in my opinion justifies an on-by-default behavior.
      0c2ded04
  10. Jun 02, 2015
    • Gregory Szorc's avatar
      bundle2: part handler for processing .hgtags fnodes mappings · d2920135
      Gregory Szorc authored
      .hgtags fnodes cache entries can be expensive to compute, especially
      if there are hundreds of even thousands of them. This patch implements
      support for receiving a bundle2 part that contains a mapping of
      changeset to .hgtags fnodes.
      
      An upcoming patch will teach the server to send this part, allowing
      clients to bypass having to redundantly compute these values.
      
      A number of tests changed due to the client advertising the "hgtagsfnodes"
      capability.
      d2920135
  11. Jun 03, 2015
  12. Jun 02, 2015
  13. Jun 01, 2015
    • Matt Harbison's avatar
      hgwebdir: avoid redundant repo and directory entries when 'web.name' is set · 78e8890c
      Matt Harbison authored
      Previously, when 'web.name' was set on a subrepo parent and 'web.collapse=True',
      the parent repo would show in the list with the configured 'web.name', and a
      directory with the parent repo's filesystem name (with a trailing slash) would
      also appear.  The subrepo(s) would unexpectedly be excluded from the list of
      repositories.  Clicking the directory entry would go right to the repo page.
      
      Now both the parent and the subrepos show up, without the additional directory
      entry.
      
      The configured hgweb paths used '**' for finding the repos in this scenario.
      
      
      A couple of notes about the tests:
      
      - The area where the subrepo was added has a comment that it tests subrepos,
        though none previously existed there.  One now does.
      
      - The 'web.descend' option is required for collapse to work.  I'm not sure what
        the previous expectations were for the test.  Nothing changed with it set,
        prior to adding the code in this patch.  It is however required for this test.
      
      - The only output changes are for the hyperlinks, obviously because of the
        'web.name' parameter.
      
      - Without this code change, there would be an additional diff:
      
          --- /usr/local/mercurial/tests/test-hgwebdir.t
          +++ /usr/local/mercurial/tests/test-hgwebdir.t.err
          @@ -951,7 +951,7 @@
             /rcoll/notrepo/e/
             /rcoll/notrepo/e/e2/
             /rcoll/notrepo/f/
          -  /rcoll/notrepo/f/f2/
          +  /rcoll/notrepo/f/
      
      
           Test repositories inside intermediate directories
      
      I'm not sure why the fancy name doesn't come out, but it is enough to
      demonstrate that the parent is not listed redundantly, and the subrepo isn't
      skipped.
      78e8890c
    • Matt Mackall's avatar
      Added signature for changeset ed18f4acf435 · d46f6b07
      Matt Mackall authored
      d46f6b07
    • Matt Mackall's avatar
      Added tag 3.4.1 for changeset ed18f4acf435 · 0a839025
      Matt Mackall authored
      0a839025
    • Matt Mackall's avatar
      merge with stable · eb52de50
      Matt Mackall authored
      eb52de50
    • Katsunori FUJIWARA's avatar
      templatekw: compare target context and its parent exactly (issue4690) · ed18f4ac
      Katsunori FUJIWARA authored
      Before this patch, template keywords `{file_mods}`, `{file_adds}` and
      `{file_dels}` use values gotten by `repo.status(ctx.p1().node(),
      ctx.node())`.
      
      But this doesn't work as expected if `ctx` is `memctx` or
      `workingcommitctx`. Typical case of templating with these contexts is
      customization of the text shown in the commit message editor by
      `[committemplate]` configuration.
      
      In this case, `ctx.node()` returns None and it causes comparison
      between `ctx.p1()` and `workingctx`. `workingctx` lists up all changed
      files in the working directory even at selective committing.
      
      BTW, `{files}` uses `ctx.files()` and it works as expected.
      
      To compare target context and its parent exactly, this patch passes
      `ctx.p1()` and `ctx` without `node()`-nize. This avoids unexpected
      comparison with `workingctx`.
      
      This patch uses a little redundant template configurations in
      `test-commit.t`, but they are needed to avoid regression around
      problems fixed by a4958cdb2202 and 1e6fb8db666e: accessing on `ctx`
      may break `ctx._status` field.
  14. May 29, 2015
  15. May 27, 2015
  16. May 31, 2015
    • Matt Mackall's avatar
      tests: add (?) flag for optional lines · 6025cac3
      Matt Mackall authored
      When the test engine fails to match output on a line marked with (?),
      it will simply continue to the next expected line and try again. This
      allows simplifying tests that have either version-specific or
      non-fixed behavior, for instance:
      
        $ coin-flip
        heads (?)
        tails (?)
      
      (There's no form of back-tracking attempted, so optional matches
      should be specific.)
      6025cac3
  17. Apr 15, 2015
    • Ryan McElroy's avatar
      templatekw: display active bookmark more consistently (issue4552) (BC) · 390a10b7
      Ryan McElroy authored
      Previously, the template keyword '{activebookmark}' would only display the
      active bookmark if it was also pointing to the working directory's parent.
      Meanwhile, the '{active}' subkeyword of the '{bookmarks}' keyword displays
      the active bookmark regardless of whether it also points to the working
      directory's parent. This is confusing.
      
      Consider the output of these two templates:
      
        $ hg log -T '{activebookmark}\n' -r indent
      
        $ hg log -T '{bookmarks % "{bookmark}"}\n' -r indent
        indent
      
      This is the current behavior that can arise after, eg, a pull moves a bookmark
      out from under you. After this patch, the first template will also return the
      active bookmark that points to a revision, even if it is not the current
      parent of the working directory. A test has been added to show the new behavior.
      390a10b7
  18. May 24, 2015
    • Yuya Nishihara's avatar
      revrange: build spanset from x:y range · a5a95642
      Yuya Nishihara authored
      This slightly improves the performance in the optimal case:
      
      % hg log -R mozilla-central -r0:tip -l1 --time
      (before)
      time: real 0.050 secs (user 0.040+0.000 sys 0.010+0.000)
      (after)
      time: real 0.020 secs (user 0.000+0.000 sys 0.010+0.000)
      a5a95642
    • Yuya Nishihara's avatar
      revrange: build balanced tree of addsets from revisions (issue4565) · a26a5540
      Yuya Nishihara authored
      This reduces the stack depth from O(n) to O(log(n)). Therefore, repeated
      -rREV options will never exceed the Python stack limit.
      
      Currently it depends on private revset._combinesets() function. But at some
      point, we'll be able to drop the old-style parser, and revrange() can be
      completely rewritten without using _combinesets():
      
        trees = [parse(s) for s in revs]
        optimize(('or',) + trees)  # combine trees and optimize at once
        ...
      
      Blockers that prevent eliminating old-style parser:
      
       - nullary ":" operator
       - revrange(repo, [intrev, ...]), can be mapped to 'rev(%d)' ?
       - revrange(repo, [binnode, ...]), should be banned ?
      a26a5540
    • Yuya Nishihara's avatar
      revrange: clean up meaningless reconstruction of sets · 99d3ca7d
      Yuya Nishihara authored
      They just exist for deduplication that was removed by the previous patch.
      99d3ca7d
    • Yuya Nishihara's avatar
      revrange: drop unnecessary deduplication of revisions · 5909ac39
      Yuya Nishihara authored
      Because "l" is a smartset, duplicated entries are omitted by addsets.
      5909ac39
  19. May 29, 2015
    • Gilles Moris's avatar
      summary: move the parents phase marker to commit line (issue4688) · 60849263
      Gilles Moris authored
      The phase of the pending commit depends on the parent of the working directory
      and on the phases.newcommit configuration.
      First, this information rather depend on the commit line which describe the
      pending commit.
      Then, we only want to be advertised when the pending phase is going to be higher
      than the default new commit phase.
      
      So the format will change from
      
      $ hg summary
      parent: 2:ab91dfabc5ad
       foo
      parent: 3:24f1031ad244 tip
       bar
      branch: default
      commit: 1 modified, 1 unknown, 1 unresolved (merge)
      update: (current)
      phases: 1 secret (secret)
      
      to
      
      parent: 2:ab91dfabc5ad
       foo
      parent: 3:24f1031ad244 tip
       bar
      branch: default
      commit: 1 modified, 1 unknown, 1 unresolved (merge) (secret)
      update: (current)
      phases: 1 secret
      60849263
  20. May 25, 2015
  21. Jun 01, 2015
    • Gregory Szorc's avatar
      check-commit: make foo_bar naming regexp less greedy · 894bcdbb
      Gregory Szorc authored
      \s is equivalent to the character class [ \t\n\r\f\v]. Using \s+ in
      a regular expression against input with multiple lines may match across
      multiple lines.
      
      For the regexp in question, "\+\s+" would match "+\n " and similar
      sequences, leading to false positives for functions that were included
      in diff context, after a modified hunk.
      894bcdbb
  22. May 27, 2015
Loading