Skip to content
Snippets Groups Projects
  1. May 03, 2017
  2. Apr 27, 2017
  3. Apr 24, 2017
    • Pulkit Goyal's avatar
      py3: handle opts correctly for `hg add` · a77e61b4
      Pulkit Goyal authored
      opts in add command were passed again to cmdutil.add() as kwargs so we need
      to convert them again to str. Intstead we convert them to bytes when passing
      scmutil.match(). Opts handling is also corrected for all the functions which
      are called from cmdutil.add().
      a77e61b4
  4. Apr 23, 2017
  5. Apr 21, 2017
  6. Apr 20, 2017
  7. Apr 27, 2017
  8. May 03, 2017
    • Pulkit Goyal's avatar
      py3: handle opts uniformly in commands.py · d90ffee9
      Pulkit Goyal authored
      Since keyword arguments can't be bytes on Python 3, we converted then to
      unicodes before passing into different command functions. We need to adopt a
      certain pattern to convert opts back to bytes. Following are some of the
      functions which are called from inside these command functions and should
      always be feeded bytes to follow the right behaviour.
      
      ui.fomattter()
      scmutil.match()
      patch.diffallopts()
      hg.peer()
      cmdutil.{show_changeset|copy|graphrevs|checkunsupportedflag}
      server.{createservice|runservice}
      
      There are few commands which are left out where opts is again passed to a
      function as keyword arguments or converting opts back to bytes is kind of
      not necessary. Those are cat, revert, help, unbundle and rollback. Following
      patches will deal with them. This patch apart from these five commands,
      convert opts back to bytes for rest of the commands.
      
      This fixes a lot of things which are hidden like --git works now. Similarly
      more flags of commands which run on Python 3 currently get fixed.
      d90ffee9
  9. May 04, 2017
  10. May 03, 2017
    • Siddharth Agarwal's avatar
      internals: document that "branches" is a legacy wire command · 435a3842
      Siddharth Agarwal authored
      Modern clients use a different discovery mechanism.
      435a3842
    • Durham Goode's avatar
      match: make subinclude construction lazy · 6dea1701
      Durham Goode authored
      The matcher subinclude functionality allows us to have .hgignore files that
      include subdirectory hgignore files. Today it parses the entire repo at once,
      even if we only need to test a file in one subdirectory. This patch makes the
      subinclude tree creation lazy, which speeds up matcher creation significantly in
      large repos with very large trees of ignore patterns.
      6dea1701
    • Martin von Zweigbergk's avatar
      bisect: allow resetting with unfinished graft/rebase/etc · 35a69efb
      Martin von Zweigbergk authored
      "hg bisect --reset" just deletes the state file (it doesn't move back
      to the starting point like rebase does); it can not conflict with an
      ongoing rebase etc.
      
      checkunfinished() has this documentation:
      
        It's probably good to check this right before bailifchanged().
      
      So that's where I moved it.
      35a69efb
  11. Apr 20, 2017
  12. Apr 27, 2017
  13. Apr 20, 2017
  14. May 03, 2017
  15. May 02, 2017
  16. May 03, 2017
  17. May 02, 2017
  18. May 01, 2017
  19. Apr 23, 2017
    • Jun Wu's avatar
      test-worker: exercise more about "killworkers" situation · 44a98a2e
      Jun Wu authored
      This patch adds some sleep and increases numcpus to exercise the
      "killworkers" situation. So race conditions could be discovered more easily,
      if someone changes worker.py incorrectly. Currently worker.py should be free
      of such issues.
      44a98a2e
    • Jun Wu's avatar
      test-worker: capture tracebacks more reliably · 9f0c055e
      Jun Wu authored
      The traceback test may have traceback caused by SIGTERM. Instead of grepping
      "Traceback", explicitly grep the exception we care about.
      
      This makes the test less flaky.
      9f0c055e
  20. Apr 22, 2017
    • Jun Wu's avatar
      worker: rewrite error handling so os._exit covers all cases · 31763785
      Jun Wu authored
      Previously the worker error handling is like:
      
          pid = os.fork()   --+
          if pid == 0:        |
              ....            | problematic
              ....          --+
              try:          --+
                  ....        | worker error handling
                            --+
      
      If a signal arrives when Python is executing the "problematic" lines, an
      external error handling (dispatch.py) will take over the control flow and
      it's no longer guaranteed "os._exit" is called (see 86cd09bc13ba for why it
      is necessary).
      
      This patch rewrites the error handling so it covers all possible code paths
      for a worker even during fork.
      
      Note: "os.getpid() == parentpid" is used to test if the process is parent or
      not intentionally, instead of checking "pid", because "pid = os.fork()" may
      be not atomic - it's possible that that a signal hits the worker before the
      assignment completes [1].  The newly added test replaces "os.fork" to
      exercise that extreme case.
      
      [1]: CPython compiles "pid = os.fork()" to 2 byte codes: "CALL_FUNCTION" and
      "STORE_FAST", so it's probably not atomic:
      
          def f():
              pid = os.fork()
      
          dis.dis(f)
            2           0 LOAD_GLOBAL              0 (os)
                        3 LOAD_ATTR                1 (fork)
                        6 CALL_FUNCTION            0
                        9 STORE_FAST               0 (pid)
                       12 LOAD_CONST               0 (None)
                       15 RETURN_VALUE
      31763785
    • Jun Wu's avatar
      dispatch: take over SignalInterrupt handling from scmutil · 1208b748
      Jun Wu authored
      dispatch handles KeyboardInterrupt already. This makes the code more
      consistent, and makes worker not print "killed!" if it receives SIGTERM in
      most cases (in rare cases there is still "killed!" printed, which will be
      fixed by the next patch).
      1208b748
Loading