Skip to content
Snippets Groups Projects
  1. May 20, 2017
  2. May 18, 2017
  3. May 20, 2017
  4. Jan 09, 2016
  5. May 13, 2017
  6. May 14, 2017
  7. May 08, 2017
  8. Jan 09, 2016
  9. May 13, 2017
  10. May 18, 2017
    • Wez Furlong's avatar
      fsmonitor: don't attempt state-leave if we didn't state-enter · 35432917
      Wez Furlong authored
      The state-enter command may not have been successful; for example, the watchman
      client session may have timed out if the user was busy/idle for a long period
      during a merge conflict resolution earlier in processing a rebase for a stack
      of diffs.
      
      It's cleaner (from the perspective of the watchman logs) to avoid issuing the
      state-leave command in these cases.
      
      Test Plan:
      ran
      
      `hg rebase --tool :merge -r '(draft() & date(-14)) - master::' -d master`
      
      and didn't observe any errors in the watchman logs or in the output from
      
      `watchman -p -j <<<'["subscribe", "/data/users/wez/fbsource", "wez", {"expression": ["name", ".hg/updatestate"]}]'`
      35432917
    • Wez Furlong's avatar
      fsmonitor: acquire localrepo.wlock prior to emitting hg.update state · 6e0d1043
      Wez Furlong authored
      we see some weird things in the watchman logs where the mercurial
      process is seemingly confused about which hg.update state it is publishing
      through watchman.
      
      On closer examination, we're seeing conflicting pids for the clients involved
      and this implies a race.
      
      To resolve this, we extend the wlock around the state-enter/state-leave
      events that are emitted to watchman.
      
      Test Plan:
      Some manual testing:
      
      In one window, run this, and then checkout a different rev:
      
      ```
      $ watchman -p -j <<<'["subscribe", "/data/users/wez/fbsource", "wez", {"expression": ["name", ".hg/updatestate"]}]'
      {
          "version": "4.9.0",
          "subscribe": "wez",
          "clock": "c:1495034090:814028:1:312576"
      }
      {
          "state-enter": "hg.update",
          "version": "4.9.0",
          "clock": "c:1495034090:814028:1:312596",
          "unilateral": true,
          "subscription": "wez",
          "metadata": {
              "status": "ok",
              "distance": 125,
              "rev": "a1275d79ffa6c58b53116c8ec401c275ca6c1e2a",
              "partial": false
          },
          "root": "/data/users/wez/fbsource"
      }
      {
          "root": "/data/users/wez/fbsource",
          "metadata": {
              "status": "ok",
              "distance": 125,
              "rev": "a1275d79ffa6c58b53116c8ec401c275ca6c1e2a",
              "partial": false
          },
          "subscription": "wez",
          "unilateral": true,
          "version": "4.9.0",
          "clock": "c:1495034090:814028:1:312627",
          "state-leave": "hg.update"
      }
      ```
      
      Tailed the watchman log file and looked for invalid state assertion errors,
      then ran my `rebase-all` script to update/rebase all of my heads.
      
      Didn't trigger the error condition (but couldn't reliably trigger it previously
      anyway), and the output captured above shows that the states are being emitted
      correctly.
      6e0d1043
  11. May 19, 2017
  12. May 18, 2017
  13. May 17, 2017
    • Kostia Balytskyi's avatar
      run-tests: allow hg executable to be hg.exe · 531e6a57
      Kostia Balytskyi authored
      When running tests on Windows (via msys), user sometimes does not want to run
      them against source hg, but against compiled hg.exe. For that purpose,
      --with-hg option can be used, but currently run-tests.py prints a warning if
      the value of this argument is not a file with basename 'hg'. This patch allows
      such file to be 'hg.exe'.
      531e6a57
  14. May 09, 2017
    • Durham Goode's avatar
      obsolete: add operation metadata to rebase/amend/histedit obsmarkers · 3546a771
      Durham Goode authored
      By recording what operation created the obsmarker, we can show very intuitive
      messages to the user in various UIs. For instance, log output could have
      messages like "Amended as XXX" to show why a commit is old and has an 'x' on it.
      
           @  ac28e3  durham
          /   First commit
         |
         | o  d4afe7 durham
         | |  Second commit
         | |
         | x  8e9a5d (Amended as ac28e3)  durham
         |/   First commit
         |
      3546a771
  15. May 18, 2017
    • Martin von Zweigbergk's avatar
      match: use match.prefix() in subdirmatcher · 763d7292
      Martin von Zweigbergk authored
      It seems like the subdirmatcher should be checking if the matcher it's
      based on is matching prefixes. It was effectively doing that already
      because "prefix() == not always() and not anypats() and not
      isexact()", subdirmatcher was checking the first two parts of that
      condition and I don't think it will ever be given an "exact" matcher
      with it's directory name (because exact matchers are for matching
      files, not directories). Still, let's switch to using prefix() for
      clarity (and because I'm trying to remove code that reaches for
      matchers internals).
      763d7292
  16. May 12, 2017
  17. May 18, 2017
  18. May 19, 2017
  19. May 18, 2017
    • Martin von Zweigbergk's avatar
      config: make config.items() return a copy · 6a773d30
      Martin von Zweigbergk authored
      config.items() was iterating over a copy of the data for the the
      specified section on Python 2 by using .items(). However, on Python 3,
      items() does not make a copy, so let's switch to explicitly making a
      copy to make it safe on both Python 2 and Python 3.
      6a773d30
  20. May 19, 2017
    • Stanislau Hlebik's avatar
      filemerge: store error messages in module variables · 6587427b
      Stanislau Hlebik authored
      Copytracing may be disabled because it's too slow (see
      experimental.disablecopytrace config option). In that case user may get errors
      like 'local changed FILE which other deleted'. It would be nice to give user a
      hint to rerun command with `--config experimental.disablecopytrace=False`. To
      make it possible let's extract error message to variables so that extension may
      overwrite them.
      6587427b
  21. May 17, 2017
    • Jun Wu's avatar
      run-tests: support multiple cases in .t test · 7340465b
      Jun Wu authored
      Sometimes we want to run similar tests with slightly different
      configurations. Previously we duplicate the test files. This patch
      introduces special "#testcases" syntax that allows a single .t file to
      contain multiple test cases.
      
      Defined cases could be tested using "#if".
      
      For example, if a test should behave the same with or without an
      experimental flag, we can add the following to the .t header:
      
          #testcases default experimental-a
          #if experimental-a
            $ cat >> $HGRCPATH << EOF
            > [experimental]
            > feature=a
            > EOF
          #endif
      
      The "experimental-a" block won't be executed when running the "default" test
      case.
      7340465b
  22. May 18, 2017
    • Gregory Szorc's avatar
      revlog: rename constants (API) · 67026d65
      Gregory Szorc authored
      Feature flag constants don't need "NG" in the name because they will
      presumably apply to non-"NG" version revlogs.
      
      All feature flag constants should also share a similar naming
      convention to identify them as such.
      
      And, "RevlogNG" isn't a great internal name since it isn't obvious it
      maps to version 1 revlogs. Plus, "NG" (next generation) is only a good
      name as long as it is the latest version. Since we're talking about
      version 2, now is as good a time as any to move on from that naming.
      67026d65
    • Gregory Szorc's avatar
      localrepo: reformat set literals · 9f35c783
      Gregory Szorc authored
      Putting multiple elements on the same line makes diffs harder
      to read. Switch to one line per element so future changes are
      easier on the eyes.
      9f35c783
    • Jeremy Fitzhardinge's avatar
      rebase: make sure merge state is cleaned up for no-op rebases (issue5494) · a580b2d6
      Jeremy Fitzhardinge authored
      If a rebase ends up doing a no-op commit, make sure the merge state is still cleaned up.
      a580b2d6
Loading