Skip to content
Snippets Groups Projects
  1. Sep 30, 2018
  2. Sep 15, 2018
  3. Sep 19, 2018
  4. Aug 05, 2018
    • Yuya Nishihara's avatar
      formatter: rename {abspath}/{file} to {path}, and drop relative {path} (BC) · 34ba4711
      Yuya Nishihara authored
      Note that {path} in status is either relative-to-cwd or repository-absolute
      depending on the command argument and config knob, which can't be reproduced
      by using the {path|relpath} filter. The default template is updated to always
      use a relative path.
      
      .. bc::
      
         ``{abspath}`` and ``{file}`` in generic templates are renamed to ``{path}``.
         Any ``{path}`` is a repository-absolute path. Use ``{path|relpath}`` to
         convert it to a filesystem path.
      34ba4711
  5. Jun 18, 2018
  6. May 03, 2018
  7. Mar 17, 2018
  8. Mar 15, 2018
  9. Apr 02, 2018
  10. Mar 24, 2018
  11. Mar 11, 2018
  12. Mar 10, 2018
  13. Mar 06, 2018
    • Gregory Szorc's avatar
      merge with stable · 7bf80d9d
      Gregory Szorc authored
      There were a handful of merge conflicts in the wire protocol code due
      to significant refactoring in default. When resolving the conflicts,
      I tried to produce the minimal number of changes to make the incoming
      security patches work with the new code.
      
      I will send some follow-up commits to get the security patches better
      integrated into default.
      7bf80d9d
  14. Mar 04, 2018
  15. Mar 03, 2018
  16. Feb 21, 2018
    • Yuya Nishihara's avatar
      annotate: do not poorly split lines at CR (issue5798) · 0a7c59a4
      Yuya Nishihara authored
      mdiff and lines(text) take only LF as a line separator, but str.splitlines()
      breaks our assumption. Use mdiff.splitnewlines() consistently.
      
      It's hard to read \r in tests, so \r is replaced with [CR]. I had to wrap
      sed by a shell function to silence check-code warning.
      0a7c59a4
  17. Dec 03, 2017
    • Matt Harbison's avatar
      tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages · feecfefe
      Matt Harbison authored
      Automatic replacement seems better than trying to figure out a check-code rule.
      I didn't bother looking to see why the error message and file name is reversed
      in the annotate and histedit tests, based on Windows or not.
      
      I originally had this as a list of tuples, conditional on the platform.  But
      there are a couple of 'No such file or directory' messages emitted by Mercurial
      itself, so unconditional is required for stability.  There are also several
      variants of what I assume is 'connection refused' and 'unknown host' in
      test-clone.t and test-clonebundles.t for Docker, FreeBSD jails, etc.  Yes, these
      are handled by (re) tags, but maybe it would be better to capture those strings
      in order to avoid whack-a-mole in future tests.  All of this points to using a
      dictionary containing one or more strings-to-be-replaced values.
      feecfefe
  18. Oct 05, 2017
  19. Oct 02, 2017
  20. Aug 22, 2017
  21. Jul 08, 2017
  22. Jul 05, 2017
    • Denis Laxalde's avatar
      followlines: join merge parents line ranges in blockdescendants() (issue5595) · b2670290
      Denis Laxalde authored
      In blockdescendants(), we had an assertion when line range of a merge
      changeset was not consistent depending on which parent was considered for
      computation. For instance, this might occur when file content (in lookup
      range) is significantly different between parent branches of the merge as
      demonstrated in added tests (where we almost completely rewrite the "baz" file
      while also introducing similarities with its content in the other branch we
      later merge to).
      
      Now, in such case, we combine line ranges from all parents by storing the
      envelope of both line ranges. This is conservative (the line range is
      extended, possibly unnecessarily) but at least this should avoid missing
      descendants with changes in a range that would fall in that of one parent but
      not in another one (the case of "baz: narrow change (2->2+)" changeset in
      tests).
      b2670290
  23. Jun 10, 2017
  24. Jun 02, 2017
  25. May 25, 2017
  26. Apr 30, 2017
  27. Apr 20, 2017
    • Denis Laxalde's avatar
      context: start walking from "introrev" in blockancestors() · befefdd3
      Denis Laxalde authored
      Previously, calling blockancestors() with a fctx not touching file would
      sometimes yield this filectx first, instead of the first "block ancestor",
      because when compared to its parent it may have changes in specified line
      range despite not touching the file at all.
      
      Fixing this by starting the algorithm from the "base" filectx obtained using
      fctx.introrev() (as done in annotate()).
      
      In tests, add a changeset not touching file we want to follow lines of to
      cover this case. Do this in test-annotate.t for followlines revset tests and
      in test-hgweb-filelog.t for /log/<rev>/<file>?linerange=<from>:<to> tests.
      befefdd3
  28. Apr 15, 2017
  29. Apr 14, 2017
    • Denis Laxalde's avatar
      context: possibly yield initial fctx in blockdescendants() · 3e47a40d
      Denis Laxalde authored
      If initial 'fctx' has changes in line range with respect to its parents, we
      yield it first. This makes 'followlines(..., descend=True)' consistent with
      'descendants()' revset which yields the starting revision.
      
      We reuse one iteration of blockancestors() which does exactly what we want.
      
      In test-annotate.t, adjust 'startrev' in one case to cover the situation where
      the starting revision does not touch specified line range.
      3e47a40d
    • Denis Laxalde's avatar
      context: add an assertion checking linerange consistency in blockdescendants() · 55987fc8
      Denis Laxalde authored
      If this assertion fails, this indicates a flaw in the algorithm. So fail fast
      instead of possibly producing wrong results.
      
      Also extend the target line range in test to catch a merge changeset with all
      its parents.
      55987fc8
    • Denis Laxalde's avatar
      context: follow all branches in blockdescendants() · 4c2c30bc
      Denis Laxalde authored
      In the initial implementation of blockdescendants (and thus followlines(...,
      descend=True) revset), only the first branch encountered in descending
      direction was followed.
      
      Update the algorithm so that all children of a revision ('x' in code) are
      considered. Accordingly, we need to prevent a child revision to be yielded
      multiple times when it gets visited through different path, so we skip 'i'
      when this occurs. Finally, since we now consider all parents of a possible
      child touching a given line range, we take care of yielding the child if it
      has a diff in specified line range with at least one of its parent (same logic
      as blockancestors()).
      4c2c30bc
  30. Jan 16, 2017
    • Denis Laxalde's avatar
      revset: add a 'descend' argument to followlines to return descendants · 5e3b49de
      Denis Laxalde authored
      This is useful to follow changes in a block of lines forward in the history
      (for instance, when one wants to find out how a function evolved from a point
      in history).
      
      We added a 'descend' parameter to followlines(), which defaults to False. If
      True, followlines() returns descendants of startrev.
      
      Because context.blockdescendants() does not follow renames, these are not
      followed by the revset either, so history will end when a rename occurs (as
      can be seen in tests).
      5e3b49de
  31. Jan 09, 2017
  32. Jan 04, 2017
  33. Nov 15, 2016
    • Mads Kiilerich's avatar
      bdiff: give slight preference to appending lines · 36334038
      Mads Kiilerich authored
      [This change could be folded into the previous changeset to minimize the repo
      churn ...]
      
      The general preference to matches in the middle of bdiff ranges helps getting
      balanced recursion and efficient computation. But, as previous changes have
      shown, it might also give diffs that seems "obviously wrong".
      
      To mitigate that: If the best match on the A side starts at the beginning of
      the bdiff range, don't aim for the middle-most B side match but for the
      earliest.
      
      This will make the matches balanced (by both sides being "early") even though
      the bisection will be less balanced. Still, this case only apply if the *best*
      and middle-most match was fully unbalanced on the A side. Each recursion will
      thus even in this worst case reduce the problem significantly and we are not
      re-introducing the problem that was fixed in f1ca249696ed.
      
      The bundle size for 4.0 (hg bundle --base null -r 4.0 x.hg) happens to go from
      22806817 to 22807275 bytes - a 0.002% increase.
      
      This make the recent test-bdiff.py changes give a more pretty output ... but
      they no longer show that the recursion is around middle matches (because it in
      these cases isn't).
      36334038
Loading