Skip to content
Snippets Groups Projects
  1. Feb 01, 2016
    • Martin von Zweigbergk's avatar
      tests: add tests for missing revlogs and revlog entries · 2b41f865
      Martin von Zweigbergk authored
      The verify code is pretty poorly tested. It's easy to test missing
      revlogs and missing revlog entries, so let's add tests for that.
      
      Also add some more tests corrupting each type of revlog, so we test
      the messages presented when reading a revision fails. The pure and
      native implementations produce different error messages, so we have to
      use (glob) in the tests.
      2b41f865
  2. Feb 12, 2016
  3. Feb 08, 2016
    • Pierre-Yves David's avatar
      merge: give priority to "not at head" failures for bare 'hg merge' · 7d852bb4
      Pierre-Yves David authored
      We refuse to pick a destination for a bare 'hg merge' if the working copy is not
      at head. This is meant to prevent strange merge from user who forget to update.
      (Moreover, such merge does not reduce actually the number of heads)
      
      However, we were doing that as the last possible failure type. So user were
      recommended to merge with an explicit head (from this bad location) if the
      branch had too many heads.
      
      We now make "not on branch heads" class of failure the first things to check
      and fail on. The one test that change was actually trying to check for these
      failure (and did not). The new test output is correct.
      7d852bb4
    • Pierre-Yves David's avatar
      tests: add an explicit destination in some rebase tests · 79437fb3
      Pierre-Yves David authored
      As we will make 'rebase' behave more like 'merge', it will no longer pick
      'max(branch(.))' as the default destination. We have to hard code the expected
      destination is multiple tests where it matters. After a careful inspection none
      of theses tests really cares about the default destination behavior and just
      omitted one out of laziness.
      79437fb3
    • Pierre-Yves David's avatar
      tests: remove third head in some of the 'rebase-parameters' tests · ab382192
      Pierre-Yves David authored
      These tests do not care about that extra branch at all. In future changeset we
      will make rebase behave like merge and abort in case of an ambiguous destination
      (eg: multiple other heads) and that extra branch will make the command
      invocation breaks.
      
      We preventively remove this extra branch from the relevant tests in an
      independant changeset to reduce noise and increase confidence in the final
      change.
      ab382192
  4. Feb 07, 2016
  5. Feb 10, 2016
  6. Feb 12, 2016
  7. Feb 08, 2016
  8. Feb 12, 2016
  9. Feb 10, 2016
    • Ryan McElroy's avatar
      merge: minimize conflicts when common base is not shown (issue4447) · c3e9269d
      Ryan McElroy authored
      Previously, two changes that were nearly, but not quite, identical would result
      in large merge conflict regions that looked very similar, and were thus very
      confusing to users, and lead people used to other source control systems to
      claim that "mercurial's merge algorithms suck". In the relatively common case
      of a new file being introduced in two branches with very slight modifications,
      the old behavior would show the entire file as a conflict, and it would be very
      difficult for a user to determine what was going on.
      
      In the past, mercurial attempted to solve this with a "very smart" algorithm
      that would find all common lines, but this has significant problems as
      described in 2ea6d906cf9b.
      
      Instead, we use a "very dumb" algorithm introduced in the previous patch that
      simply matches lines at the periphery of conflict regions. This minimizes most
      conflict regions well, though there may still be some degenerate edge cases,
      like small modification to the beginning and end of a large file.
      c3e9269d
  10. Feb 02, 2016
    • Pierre-Yves David's avatar
      update: change default destination to tipmost descendant (issue4673) (BC) · 6b1fc09c
      Pierre-Yves David authored
      Bare 'hg update' now brings you to the tipmost descendant (on the same branch).
      Leaving the user on the same topological branch. The previous behavior, updating
      to the tipmost changeset on the same branch could lead to jump from a
      topological branch to another. This was confusing and impractical. As the only
      conceivable reason for the old behavior have been address by the recently
      introduce message about other heads, we can "safely" change this behavior
      
      All test changes have been reviewed and seen a valid consequences.
      6b1fc09c
  11. Feb 03, 2016
  12. Feb 11, 2016
  13. Jan 29, 2016
  14. Feb 08, 2016
  15. Feb 10, 2016
  16. Feb 08, 2016
    • Katsunori FUJIWARA's avatar
      tests: use portable diff script via extdiff extension · b59ef0c2
      Katsunori FUJIWARA authored
      Before this patch, some tests using external "diff" command via
      extdiff extension fail on Solaris, because of incompatibility of
      "diff" command and its output.
      
      For example, system standard "diff" (= /usr/bin/diff) on Solaris
      differs from GNU diff in points below:
      
        - "-N" (treat absent files as empty) option isn't supported
      
        - files are examined not in dictionary order
          (maybe, in order in storage)
      
      This patch introduces portable diff script "pdiff" and make tests use
      it via extdiff extension.
      
      For portability of tests, this patch invokes "pdiff" script with
      explicit "sh", because standard shell of runtime platform ("cmd.exe"
      on Windows) is used at first to invoke external diff command.
      b59ef0c2
  17. Feb 07, 2016
    • Sébastien Brissaud's avatar
      test-patchbomb: ensure hg email write to stdout · 413201fb
      Sébastien Brissaud authored
      With -n/--test and if the PAGER environment variable is set, 'hg email' send its
      output to the user defined pager.
      
      If the pager capture the output, the test is unable verify it.
      
      Unsetting the PAGER environment variable force 'hg email' to write to stdout.
      413201fb
  18. Feb 10, 2016
    • Katsunori FUJIWARA's avatar
      misc: use modern exception syntax · 863075fd
      Katsunori FUJIWARA authored
      This is fixing for 'legacy exception syntax; use "as" instead of ","'
      check-code rule.
      
      check-code has overlooked these, because files aren't recognized as
      one to be checked (this problem is fixed by subsequent patch).
      863075fd
    • Katsunori FUJIWARA's avatar
      f: use modern octal number formatting · 742cf5b9
      Katsunori FUJIWARA authored
      This is fixing for 'legacy octal syntax; use "0o" prefix instead of
      "0"' check-code rule.
      
      check-code has overlooked this, because a file isn't recognized as one
      to be checked (this problem is fixed by subsequent patch).
      742cf5b9
    • Katsunori FUJIWARA's avatar
      f: add whitespace around operator · e4f70e79
      Katsunori FUJIWARA authored
      This is fixing for 'missing whitespace in expression' check-code rule.
      
      check-code has overlooked this, because a file isn't recognized as one
      to be checked (this problem is fixed by subsequent patch).
      e4f70e79
  19. Feb 08, 2016
    • timeless's avatar
      run-tests: warn about symlinks to non hg scripts · 54c896f8
      timeless authored
      If you symlink /usr/bin/true to /something/hg and try to run
      --with-hg=/something/hg, run-tests will end up running /usr/bin/hg,
      not /usr/bin/true.
      54c896f8
    • Katsunori FUJIWARA's avatar
      tests: make chunk header of external diff glob-ed for portability · b5069c2b
      Katsunori FUJIWARA authored
      Before this patch, some tests using external "diff" command via
      extdiff extension fail on Solaris, because system standard "diff" (=
      /usr/bin/diff) on Solaris always generates chunk headers below:
      
        - "@@ -1,0 +1,nnnn @@" for added file
        - "@@ -1,nnnn +1,0 @@" for removed file
      
      even though "diff" on Linux generates:
      
        - "@@ -0,0 +1,nnnn @@" for added file
        - "@@ -1,nnnn +0,0 @@" for removed file
      
      This patch makes chunk header of external diff glob-ed for portability
      of tests.
      
      "hg diff" output follows Linux style, and there are many such diff
      output lines in existing tests. This is reason why this patch doesn't
      add check-code.py any rule to detect such diff output in tests.
      
      This patch is a part of making tests using external "diff" portable,
      and test-subrepo-deep-nested-change.t isn't yet portable even after
      this patch.
      b5069c2b
    • Katsunori FUJIWARA's avatar
      tests: make chunk header of external diff glob-ed for portability · c65da689
      Katsunori FUJIWARA authored
      Before this patch, some tests using external "diff" command via
      extdiff extension fail on Solaris, because system standard "diff" (=
      /usr/bin/diff) on Solaris always formats chunk header in the style
      below:
      
        @@ -X.x +Y.y @@
      
      even though "diff" on Linux sometimes omits ".x" and/or ".y" in it.
      
      This patch makes chunk header of external diff glob-ed for portability
      of tests, and adds check-code.py rules to detect such diff output in
      tests.
      
      This patch also changes "hg diff" output in test-subrepo-git to
      simplify detection rules, even though it is certainly portable because
      these lines are generated by "git" command.
      
      This patch is a part of making tests using external "diff" portable,
      and tests below aren't yet portable even after this patch.
      
        test-largefiles-update.t
        test-subrepo-deep-nested-change.t
      c65da689
    • Katsunori FUJIWARA's avatar
      tests: make timezone in diff output glob-ed for portability · e7ff258f
      Katsunori FUJIWARA authored
      Before this patch, some tests using external "diff" command via
      extdiff extension fail on Solaris, because system standard "diff" (=
      /usr/bin/diff) on Solaris doesn't display timezone for timestamp of
      each files in diff output.
      
      This patch makes timezone in external diff output glob-ed for
      portability of tests, and adds check-code.py a rule to detect such
      e7ff258f
Loading