Skip to content
Snippets Groups Projects
  1. Jun 15, 2017
  2. Jul 24, 2017
  3. Aug 08, 2017
  4. Aug 02, 2017
  5. Aug 06, 2017
    • Jun Wu's avatar
      test-rebase: add a brute force test · 71b77b61
      Jun Wu authored
      Rebase is becoming more complex and it looks like a good idea to try some
      brute force enumeration to cover cases that are hard to find manually.
      
      Using brute force to generate repos in different shapes and enumerating the
      rebase source and destination would generate too many cases that takes too
      long to compute. This patch limits the "brute force" to only the "rebase
      source" part. Repo and destination are still manual.
      
      The added test cases are crafted manually to reveal some behaviors that are
      not covered by other tests:
      
        - "revlog index out of range" crash
        - after rebase, p1 == p2, p2 != null
        - "nothing to merge" abort
      
      In the future we might want to add more tests here. For now I'm more
      interested in revealing interesting behaviors in a minified way. I tried
      some more complex cases but didn't find other interesting behaviors.
      
      Differential Revision: https://phab.mercurial-scm.org/D262
      71b77b61
  6. Aug 08, 2017
  7. Jul 19, 2017
  8. Aug 07, 2017
  9. Aug 06, 2017
  10. Aug 08, 2017
  11. Aug 05, 2017
    • Gregory Szorc's avatar
      exchange: access requirements on repo instead of peer · 03348493
      Gregory Szorc authored
      As part of formalizing the peer interface, I audited for attribute
      accesses for non-internal names to find API violations. This
      uncovered the code changed in this commit.
      
      localpeer.requirements is just an alias to the repo's requirements
      attribute. So, change the code to get the data from the source
      instead of relying on a one-off attribute in the localpeer type.
      
      Differential Revision: https://phab.mercurial-scm.org/D265
      03348493
  12. Aug 07, 2017
    • Gregory Szorc's avatar
      exchange: drop support for lock-based unbundling (BC) · fda0867c
      Gregory Szorc authored
      Locking over the wire protocol and the "addchangegroup" wire
      protocol command has been deprecated since e8c4f3d3df8c, which was
      first part of Mercurial 0.9.1.
      
      Support for handling these commands from sshserver was dropped in
      9f6e0e7ef828 in 2015, effectively locking out pre 0.9.1 clients
      from new servers.
      
      However, client-side code for calling lock and addchangegroup is
      still present in exchange.py and the various peer classes to
      facilitate pushing to pre 0.9.1 servers.
      
      The lock-based pushing mechanism is extremely brittle. 0.9.1 was
      released in July 2006 and I highly doubt anyone is still running
      such an ancient version of Mercurial on a server. I'm about to
      refactor the peer API and I don't think it is worth keeping
      support for this ancient protocol feature. So, this commit removes
      client support for the lock-based pushing mechanism. This means
      modern clients will no longer be able to push to pre 0.9.1 servers.
      
      Differential Revision: https://phab.mercurial-scm.org/D264
      fda0867c
  13. Aug 04, 2017
  14. Aug 05, 2017
    • Katsunori FUJIWARA's avatar
      filemerge: move decorator definition for internal merge tools to registrar · 50c44dee
      Katsunori FUJIWARA authored
      This patch also adds extra loading entry for internal merge tools to
      extensions.py, for similarity to other decorators defined in
      registrar.py.
      
      This patch uses "internalmerge" for decorator class name, instead of
      original "internaltool", because the latter is too generic.
      
      BTW, after this patch, 4-spaces indentation is added to the 1st line
      of internal merge tool description docstring, and this may make
      already translated entries in *.po fuzzy.
      
      Even though this indentation is required for "definition list" in reST
      syntax, absence of it has been overlooked, because help.makeitemsdoc()
      forcibly inserts it at generation of online help.
      
      But this forcible insertion causes formatting issue (I'll send another
      patch series for this). Therefore, this additional indentation should
      be reasonable.
      50c44dee
  15. Aug 04, 2017
    • Rishabh Madan's avatar
      releasenotes: add similarity check function to compare incoming notes · 3748098d
      Rishabh Madan authored
      It is possible that the incoming note fragments have some similar content as the
      existing release notes. In case of a bug fix, we match for issueNNNN in the
      existing notes. For other general cases, it makes use of fuzzywuzzy library to get
      a similarity score. If the score is above a certain threshold, we ignore the
      fragment, otherwise add it. But the score might be misleading for small commit
      messages. So, it uses similarity function only if the length of string (in words)
      is above a certain value. The patch adds tests related to its usage. But it needs
      improvement in the sense of combining incoming notes. We can use interactive mode
      for adding notes. Maybe we can do this if similarity is under a certain range.
      3748098d
  16. Jul 29, 2017
  17. Jul 18, 2017
  18. Jul 24, 2017
    • Denis Laxalde's avatar
      status: avoid recursing into ignored directory with "--terse u" · 93422d00
      Denis Laxalde authored
      Let "isignoreddir" function first check that supplied directory is itself
      ignored before walking recursively into its content. Otherwise, the command is
      awfully slow when one has an ignored directory with a lot of content.
      
      Update and rephrase function docstring accordingly.
      93422d00
  19. Jul 31, 2017
    • Pulkit Goyal's avatar
      pushvars: move fb extension pushvars to core · db3dc113
      Pulkit Goyal authored
      pushvars extension in fbext adds a --pushvars flag to push command using which
      one send strings to server which becomes environment variables there prepended
      with HG_USERVAR_. These variables can then be used to run hooks on the server.
      The extension is moved directly to core and unbundling of the strings and
      converting them to environment variables at server is disabled by default for
      security reasons. One can turn that on by following config:
      
      [push]
      pushvars.server = true
      
      This patch also adds the test for the extension.
      
      Differential Revision: https://phab.mercurial-scm.org/D210
      db3dc113
  20. Aug 04, 2017
  21. Jul 18, 2017
    • Jun Wu's avatar
      phabricator: use Phabricator's last node information · 1664406a
      Jun Wu authored
      This makes it more strict when checking whether or not we should update a
      Differential Revision. For example,
      
        a) Alice updates D1 to content 1.
        b) Bob updates D1 to content 2.
        c) Alice tries to update D1 to content 1.
      
      Previously, `c)` will do nothing because `phabsend` detects the patch is not
      changed. A more correct behavior is to override Bob's update here, hence the
      patch.
      
      This also makes it possible to return a reaonsable "last node" when there is
      no tags but only `Differential Revision` commit messages.
      
      Test Plan:
      ```
      for i in A B C; do echo $i > $i; hg ci -m $i -A $i; done
      
      hg phabsend 0::
      # D40: created
      # D41: created
      # D42: created
      
      echo 3 >> C; hg amend; hg phabsend .
      # D42: updated
      
      hg tag --local --hidden -r 2 -f D42
      # move tag to the previous version
      
      hg phabsend .
      # D42: skipped (previously it would be "updated")
      
      rm -rf .hg; hg init
      hg phabread --stack D42 | hg import -
      hg phabsend .
      # D42: updated
      hg tag --local --remove D42
      hg commit --amend
      hg phabsend .
      # D42: updated (no new diff uploaded, previously it will upload a new diff)
      ```
      
      The old diff object is now returned, which could be useful in the next
      patch.
      
      Differential Revision: https://phab.mercurial-scm.org/D121
      1664406a
  22. Aug 02, 2017
  23. Aug 01, 2017
  24. Aug 02, 2017
  25. Aug 04, 2017
    • muxator's avatar
      buildrpm: do not break in presence of custom user configs · 5aac617a
      muxator authored
      For example, if "hg log" was defined as an alias:
      
        # /etc/mercurial/hgrc
        [alias]
        log = log --graph
      
      the buildrpm script would be surprised by log messages formatted in
      unexpected ways, and bail out.
      
      This patch sets HGPLAIN, effectively resetting all the user configs,
      including log output, to a common state, making the build more
      predictable across all the possible environments.
      5aac617a
    • Kostia Balytskyi's avatar
      sparse: treat paths as cwd-relative · e1c56486
      Kostia Balytskyi authored
      This commit makes it so sparse treats passed paths as CWD-relative,
      not repo-root-realive. This is a more intuitive behavior in my (and some
      other FB people's) opinion.
      
      This is breaking change however. My hope here is that since sparse is
      experimental, it's ok to introduce BCs.
      
      The reason (glob)s are needed in the test is this: in these two cases we
      do not supply path together with slashes, but `os.path.join` adds them, which
      means that under Windows they can be backslashes. To demonstrate this behavior,
      one could remove the (glob)s and run `./run-tests.py test-sparse.t` from
      MinGW's terminal on Windows.
      e1c56486
  26. Aug 02, 2017
  27. Aug 03, 2017
  28. Aug 04, 2017
  29. Aug 03, 2017
    • Kyle Lippincott's avatar
      color: remove warnings if term is not formatted (==dumb or !ui.formatted()) · f9f28ee4
      Kyle Lippincott authored
      If the user sets color.mode=terminfo, and then runs in the shell inside of emacs
      (so TERM=dumb), the previous behavior was that it would warn about no terminfo
      entry for setab/setaf, and then warn about 'failed to set color mode to
      terminfo'.  The first warning is silenced by carrying 'formatted' through to
      _terminfosetup, the second is silenced by using 'formatted' instead of
      ui.formatted().
      
      If --color=on (or ui.color=always) is specified, this will still warn, since the
      formatted boolean is set to true in these cases.
      
      Differential Revision: https://phab.mercurial-scm.org/D223
      f9f28ee4
  30. Jul 27, 2017
  31. Jul 14, 2017
    • Martin von Zweigbergk's avatar
      tests: demonstrate crash when trying to rebase merge without its parents · 855a1856
      Martin von Zweigbergk authored
      As the test case shows, when "hg rebase -d G -r 'B + D + F'" is run on
      the following graph, we crash with traceback. It's reasonable to fail
      because we can not easily produce a correct rebased F. The problem is
      what diff to apply to either the rebased B or the rebased D. We could
      potentially produce the result by e.g. applying the (F-D) diff to the
      rebased B and then applying the reverse (E-D) diff on top, but that
      could result in merge conflicts in each of those steps, which we don't
      have a way of dealing with. So for now, let's just add a test case to
      demonstrate that we crash (i.e. the AssertionError is clearly
      incorrect since the user can run into it).
      
        F
       /|
      C E
      | |
      B D G
       \|/
        A
      
      Differential Revision: https://phab.mercurial-scm.org/D212
      855a1856
  32. Jul 17, 2017
  33. Jul 24, 2017
Loading