1. 20 Nov, 2015 1 commit
  2. 21 Nov, 2015 9 commits
  3. 23 Nov, 2015 1 commit
    • Gregory Szorc's avatar
      revlog: improve documentation · 7860366b46c9
      Gregory Szorc authored
      There are a lot of functions and variables doing similar things.
      Document the role and functionality of each to make it easier to
      grok.
      7860366b46c9
  4. 22 Nov, 2015 1 commit
  5. 15 Nov, 2015 1 commit
    • Gregory Szorc's avatar
      ui.write: don't clear progress bar when writing to a buffer · 9eeca021a803
      Gregory Szorc authored
      ui.write() has 2 modes: buffered and unbuffered. In buffered mode, we
      capture output before writing it. This is how changeset printing works,
      for example.
      
      Previously, we were potentially clearing the progress bar for every
      call to ui.write(). In buffered mode, this clearing was useless because
      the clearing function would be called again before actually writing
      the buffered data.
      
      This patch stops the useless calling of _progclear() unless we are
      actually writing data. During changeset printing with the default
      template, this removes ~6 function calls per changeset, making
      changeset printing slightly faster.
      
      before: 23.76s
      after:  23.35s
      delta:  -0.41s (98.3% of original)
      9eeca021a803
  6. 23 Nov, 2015 1 commit
  7. 15 Nov, 2015 2 commits
    • Gregory Szorc's avatar
      util.datestr: use divmod() · 6f1f8e88f036
      Gregory Szorc authored
      We were computing the quotient and remainder of a division operation
      separately. The built-in divmod() function allows us to do this with
      a single function call. Do that.
      6f1f8e88f036
    • Gregory Szorc's avatar
      cmdutil.changeset_printer: pass context into showpatch() · 93bcc73df8d5
      Gregory Szorc authored
      Before, we passed the node then subsequently performed a lookup on
      repo.changelog. We already has the context available, so just pass it
      in.
      
      This does result in a small performance win. But I doubt it will show
      up anywhere because diff[stat] calculation will dwarf the time spent
      to create a changectx. Still, we should be creating fewer changectx
      out of principle.
      93bcc73df8d5
  8. 22 Nov, 2015 4 commits
    • Gregory Szorc's avatar
      context: avoid extra parents lookups · a29db426c5ba
      Gregory Szorc authored
      Resolving parents requires reading from the changelog, which is a few
      attributes and function calls away. Parents lookup occurs surprisingly
      often. Micro optimizing the code to avoid redundant lookups of parents
      appears to make `hg log` on my Firefox repo a little faster:
      
      before: 24.91s
      after:  23.76s
      delta:  -1.15s (95.4% of original)
      a29db426c5ba
    • Gregory Szorc's avatar
      context: optimize _parents() · 37e1fdcb271c
      Gregory Szorc authored
      This patch avoids some extra attribute lookups and list mutations.
      
      This micro-optimization seems to result in a minor speedup for `hg log`
      on my Firefox repo:
      
      before: 25.35s
      after:  24.91s
      delta:  -0.44s (98% of original)
      
      Not the biggest gain. But every little bit helps.
      37e1fdcb271c
    • Matt Harbison's avatar
      test-histedit: $TESTTMP quoting fixes for Windows · e4f2e4f5e98d
      Matt Harbison authored
      Without this, C:\path\to\test is converted into C:pathtotest.
      
      Since $TESTTMP appears in output, seems to work in some places without quotes,
      and is also used within a larger quote block (see test-rebase-collapse.t, ~line
      160), I'm not sure what a check-code rule would look like (or even if it is
      feasible).
      e4f2e4f5e98d
    • Gregory Szorc's avatar
      lsprof: support PyPy (issue4573) · 9c75daf89450
      Gregory Szorc authored
      PyPy's _lsprof module doesn't export a "profiler_entry" symbol. This
      patch treats the symbol as optional and falls back to verifying the
      attribute is present on the first entry in the collected data as
      part of validation.
      
      There is a chance not every entry will contain the requested sort
      attribute. But, this patch does unbust lsprof on PyPy for the hg
      commands I've tested, so I assume it is sufficient. It's certainly
      better than the ImportError we encountered before.
      
      As part of the import refactor, I snuck in the addition of
      absolute_import.
      9c75daf89450
  9. 12 Nov, 2015 1 commit
  10. 20 Nov, 2015 2 commits
  11. 16 Nov, 2015 1 commit
  12. 09 Nov, 2015 1 commit
    • Matt Harbison's avatar
      test-context: conditionalize the workingfilectx date printing for Windows · 01489fa0bbbe
      Matt Harbison authored
      Starting with 13272104bb07, the output changed on Windows:
      
        --- e:/Projects/hg/tests/test-context.py.out
        +++ e:/Projects/hg/tests/test-context.py.err
        @@ -1,4 +1,4 @@
        -workingfilectx.date = (1000, 0)
        +workingfilectx.date = (1000L, 0)
         ASCII   : Gr?ezi!
         Latin-1 : Grⁿezi!
         UTF-8   : Gr├╝ezi!
      
      Since int and long are both 32 bit on Windows, this seems harmless in practice
      other than the previous test failure.
      01489fa0bbbe
  13. 16 Nov, 2015 3 commits
    • Matt Harbison's avatar
      test-mq-qrefresh: drop single quoting of HGEDITOR value for Windows · 5a0ffa245920
      Matt Harbison authored
      This was failing with:
      
          sh: $TESTTMP/checkvisibility.sh: No such file or directory
      5a0ffa245920
    • Matt Harbison's avatar
      test-import: don't use printf to append an extension to $HGRCPATH · fe458d078ed7
      Matt Harbison authored
      The extension was failing to load on Windows because $TESTTMP contains a path
      component 'test', prefixed by a path separator '\'.  That combination ends up
      converted to "...<tab>est...".
      fe458d078ed7
    • Matt Harbison's avatar
      test-ssh: stop quoting dummyssh invocation for Windows · c858945f6969
      Matt Harbison authored
      The other invocations aren't quoted, and Windows doesn't like the single quotes:
      
        diff --git a/tests/test-ssh.t b/tests/test-ssh.t
        --- a/tests/test-ssh.t
        +++ b/tests/test-ssh.t
        @@ -520,20 +520,8 @@ remote hook failure is attributed to rem
           $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc
      
           $ hg -q --config ui.ssh="python '$TESTDIR/dummyssh'" clone ssh://user@dummy/remote hookout
        +  abort: no suitable response from remote hg!
        +  [255]
           $ cd hookout
        +  $TESTTMP.sh: line 264: cd: hookout: No such file or directory
           $ touch hookfailure
        -  $ hg -q commit -A -m 'remote hook failure'
        ....
      c858945f6969
  14. 20 Nov, 2015 2 commits
  15. 19 Nov, 2015 1 commit
  16. 14 Nov, 2015 1 commit
  17. 20 Nov, 2015 1 commit
  18. 14 Nov, 2015 1 commit
  19. 31 Oct, 2015 1 commit
  20. 01 Nov, 2015 3 commits
  21. 14 Nov, 2015 2 commits