Skip to content
Snippets Groups Projects
  1. Nov 02, 2014
  2. Nov 01, 2014
  3. Oct 31, 2014
  4. Oct 30, 2014
  5. Oct 27, 2014
  6. Oct 23, 2014
  7. Oct 18, 2014
  8. Sep 29, 2014
  9. Oct 29, 2014
    • Matt Harbison's avatar
      amend: abort early if no username is configured with evolve enabled (issue4211) · b564330d
      Matt Harbison authored
      Amend will reuse the original username if a new one is not provided
      with -U, but obsolete.createmarkers() only considers ui.username() for
      the obsolete marker's metadata. Allowing the metadata field to be
      spoofed seems to defeat the point of the field in the first place.
      This covers 'evolve amend' and 'ci --amend' with evolve enabled.
      
      Without this, the transaction aborts but the parent changeset is set to -1.  The
      corresponding test will be added to evolve separately.
      b564330d
  10. Oct 28, 2014
    • Durham Goode's avatar
      revset: fix O(2^n) perf regression in addset · ac494b08
      Durham Goode authored
      hg log -r 1 ... -r 100 was never returning due to a regression in the
      way addset computes __nonzero__. It used 'bool(self._r1 or self._r2)'
      which required executing self._r1.__nonzero__ twice (once for the or,
      once for the bool). hg log with a lot of -r's happens to build a one
      sided addset tree of N length, which ends up being 2^N performance.
      
      This patch fixes it by converting to bool before or'ing.
      
      This problem can be repro'd with something as simple as:
      
      hg log `for x in $(seq 1 50) ; do echo "-r $x "; done`
      
      Adding '1 + 2 + ... + 20' to the revsetbenchmark.txt didn't seem to repro the
      problem, so I wasn't able to add a revset benchmark for this issue.
      ac494b08
    • Matt Mackall's avatar
      tests: add missing glob for Windows · 6df4bc39
      Matt Mackall authored
      6df4bc39
  11. Oct 27, 2014
  12. Oct 24, 2014
    • Siddharth Agarwal's avatar
      util.fspath: use a dict rather than a linear scan for lookups · 30124c40
      Siddharth Agarwal authored
      Previously, we'd scan through the entire directory listing looking for a
      normalized match.  This is O(N) in the number of files in the directory. If we
      decide to call util.fspath on each file in it, the overall complexity works out
      to O(N^2). This becomes a problem with directories a few thousand files or
      larger.
      
      Switch to using a dictionary instead. There is a slightly higher upfront cost
      to pay, but for cases like the above this is amortized O(1). Plus there is a
      lower constant factor because generator comprehensions are faster than for
      loops, so overall it works out to be a very small loss in performance for 1
      file, and a huge gain when there's more.
      
      For a large repo with around 200k files in it on a case-insensitive file
      system, for a large directory with over 30,000 files in it, the following
      command was tested:
      
      ls | shuf -n $COUNT | xargs hg status
      
      This command leads to util.fspath being called on $COUNT files in the
      directory.
      
      COUNT  before  after
          1   0.77s  0.78s
        100   1.42s  0.80s
       1000    6.3s  0.96s
      
      I also tested with COUNT=10000, but before took too long so I gave up.
      30124c40
  13. Oct 27, 2014
Loading