Skip to content
Snippets Groups Projects
  1. Aug 12, 2016
  2. Jul 28, 2016
  3. Aug 12, 2016
    • Simon Farnsworth's avatar
      merge: always use other, not remote, in user prompts · 978b907d
      Simon Farnsworth authored
      Now that we store and display merge labels in user prompts (not just
      conflict markets), we should rely on labels to clarify the two sides of a
      merge operation (hg merge, hg update, hg rebase etc).
      
      "remote" is not a great name here, as it conflates "remote" as in "remote
      server" with "remote" as in "the side of the merge that's further away". In
      cases where you're merging the "wrong way" around, remote can even be the
      "local" commit that you're merging with something pulled from the remote
      server.
      978b907d
    • Simon Farnsworth's avatar
      merge: use labels in prompts to the user · a7f89396
      Simon Farnsworth authored
      Now that we persist the labels, we can consistently use the labels in
      prompts for the user without risk of confusion. This changes a huge amount
      of command output:
      
      This means that merge prompts like:
        no tool found to merge a
        keep (l)ocal, take (o)ther, or leave (u)nresolved? u
      and
        remote changed a which local deleted
        use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c
      become:
        no tool found to merge a
        keep (l)ocal [working copy], take (o)ther [destination], or leave (u)nresolved? u
      and
        remote [source] changed a which local [dest] deleted
        use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c
      where "working copy" and "destination" were supplied by the command that
      requested the merge as labels for conflict markers, and thus should be
      human-friendly.
      a7f89396
  4. Aug 09, 2016
  5. Aug 11, 2016
  6. Aug 06, 2016
  7. Jul 05, 2015
    • Yuya Nishihara's avatar
      parser: remove unused binding parameter from suffix action · e5b79406
      Yuya Nishihara authored
      Because a suffix action never takes subsequent tokens, it should have
      no binding strength nor closing character. I've tried if this value could
      be used to resolve infix/suffix ambiguity of x^:y, but it appears not. So
      I decided to resend this patch.
      e5b79406
  8. Aug 10, 2016
    • Jun Wu's avatar
      extensions: add unwrapfunction to undo wrapfunction · 19578bb8
      Jun Wu authored
      Before this patch, we don't have a safe way to undo a wrapfunction because
      other extensions may wrap the same function and calling setattr will undo
      them accidentally.
      
      This patch adds an "unwrapfunction" to address the issue. It removes the
      wrapper from the wrapper chain, and re-wraps everything, which is not the
      most efficient but short and easy to understand. We can revisit the code
      if we have perf issues with long chains.
      
      The "undo" feature is useful in cases like wrapping a function just in a
      scope. Like, having a "select" command to interactively (using arrow keys)
      select content from some output (ex. smartlog). It could wrap "ui.label" to
      extract interesting texts just in the "select" command.
      19578bb8
    • Jun Wu's avatar
      extensions: add getwrapperchain to get a list of wrappers · 8bf97c4c
      Jun Wu authored
      The getwrapperchain returns a list of wrappers + the original function, making
      it easier to understand what has been wrapped by whom. For example:
      
        In : mercurial.extensions.getwrapperchain(mercurial.dispatch, '_runcommand')
        Out:
        [<function hgext.pager.pagecmd>,
         <function hgext.color.colorcmd>,
         <function hgext.zeroconf.cleanupafterdispatch>,
         <function mercurial.dispatch._runcommand>]
      
      It will also be useful to safely unwrap a function. See the next patch.
      8bf97c4c
    • Jun Wu's avatar
      extensions: set attributes to wrappers so we can trace them back · ce6317dc
      Jun Wu authored
      This patch adds two attributes about the original function and the unbound
      wrapper. It allows us to get a chain of wrappers. See the next patch.
      ce6317dc
    • Jun Wu's avatar
      ui: drop values returned by inspect.*frame*() to avoid cycles · 96bd27eb
      Jun Wu authored
      "f = inspect.currentframe()" instantly creates a cycle because
      "f.f_locals['f']" is "f" itself.
      
      This patch explicitly sets those frame objects to None to avoid cycles.
      96bd27eb
  9. Aug 09, 2016
    • Jun Wu's avatar
      dispatch: split global error handling out so it can be reused · 39149b60
      Jun Wu authored
      We may want a similar error handling at worker.py. This patch extracts the
      error handling logic to "callcatch" so it can be reused.
      39149b60
    • Pulkit Goyal's avatar
      py3: conditionalize _winreg import · 3df9f780
      Pulkit Goyal authored
      _winreg module is renamed to winreg in python 3. Added the conditionalize
      statements in the respective file because adding this in pycompat will result
      in pycompat throwing error as this is a windows registry module and we have
      buildbots and most of the contributors on linux.
      3df9f780
  10. Aug 08, 2016
  11. Aug 09, 2016
  12. Aug 08, 2016
  13. Aug 07, 2016
  14. Aug 08, 2016
  15. Aug 07, 2016
  16. Aug 08, 2016
    • Katsunori FUJIWARA's avatar
      py3: make check-py3-compat.py use correct module name at loading pure modules · 8faac092
      Katsunori FUJIWARA authored
      Before this patch, check-py3-compat.py implies unintentional ".pure"
      sub-package name at loading pure modules, because module name is
      composed by just replacing "/" in the path to actual ".py" file by
      ".".
      
      This makes pure modules belong to "mercurial.pure" package, and
      prevents them from importing a module belonging to "mercurial" package
      relatively by "from . import foo" or so.
      
      This is reason why pure modules fail to import another module
      relatively only at examination by check-py3-compat.py.
      8faac092
    • Katsunori FUJIWARA's avatar
      py3: update output of check-py3-compat.py with python3 · 297a0dc5
      Katsunori FUJIWARA authored
      Recent work on mercurial/pure/mpatch.py made it import
      mercurial.policy, and changed output of check-py3-compat.py with
      python3 in test-check-py3-compat.t. But test-check-py3-compat.t isn't
      yet updated.
      297a0dc5
  17. Aug 07, 2016
  18. Aug 08, 2016
    • Gregory Szorc's avatar
      hgweb: config option to control zlib compression level · 5e236569
      Gregory Szorc authored
      Before this patch, the HTTP transport protocol would always zlib
      compress certain responses (notably "getbundle" wire protocol commands)
      at zlib compression level 6.
      
      zlib can be a massive CPU resource sink for servers. Some server
      operators may wish to reduce server-side CPU requirements while
      requiring more bandwidth. This is common on corporate intranets, for
      example. Others may wish to use more CPU but reduce bandwidth.
      
      This patch introduces a config option to allow server operators
      to control the zlib compression level.
      
      On the "mozilla-unified" generaldelta repository, setting this
      value to "0" (disable compression) results in server-side CPU
      utilization for a `hg clone` going from ~180s to ~124s CPU time on
      my i7-6700K.  A level of "1" (which increases the transfer size from
      ~1,074 MB at level 6 to ~1,222 MB) utilizes ~132s CPU time.
      5e236569
  19. Aug 07, 2016
    • Gregory Szorc's avatar
      help: don't try to render a section on sub-topics · aba2bb2a
      Gregory Szorc authored
      This patch subtly changes the behavior of the parsing of "X.Y" values
      to not set the "section" variable when rendering a known sub-topic.
      Previously, "section" would be the same as the sub-topic name. This
      required the sub-topic RST to have a section named the same as the
      sub-topic name.
      
      When I made this change, the descriptions from help.internalstable
      started being rendered in command line output. This didn't look correct
      to me, as it didn't match the formatting of main help pages. I
      corrected this by moving the top section to help.internalstable and
      changing the section levels of all the "internals" topics.
      
      The end result is that "internals" topics now match the rendering of
      main topics on both the CLI and HTML. And, "internals" topics no longer
      require a main section matching the name of the topic.
      aba2bb2a
  20. Aug 05, 2016
  21. Aug 07, 2016
  22. Aug 05, 2016
  23. Aug 06, 2016
Loading