Skip to content
Snippets Groups Projects
  1. Nov 05, 2014
  2. 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
  3. 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
  4. Nov 02, 2014
  5. Nov 01, 2014
  6. Oct 31, 2014
  7. Oct 30, 2014
  8. Oct 27, 2014
  9. Oct 23, 2014
  10. Oct 18, 2014
  11. Sep 29, 2014
  12. Oct 29, 2014
    • Matt Harbison's avatar
      amend: abort early if no username is configured with evolve enabled (issue4211) · b564330d
      Matt Harbison authored
      Amend will reuse the original username if a new one is not provided
      with -U, but obsolete.createmarkers() only considers ui.username() for
      the obsolete marker's metadata. Allowing the metadata field to be
      spoofed seems to defeat the point of the field in the first place.
      This covers 'evolve amend' and 'ci --amend' with evolve enabled.
      
      Without this, the transaction aborts but the parent changeset is set to -1.  The
      corresponding test will be added to evolve separately.
      b564330d
  13. Oct 28, 2014
    • Durham Goode's avatar
      revset: fix O(2^n) perf regression in addset · ac494b08
      Durham Goode authored
      hg log -r 1 ... -r 100 was never returning due to a regression in the
      way addset computes __nonzero__. It used 'bool(self._r1 or self._r2)'
      which required executing self._r1.__nonzero__ twice (once for the or,
      once for the bool). hg log with a lot of -r's happens to build a one
      sided addset tree of N length, which ends up being 2^N performance.
      
      This patch fixes it by converting to bool before or'ing.
      
      This problem can be repro'd with something as simple as:
      
      hg log `for x in $(seq 1 50) ; do echo "-r $x "; done`
      
      Adding '1 + 2 + ... + 20' to the revsetbenchmark.txt didn't seem to repro the
      problem, so I wasn't able to add a revset benchmark for this issue.
      ac494b08
    • Matt Mackall's avatar
      tests: add missing glob for Windows · 6df4bc39
      Matt Mackall authored
      6df4bc39
  14. Oct 27, 2014
Loading