Skip to content
Snippets Groups Projects
  1. Nov 16, 2014
  2. Nov 11, 2014
  3. Nov 10, 2014
  4. Nov 06, 2014
  5. Nov 07, 2014
    • Gregory Szorc's avatar
      changegroup: sparsely populate fnodes · 5dcaed20
      Gregory Szorc authored
      Previously, fnodes had a key and empty dict value for every element in
      changedfiles. This is somewhat wasteful. Empty dicts in CPython consume
      a lot more memory than you would expect - 280 bytes.
      
      On mozilla-central, which has ~190,000 files/fnodes keys, the previous
      loop populating fnodes allocated 91,924 KB of memory, most of that for
      the empty dicts.
      
      With this patch in place, our peak RSS during mozilla-central clone
      drops:
      
      before:  364,356 KB
      after:   326,008 KB
      delta:   -38,348 KB
      
      When combined with the previous patch, total peak RSS decrease is now
      190,116 KB.
      5dcaed20
    • Gregory Szorc's avatar
      changegroup: don't store unused value on fnodes (issue4443) · bdf7b1ea
      Gregory Szorc authored
      The contents of fnodes are only accessed once per key. It is wasteful to
      cache the value since nobody will use it.
      
      Before this patch, the caching of unused data in fnodes was effectively
      causing a memory leak during the file streaming part of bundle creation.
      
      On mozilla-central (which has ~190,000 entries in fnodes), this patch
      has a significant impact on RSS at the end of generate():
      
      before:  516,124 KB
      after:   364,356 KB
      delta:  -151,768 KB
      
      The origin of this code can be traced back to 627cd7842e5d and has been
      with us since the 2.7 release.
      bdf7b1ea
    • Gregory Szorc's avatar
      changegroup: don't define lookupmf() until it is needed · f4ab47cc
      Gregory Szorc authored
      lookupmf() is currently defined earlier than when it is needed. Future
      patches further refactoring this code will be easier to read when
      lookupmf() is in its new home.
      f4ab47cc
  6. Nov 05, 2014
    • Pierre-Yves David's avatar
      mail: actually use the verifycert config value · a4af6fd9
      Pierre-Yves David authored
      The mail module only verifies the smtp ssl certificate if 'verifycert' is enabled
      (the default). The 'verifycert' can take three possible values:
      
      - 'strict'
      - 'loose'
      - any "False" value, eg: 'false' or '0'
      
      We tested the validity of the third value, but never converted it to actual
      falseness, making 'False' an equivalent for 'loose'.
      
      This changeset fixes it.
      a4af6fd9
  7. Nov 06, 2014
  8. Nov 05, 2014
  9. Nov 03, 2014
    • Matt Harbison's avatar
      templater: don't overwrite the keyword mapping in runsymbol() (issue4362) · a3c2d921
      Matt Harbison authored
      This keyword remapping was introduced in e06e9fd2d99f as part of converting
      generator based iterators into list based iterators, mentioning "undesired
      behavior in template" when a generator is exhausted, but doesn't say what and
      introduces no tests.
      
      The problem with the remapping was that it corrupted the output for keywords
      like 'extras', 'file_copies' and 'file_copies_switch' in templates such as:
      
          $ hg log -r 142b5d5ec9cc --template "{file_copies % ' File: {file_copy}\n'}"
          File: mercurial/changelog.py (mercurial/hg.py)
          File: mercurial/changelog.py (mercurial/hg.py)
          File: mercurial/changelog.py (mercurial/hg.py)
          File: mercurial/changelog.py (mercurial/hg.py)
          File: mercurial/changelog.py (mercurial/hg.py)
          File: mercurial/changelog.py (mercurial/hg.py)
          File: mercurial/changelog.py (mercurial/hg.py)
          File: mercurial/changelog.py (mercurial/hg.py)
      
      What was happening was that in the first call to runtemplate() inside runmap(),
      'lm' mapped the keyword (e.g. file_copies) to the appropriate showxxx() method.
      On each subsequent call to runtemplate() in that loop however, the keyword was
      mapped to a list of the first item's pieces, e.g.:
      
         'file_copy': ['mercurial/changelog.py', ' (', 'mercurial/hg.py', ')']
      
      Therefore, the dict for the second and any subsequent items were not processed
      through the corresponding showxxx() method, and the first item's data was
      reused.
      
      The 'extras' keyword regressed in de7e6c489412, and 'file_copies' regressed in
      0b241d7a8c62 for other reasons.  The common thread of things fixed by this seems
      to be when a list of dicts are passed to the templatekw._hybrid class.
      a3c2d921
  10. Jul 26, 2012
    • Michael Fyles's avatar
      extdiff: quote user-supplied options passed to shell · 72a89cf8
      Michael Fyles authored
      $ hg extdiff -p cmd -o "name <user@example.com>"
      resulted in a shell redirection error (due to the less-than sign),
      rather than passing the single option to cmd. This was due to options
      not being quoted for passing to the shell, via util.system(). Apply
      util.shellquote() to each of the user-specified options (-o) to the
      comparison program before they are concatenated and passed to
      util.system(). The requested external diff command (-p) and the
      files/directories being compared are already quoted correctly.
      
      The discussion at the time of changeset be98c5ce4022 correctly noted
      that this course of action breaks whitespace-separated options specified
      for external diff commands in the configuration. The lower part of the
      patch corrects this by lexing options read from the configuration file
      into separate options rather than reading them all into the first
      option.
      
      Update test to cover these conditions.
      
      Related changesets (reverse-chronological):
      - be98c5ce4022 (fix reverted to make configuration file options work)
      - 453097750fbf (issue fixed but without fix for configuration file)
      72a89cf8
  11. Nov 02, 2014
  12. Nov 01, 2014
  13. Oct 31, 2014
Loading