Skip to content
Snippets Groups Projects
  1. Apr 12, 2019
  2. Apr 06, 2019
  3. Apr 05, 2019
  4. Apr 11, 2019
    • Georges Racinet's avatar
      discovery: stop direct use of attribute of partialdiscovery · 36272692
      Georges Racinet authored
      Instead of accessing `undecided` directly for ui display purposes,
      we introduce a `stats()` method that could be extended in the future with
      more interesting information.
      
      This is in preparation for a forthcoming Rust version of this object.
      Indeed, attributes and furthermore properties are a bit complicated for
      classes in native code.
      
      We could go further and rename `undecided` to mark it private, but `_undecided`
      is already taken as support for `_undecided` lazyness.
      36272692
    • Martin von Zweigbergk's avatar
      overlayworkingctx: remove misleading trailing slash from directory pattern · 976f069e
      Martin von Zweigbergk authored
      The paths passed into the matcher are normalized (this applies to
      include patterns and regular patterns, and to both glob kind and path
      kind), so the regex for input "foo/" ended up being "foo(?:/|$)".
      
      Once we have a (recursive) pattern kind only for directories, we could
      switch to that here and remove the "mfiles[0] == path" check. Until
      then, let's at least make it not misleading.
      
      Differential Revision: https://phab.mercurial-scm.org/D6224
      976f069e
    • Martin von Zweigbergk's avatar
      overlayworkingctx: fix file/dir audit to be repo-relative · f4b1f553
      Martin von Zweigbergk authored
      Before this patch, test-rebase-inmemory.t would stop erroring out
      about the conflict if you added a "cd a" before line 252. That was
      because a glob matcher (which are relative) was unintentionally
      used. That happened because the matcher was given "include" patterns
      (not regular patterns), and "include" patterns are always glob by
      default (i.e. unless you write them including the kind prefix). IOW,
      the "default='path'" argument passed to ctx.match() was ignored.
      
      Differential Revision: https://phab.mercurial-scm.org/D6223
      f4b1f553
  5. Apr 10, 2019
  6. Apr 11, 2019
    • Pierre-Yves David's avatar
      match: fix re2 compability broken in 2e2699af5649 · bccb322f
      Pierre-Yves David authored
      When using re2, we call test_match() instead of match() on the
      compiled regex object. While match() returns a matcher object or None,
      test_match() returns True or False. So since 2e2699af5649 running test
      on a machine with a re2 install fails in many places.  Instead we make
      the code a bit more general and everything goes back to normal.
      bccb322f
  7. Apr 09, 2019
  8. Apr 08, 2019
  9. Apr 03, 2019
    • Martin von Zweigbergk's avatar
      config: read configs from directories in lexicographical order · edbcf5b2
      Martin von Zweigbergk authored
      Mercurial currently reads the .rc files specified in HGRCPATH (and the
      system-default paths) in directory order, which is unspecified. My
      team at work maintains a set of .rc files. So far there has been no
      overlap between them, so we had not noticed this behavior. However, we
      would now like to release some common .rc files and then have another
      one per plaform with platform-specific overrides. It would be nice if
      we can determine the load order by choosing names carefully. This
      patch enables that by loading the .rc files in lexicographical order.
      
      Before this patch, the added test case would consistently say "30" on
      my file system (whatever I have -- some Linux FS).
      
      Differential Revision: https://phab.mercurial-scm.org/D6193
      edbcf5b2
  10. Apr 04, 2019
  11. Apr 06, 2019
  12. Apr 04, 2019
  13. Apr 05, 2019
    • Jordi Gutiérrez Hermoso's avatar
      chistedit: use default curses colours · 770e8799
      Jordi Gutiérrez Hermoso authored
      Terminals will define default colours (for example, white text on
      black background), but curses doesn't obey those default colours
      unless told to do so.
      
      Calling `curses.use_default_colors` makes curses obey the default
      terminal colours. One of the most obvious effects is that this allows
      transparency on terminals that support it.
      
      This also brings chistedit closer in appearance to crecord, which also
      uses default colours.
      
      The call may error out if the terminal doesn't support colors, but as
      far as I can tell, everything still works. If we need a more careful
      handling of lack of colours, blame me for not doing it now.
      770e8799
  14. Apr 07, 2019
    • Denis Laxalde's avatar
      match: let regex match function return a boolean · 2e2699af
      Denis Laxalde authored
      Match function for regex pattern kind is built through
      _buildregexmatch() and _buildmatch() using _rematcher() that returns a
      re.match function, which either returns a match object or None. This
      does not conform to Mercurial's matcher interface for __call__() or
      exact(), which are expected to return a boolean value. We fix this by
      building a lambda around _rematcher() in _buildregexmatch().
      
      Accordingly, we update doctest examples to remove bool() calls that are
      now useless.
      2e2699af
    • Denis Laxalde's avatar
      match: make arguments of _expandsets() optional · 1721b92f
      Denis Laxalde authored
      Arguments 'ctx', 'listsubrepos' and 'badfn' are optional in function
      body.
      1721b92f
    • Denis Laxalde's avatar
      match: make _donormalize's auditor and warn arguments optional · 54e6d7ef
      Denis Laxalde authored
      Argument 'warn' is actually non-required, since there's a 'if warn:'
      check before usage. Argument 'auditor' is passed to
      pathutil.canonpath(), in which it is optional.
      54e6d7ef
  15. Apr 08, 2019
  16. Apr 06, 2019
  17. Apr 07, 2019
  18. Apr 05, 2019
  19. Apr 04, 2019
  20. Apr 02, 2019
    • Arun Chandrasekaran's avatar
      crecord: new keys g & G to navigate to the top and bottom respectively · 80103ed2
      Arun Chandrasekaran authored
      This patch introduces two new keys 'g' and 'G' that helps to navigate to the
      top and bottom of the file/hunk/line respectively. This is inline with the shortcuts
      used in man, less, more and such tools that makes it convenient to navigate
      swiftly.
      
      'g' or HOME navigates to the top most file in the ncurses window.
      
      'G' or END navigates to the bottom most file/hunk/line depending on the whether
      the fold is active or not.
      
      If the bottom most file is folded, it navigates to that file and stops there.
      If the bottom most file is unfolded, it navigates to the bottom most hunk in
      that file and stops there. If the bottom most hunk is unfolded, it navigates to
      the bottom most line in that hunk.
      
      Differential Revision: https://phab.mercurial-scm.org/D6178
      80103ed2
  21. Apr 04, 2019
    • Jordi Gutiérrez Hermoso's avatar
      chistedit: properly show verbose diffs · fc009525
      Jordi Gutiérrez Hermoso authored
      I'm not sure if that ever worked and it's an internal API breakage,
      but `"verbose": True` is not correctly parsed, as most of these
      options are parsed by diffopts, whereas verbose is a global option.
      
      Setting the UI to verbose instead does work and does show a verbose
      patch, with full commit message.
      
      It also shows all files, which unfortunately are a bit hard to read on
      a single line in the default verbose template. Thus, we also change
      the default template to use the status template, which shows one file
      per line as well as its modification state.
      fc009525
    • Denis Laxalde's avatar
      interactive: do not prompt about files given in command line · db72f9f6
      Denis Laxalde authored
      For commit and revert commands with --interactive and explicit files
      given in the command line, we now skip the invite to "examine changes to
      <file> ? [Ynesfdaq?]". The reason for this is that, if <file> is
      specified by the user, asking for confirmation is redundant.
      
      In patch.filterpatch(), we now use an optional "match" argument to
      conditionally call the prompt() function when entering a new "header"
      item. We use .exact() method to compare with files from the "header" in
      order to only consider (rel)path patterns.
      
      Add tests with glob patterns for commit and revert, to make sure we
      still ask to examine files in these cases.
      db72f9f6
  22. Apr 05, 2019
    • Gregory Szorc's avatar
      zstandard: vendor python-zstandard 0.11 · 675775c3
      Gregory Szorc authored
      The upstream source distribution from PyPI was extracted. Unwanted
      files were removed.
      
      The clang-format ignore list was updated to reflect the new source
      of files.
      
      The project contains a vendored copy of zstandard 1.3.8. The old
      version was 1.3.6. This should result in some minor performance wins.
      
      test-check-py3-compat.t was updated to reflect now-passing tests on
      Python 3.8.
      
      Some HTTP tests were updated to reflect new zstd compression output.
      
      # no-check-commit because 3rd party code has different style guidelines
      
      Differential Revision: https://phab.mercurial-scm.org/D6199
      675775c3
Loading