Skip to content
Snippets Groups Projects
  1. Jun 02, 2015
  2. Jun 01, 2015
    • Matt Mackall's avatar
      merge with stable · eb52de500d2a
      Matt Mackall authored
      eb52de500d2a
    • Katsunori FUJIWARA's avatar
      templatekw: compare target context and its parent exactly (issue4690) · ed18f4acf435
      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.
      3.4.1
      ed18f4acf435
  3. May 29, 2015
  4. May 27, 2015
  5. May 31, 2015
    • Matt Mackall's avatar
      tests: add (?) flag for optional lines · 6025cac3d02f
      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.)
      6025cac3d02f
  6. Apr 15, 2015
    • Ryan McElroy's avatar
      templatekw: display active bookmark more consistently (issue4552) (BC) · 390a10b7843b
      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.
      390a10b7843b
  7. May 24, 2015
    • Yuya Nishihara's avatar
      revrange: build spanset from x:y range · a5a95642144b
      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)
      a5a95642144b
    • Yuya Nishihara's avatar
      revrange: build balanced tree of addsets from revisions (issue4565) · a26a55406c0a
      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 ?
      a26a55406c0a
    • Yuya Nishihara's avatar
      revrange: clean up meaningless reconstruction of sets · 99d3ca7d67e4
      Yuya Nishihara authored
      They just exist for deduplication that was removed by the previous patch.
      99d3ca7d67e4
    • Yuya Nishihara's avatar
      revrange: drop unnecessary deduplication of revisions · 5909ac39b86a
      Yuya Nishihara authored
      Because "l" is a smartset, duplicated entries are omitted by addsets.
      5909ac39b86a
  8. May 29, 2015
    • Gilles Moris's avatar
      summary: move the parents phase marker to commit line (issue4688) · 6084926366b9
      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
      6084926366b9
  9. May 25, 2015
  10. Jun 01, 2015
    • Gregory Szorc's avatar
      check-commit: make foo_bar naming regexp less greedy · 894bcdbb9e7a
      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.
      894bcdbb9e7a
  11. May 27, 2015
    • Pierre-Yves David's avatar
      test: use bundle2 in test-http · 98b5676323db
      Pierre-Yves David authored
      Now that we have a bundle1 version of this test, we can move the
      original to bundle2. This lets us handle the ouput change from using
      the bundle2 protocol earlier.
      98b5676323db
    • Pierre-Yves David's avatar
      test: copy test-http.t to test-http-bundle1.t · ebbf5b0c945a
      Pierre-Yves David authored
      We want to keep both code paths tested. The test is a bit too extensive to
      simply introduce dual testing in it so we make a copy for each protocol
      version.
      ebbf5b0c945a
    • Pierre-Yves David's avatar
      test: use bundle2 in test-ssh · 2c14ab597353
      Pierre-Yves David authored
      Now that we have a bundle1 version of this test, we can move the main
      version to bundle2. This lets us handle the ouput change from using
      the bundle2 protocol earlier.
      2c14ab597353
    • Pierre-Yves David's avatar
      test: copy test-ssh.t to test-ssh-bundle1.t · b08887e723a9
      Pierre-Yves David authored
      We want to keep both code paths tested. The test is a bit too extensive to
      simply introduce dual testing in it so we make a copy for each protocol
      version.
      b08887e723a9
    • Pierre-Yves David's avatar
      test: lock test-unbundlehash to bundle1 usage · c2d691542d6a
      Pierre-Yves David authored
      It is testing a bundle1 specific behavior. Bundle2 has its own way there. See
      inline comment for details.
      c2d691542d6a
    • Pierre-Yves David's avatar
      test: use bundle2 in test-acl · 9793e52279a1
      Pierre-Yves David authored
      This test makes extensive use of --debug so moving to bundle2 based exchange
      has a massive impact. We do it early to reduce the noise create by a future
      usage of bundle2 as the default protocol.
      9793e52279a1
    • Pierre-Yves David's avatar
      test: use both bundle formats in test-pull-http · df723a2655e9
      Pierre-Yves David authored
      It is valuable to have both formats tested.
      df723a2655e9
    • Pierre-Yves David's avatar
      test: use bundle2 in test-http-proxy · fbcbdc62f248
      Pierre-Yves David authored
      The proxy test does not care about what protocol is used, but the new
      protocol implies different traffic (and therefore different log
      output).  We switch it to bundle2 early to minimise the noise of using
      bundle2 for exchange by default.
      fbcbdc62f248
    • Pierre-Yves David's avatar
      tests: use bundle2 for test-hook · faed8e52b81f
      Pierre-Yves David authored
      Using bundle2 has an effect on which hooks are run when. We turn it on for
      test-hooks early to reduce the noise of switching the default exchange to
      bundle2.
      faed8e52b81f
    • Pierre-Yves David's avatar
      pull: only prefetch bookmarks when using bundle1 · 02defdb1b628
      Pierre-Yves David authored
      All bundle2 servers now support the 'listkeys' part(1), so we'll
      always be able to fetch bookmarks data at the same time as the
      changeset. This should be enough to avoid the one race condition that
      this bookmark prefetching is trying to work around. It even allows
      future server to make sure everything is generated from the same
      "transaction" if they become capable of such. The current code was
      already overwriting the prefetched value with the one in bundle2
      anyway.  Note that this is not preventing all race conditions in
      related to bookmark in 'hg pull' it makes nothing better and nothing
      worse.
      
      Reducing the number of listkeys calls will reduce the latency on pull.
      
      The pre-fetch is also moved into a discovery step because it seems to belong
      there.
      
      (1) Because all servers not speaking 'pushkey' parts are compatible with the
      'HG2X' protocol only.
      02defdb1b628
  12. May 28, 2015
  13. Jun 01, 2015
  14. May 30, 2015
    • Yuya Nishihara's avatar
      hg: explicitly check that peer lookup object has instance() if call failed · 4cc3fb23881d
      Yuya Nishihara authored
      If a "thing" is callable but raises TypeError for some reason, a callable
      object would be returned. Thereafter, unfriendly traceback would be displayed:
      
        Traceback (most recent call last):
          ...
          File "mercurial/hg.pyc", line 119, in _peerorrepo
            obj = _peerlookup(path).instance(ui, path, create)
        AttributeError: 'function' object has no attribute 'instance'
      
      Instead, we should show the reason why "thing(path)" didn't work:
      
        Traceback (most recent call last):
          ...
          File "hggit/__init__.py", line 89, in _local
            p = urlcls(path).localpath()
        TypeError: 'NoneType' object is not callable
      
      If a "thing" is not callable, it must be a module or an object that implements
      instance(). If that module didn't have instance(), the error message would be
      "<unloaded module 'foo'> object is not callable". It doesn't make perfect sense,
      but it isn't so bad as it can blame which module went wrong.
      4cc3fb23881d
  15. Mar 30, 2015
  16. May 31, 2015
  17. May 27, 2015
    • Martin von Zweigbergk's avatar
      treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?' · 20ad936ac5d2
      Martin von Zweigbergk authored
      For globs like 'foo/ba?', match._roots() will return 'foo'. Since
      visitdir(), excludes directories in the excluded roots, it would skip
      the entire foo directory. This is incorrect, since 'foo/ba?' doesn't
      mean that everything in foo/ should be exluded. Note that visitdir()
      is called only from the treemanifest class, so this only affects tree
      manifests. Fix by adding roots to the set of excluded roots only if
      there are no excluded patterns.
      
      Since 'glob' is the default pattern type for globs, we also need to
      update some -X patterns in the tests to be of 'path' type to take
      advantage of the visitdir tricks. For consistency, also update the -I
      patterns.
      
      It seems a little unfortunate that 'foo' in 'hg files -X foo' is
      considered a pattern because of the implied 'glob' type, but improving
      that is left for another day.
      20ad936ac5d2
  18. May 29, 2015
  19. May 27, 2015
    • Laurent Charignon's avatar
      record: add default value for operation argument · 724421cb4745
      Laurent Charignon authored
      This patch is part of a series of patches to change the recording ui to reflect
      the operation currently running (commit, shelve, revert ...).
      This patch adds the default value of the operation argument for record's
      standard and curses interface to match what is displayed in the interface
      as of today.
      724421cb4745
  20. May 28, 2015
    • Laurent Charignon's avatar
      record: precise documentation · 31f3636e9296
      Laurent Charignon authored
      This patch improves the documentation of the recordfilter function to explain
      that we need a translated string for the 'operation' argument.
      31f3636e9296
  21. May 27, 2015
Loading