Skip to content
Snippets Groups Projects
  1. Feb 12, 2016
  2. 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
  3. Feb 07, 2016
  4. Feb 10, 2016
  5. Feb 12, 2016
  6. Feb 08, 2016
  7. Feb 12, 2016
  8. 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
  9. 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
  10. Feb 03, 2016
  11. Feb 11, 2016
  12. Jan 29, 2016
  13. Feb 08, 2016
  14. Feb 10, 2016
  15. 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
  16. 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
  17. 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
  18. 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
    • Katsunori FUJIWARA's avatar
      tests: omit -p for external diff via extdiff extension for portability · 0707bbec
      Katsunori FUJIWARA authored
      Before this patch, some tests using external "diff" command via
      extdiff extension fail on Solaris, because "-p" (show which C function
      each change is in) option isn't supported by system standard "diff" on
      Solaris, even though extdiff passes it to external "diff" by default.
      
      Fortunately, this non-portable option isn't important for (current, at
      least) tests using external "diff" command via extdiff extension.
      
      This patch omits "-p" for external "diff" command via extdiff
      extension for portability of tests, and adds check-code.py a rule to
      detect invocation of "diff" with "-p".
      
      Newly added check-code.py rule examines only lines generated by
      external "diff" with "-r", because strict examination might
      misidentify "hg diff -p" or other complicated lines consisting of
      "diff" string as wrong one.
      
      This patch is a part of making tests using external "diff" portable,
      and tests below aren't yet portable even after this patch.
      
        test-graft.t
        test-largefiles-update.t
        test-subrepo-deep-nested-change.t
      0707bbec
    • Martin von Zweigbergk's avatar
      treemanifest: fix debugrebuildfncache · 6f248ba8
      Martin von Zweigbergk authored
      When I taught debugrebuildfncache about dirlogs in fb92927f9775
      (treemanifests: fix streaming clone, 2016-02-04), I added a
      last-minute "if 'treemanifest' in repo" guard. That should have been
      checking for "... in repo.requirements". Fix that and add tests for
      it.
      6f248ba8
  19. Feb 03, 2016
  20. Feb 02, 2016
    • Pierre-Yves David's avatar
      update: warn about other topological heads on bare update · 72072cfc
      Pierre-Yves David authored
      A concern around the user experience of Mercurial is user getting stuck on there
      own topological branch forever. For example, someone pulling another topological
      branch, missing that message in pull asking them to merge and getting stuck on
      there own local branch.
      
      The current way to "address" this concern was for bare 'hg update' to target the
      tipmost (also latest pulled) changesets and complain when the update was not
      linear. That way, failure to merge newly pulled changesets would result in some
      kind of failure.
      
      Yet the failure was quite obscure, not working in all cases (eg: commit right
      after pull) and the behavior was very impractical in the common case
      (eg: issue4673).
      
      To be able to change that behavior, we need to provide other ways to alert a
      user stucks on one of many topological head. We do so with an extra message after
      bare update:
      
        1 other heads for branch "default"
      
      Bookmark get its own special version:
      
        1 other divergent bookmarks for "foobar"
      
      There is significant room to improve the message itself, and we should augment
      it with hint about how to see theses other heads or handle the situation (see
      in-line comment). But having "a" message is already a significant improvement
      compared to the existing situation. Once we have it we can iterate on a better
      version of it. As having such message is an important step toward changing the
      default destination for update and other nicety, I would like to move forward
      quickly on getting such message.
      
      This was discussed during London - October 2015 Sprint.
      72072cfc
Loading