Skip to content
Snippets Groups Projects
  1. May 05, 2014
    • Katsunori FUJIWARA's avatar
      qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()" · 49148d7868df
      Katsunori FUJIWARA authored
      Before this patch, "hg qrefresh" and "hg qfold" invoke "ui.edit()"
      explicitly to get commit message edited manually.
      
      This requires explicit "localrepository.savecommitmessage()"
      invocation to save edited commit message into ".hg/last-message.txt",
      because unexpected exception raising may abort command execution
      before saving it in "localrepository.commit()".
      
      This patch uses "editor" argument of "localrepository.commit()"
      instead of explicit "ui.edit()" invocation for "hg qnew" and "hg qfold"
      
      "localrepository.commit()" will invoke "desceditor()" function newly
      added by this patch, and save edited commit message into
      ".hg/last-message.txt" automatically.
      
      This patch passes not "editor" but "desceditor" to "commit()", because
      "hg qnew" and "hg qfold" require editor function to return edited
      message (and invoke "patchheader.setmessage()" with it) if not empty,
      or default message otherwise.
      
      This patch also avoids "not q.applied" check at "hg qrefresh --edit",
      because it is also checked in "queue.refresh()", and it is not needed
      to get commit message from patch header before "queue.refresh()".
      49148d7868df
    • Katsunori FUJIWARA's avatar
      qrefresh: relocate message/patch-header handling to delay message determination · 51069bf6366b
      Katsunori FUJIWARA authored
      Before this patch, commit message for refreshed MQ changeset is
      determined, and written into refreshed patch file before
      "localrepository.commit()" invocation.
      
      This makes refactoring to use "editor" argument of "commit()" instead
      of explicit "ui.edit()" invocation in succeeding patch difficult.
      
      This patch relocates message/patch-header handling to delay message
      determination.
      51069bf6366b
    • Katsunori FUJIWARA's avatar
      qnew: use "editor" argument of "commit()" instead of explicit "ui.edit()" · b9a16ed5acec
      Katsunori FUJIWARA authored
      Before this patch, "hg qnew" invokes "ui.edit()" explicitly to get
      commit message edited manually.
      
      This requires explicit "localrepository.savecommitmessage()"
      invocation to save edited commit message into ".hg/last-message.txt",
      because unexpected exception raising may abort command execution
      before saving it in "localrepository.commit()".
      
      This patch uses "editor" argument of "localrepository.commit()"
      instead of explicit "ui.edit()" invocation for "hg qnew".
      
      "localrepository.commit()" will invoke "desceditor()" function newly
      added by this patch, and save edited commit message into
      ".hg/last-message.txt" automatically.
      
      This patch passes not "editor" but "desceditor" to "commit()", because
      "hg qnew" requires editor function to return edited message if not
      empty, or default message otherwise.
      
      This patch applies "rstrip()" on "defaultmsg" at comparison between
      "nctx.description()" and "defaultmsg", because the former should be
      stripped by "changelog.stripdesc()" and the latter may have tail white
      spaces inherited from "patchfn".
      b9a16ed5acec
    • Katsunori FUJIWARA's avatar
      histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()" · 213fd1a99cd9
      Katsunori FUJIWARA authored
      Before this patch, "message" action of "hg histedit" uses "ui.edit()"
      explicitly to get commit message edited manually.
      
      This requires explicit "localrepository.savecommitmessage()"
      invocation to save edited commit message into ".hg/last-message.txt",
      because unexpected exception raising may abort command execution
      before saving it in "localrepository.commit()".
      
      This patch uses "editor" argument of "localrepository.commit()"
      instead of explicit "ui.edit()" invocation for "message" action of "hg
      histedit"
      
      "localrepository.commit()" will invoke "editor()" function newly added
      in this patch, and save edited commit message into ".hg/last-message.txt"
      automatically.
      213fd1a99cd9
  2. Apr 29, 2014
    • Yuya Nishihara's avatar
      test-pyflakes: detect undefined name error · 0768cda8b579
      Yuya Nishihara authored
      It should be able to catch the following mistakes at 2606e7f227f6:
      
          mercurial/exchange.py:590: undefined name 'UnknownPartError'
          mercurial/match.py:346: undefined name 'pat'
          mercurial/win32.py:365: undefined name '_ERROR_NO_MORE_FILES'
          tests/killdaemons.py:46: undefined name 'check'
      0768cda8b579
  3. May 02, 2014
  4. May 06, 2014
  5. May 05, 2014
    • Thomas Arendsen Hein's avatar
      setup.py, make: avoid problems with outdated, existing hgext/__index__.py* · 54d7657d7d1e
      Thomas Arendsen Hein authored
      "make clean" already removed __index__.py[cdo], but not the __index__.py
      (automatically generated by "python setup.py build_hgextindex").
      
      "setup.py build_hgextindex" did not generate a new index if file
      __index__.py[cdo] already existed, because if __index__.py was removed,
      the compiled file containing the old information was imported and used.
      Generate an empty file (with a new timestamp to generate a new .py[cdo])
      instead and make mercurial.extensions ignore the unset docs attribute.
      
      One of the problems was a failed test-help.t, to reproduce:
      
      $ rm hgext/__index__.py*
      $ echo 'docs = {"mq": "dummy"}' > hgext/__index__.py
      $ make test-help.t
      
      With this a "make clean" or "python setup.py build_hgextindex" helps.
      54d7657d7d1e
  6. May 02, 2014
  7. May 03, 2014
    • Mads Kiilerich's avatar
      color: don't fail on error messages when no curses (issue4237) · 75aaae8ad660
      Mads Kiilerich authored
      The error only occured when Python didn't have curses - such as on Windows and
      when Python was built without curses support.
      
      No curses can also be emulated by (re)moving .../lib/python2.7/curses/ from the
      Python installation.
      
      It is left as an exercise to figure out exactly what changed in Mercurial that
      triggered this error.
      75aaae8ad660
    • Steve Borho's avatar
      win32: backout 1a9ebc83a74c · 4898c37e03c0
      Steve Borho authored
      This change conflicted with TortoiseHg's use of QFileSystemWatcher. Files which
      were being monitored (for file-system events) were unable to be reliably updated
      using util.atomictempfile.  Often the update would error out in the middle of
      the process leaving neither the old or the new file in place.
      
      My guess is that _kernel32.CreateFileA() is triggering an exception that is
      not handled correctly within unlink()
      4898c37e03c0
  8. May 05, 2014
  9. May 02, 2014
  10. May 01, 2014
  11. Apr 30, 2014
  12. May 01, 2014
  13. Apr 26, 2014
    • Pierre-Yves David's avatar
      spanset: directly use __contains__ instead of a lambda · b9defeeb62e6
      Pierre-Yves David authored
      Spanset are massively used in revset. First because the initial subset itself is
      a repo wide spanset. We speed up the __and__ operation by getting rid of a
      gratuitous lambda call. A more long terms solution would be to:
      
      1. speed up operation between spansets,
      2. have a special smartset for `all` revisions.
      
      In the mean time, this is a very simple fix that buyback some of the performance
      regression.
      
      Below is performance benchmark for trival `and` operation between two spansets.
      (Run on an unspecified fairly large repository.)
      
      revset tip:0
      2.9.2)  wall 0.282543 comb 0.280000 user 0.260000 sys 0.020000 (best of 35)
      before) wall 0.819181 comb 0.820000 user 0.820000 sys 0.000000 (best of 12)
      after)  wall 0.645358 comb 0.650000 user 0.650000 sys 0.000000 (best of 16)
      
      Proof of concept implementation of an `all` smartset brings this to 0.10 but it's
      too invasive for stable.
      b9defeeb62e6
  14. Apr 30, 2014
  15. Apr 26, 2014
  16. Apr 28, 2014
    • Pierre-Yves David's avatar
      revset: inline spanset containment check (fix perf regression) · 1d7a2771aa36
      Pierre-Yves David authored
      Calling a function is super expensive in python. We inline the trivial range
      comparison to get back to more sensible performance on common revset operation.
      
      Benchmark result below:
      
      Revision mapping:
      0) 3f83fc5cfe71 2.9.2 release
      1) bcfd44abad93 current @
      2) This revision
      
      
      revset #0: public()
      0) wall 0.010890 comb 0.010000 user 0.010000 sys 0.000000 (best of 201)
      1) wall 0.012109 comb 0.010000 user 0.010000 sys 0.000000 (best of 199)
      2) wall 0.012211 comb 0.020000 user 0.020000 sys 0.000000 (best of 197)
      
      revset #1: :10000 and public()
      0) wall 0.007141 comb 0.010000 user 0.010000 sys 0.000000 (best of 361)
      1) wall 0.014139 comb 0.010000 user 0.010000 sys 0.000000 (best of 186)
      2) wall 0.008334 comb 0.010000 user 0.010000 sys 0.000000 (best of 308)
      
      revset #2: draft()
      0) wall 0.009610 comb 0.010000 user 0.010000 sys 0.000000 (best of 279)
      1) wall 0.010942 comb 0.010000 user 0.010000 sys 0.000000 (best of 243)
      2) wall 0.011036 comb 0.010000 user 0.010000 sys 0.000000 (best of 239)
      
      revset #3: :10000 and draft()
      0) wall 0.006852 comb 0.010000 user 0.010000 sys 0.000000 (best of 383)
      1) wall 0.014641 comb 0.010000 user 0.010000 sys 0.000000 (best of 183)
      2) wall 0.008314 comb 0.010000 user 0.010000 sys 0.000000 (best of 299)
      
      We can see this changeset gains back the regression for `and` operation on
      spanset.  We are still a bit slowerfor the `public()` and `draft()`. Predicates
      not touched by this changeset.
      1d7a2771aa36
  17. Apr 30, 2014
    • Matt Mackall's avatar
      ancestor: silence multiple ancestor warning outside of merge (issue4234) · 9f12d8665c7b
      Matt Mackall authored
      The current situation is a bit of a layering violation as
      merge-specific knowledge is pushed down to lower layers and leaks
      merge assumptions into other code paths.
      
      Here, we simply silence the warning with a hack. Both the warning and
      the hack will probably go away in the near future when bid merge is
      made the default.
      9f12d8665c7b
  18. Apr 25, 2014
  19. Apr 28, 2014
  20. Apr 29, 2014
    • Pierre-Yves David's avatar
      graft: do not use `.remove` on a smart set (regression) · a1381eea7c7d
      Pierre-Yves David authored
      Revset calls use to return a list. Graft use to mutate that list. We cannot do
      this anymore leading to a crash when grafting multiple changeset with a revset.
      
          File ".../mercurial/commands.py", line 3117, in graft
            revs.remove(rev)
          AttributeError: '_addset' object has no attribute 'remove'
      
      We are late in code-freeze so we make the shortest possible fix by turning it
      back to a list.
      a1381eea7c7d
  21. Apr 28, 2014
    • Greg Hurrell's avatar
      help: clarify distinction among `contains`/`file`/`filelog` · e9c2f76be74b
      Greg Hurrell authored
      For a Mercurial new-comer, the distinction between `contains(x)`,
      `file(x)`, and `filelog(x)` in the "revsets" help page may not be
      obvious. This commit tries to make things more obvious (text based on
      an explanation from Matt in an FB group thread).
      e9c2f76be74b
  22. Apr 24, 2014
  23. Apr 23, 2014
Loading