Skip to content
Snippets Groups Projects
  1. Oct 31, 2014
  2. Oct 30, 2014
  3. Oct 27, 2014
  4. Oct 23, 2014
  5. Oct 18, 2014
  6. Sep 29, 2014
  7. Oct 29, 2014
    • Matt Harbison's avatar
      amend: abort early if no username is configured with evolve enabled (issue4211) · b564330d4b1f
      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.
      b564330d4b1f
  8. Oct 28, 2014
    • Durham Goode's avatar
      revset: fix O(2^n) perf regression in addset · ac494b087feb
      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.
      ac494b087feb
    • Matt Mackall's avatar
      tests: add missing glob for Windows · 6df4bc39f682
      Matt Mackall authored
      6df4bc39f682
  9. Oct 27, 2014
  10. Oct 24, 2014
    • Siddharth Agarwal's avatar
      util.fspath: use a dict rather than a linear scan for lookups · 30124c40d11f
      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.
      30124c40d11f
  11. Oct 27, 2014
  12. Oct 24, 2014
  13. Oct 27, 2014
    • Katsunori FUJIWARA's avatar
      largefiles: add examination of exec bit in "hg status --rev REV" case · 24600c9d7f4e
      Katsunori FUJIWARA authored
      Before this patch, "hg status --rev REV" doesn't list largefiles up
      with "M" mark, even if exec bit of them is changed, because
      "lfilesrepo.status" doesn't examine exec bit in such case.
      24600c9d7f4e
    • Katsunori FUJIWARA's avatar
      largefiles: ignore removal status of files not managed in the target context · 197dc4580da2
      Katsunori FUJIWARA authored
      Before this patch, "hg status --rev REV" listed largefiles removed in
      the working directory up with "R" mark, even if they aren't managed in
      the REV. Normal files aren't listed up in such case.
      
      When "lfilesrepo.status" is invoked for "hg status --rev REV", it
      treats files on conditions below as "removed" (to avoid manifest full
      scan in "ctx.status" ?):
      
        - marked as "R" in lfdirstate, or
      
        - files managed in the target revision but unknown in the manifest
          of the working context (= not including "R" files)
      
      But the former can include files not managed in the target context.
      
      To ignore removal status of files not managed in the target context,
      this patch drops files unknown in the target revision from "removed"
      list.
      197dc4580da2
  14. Oct 26, 2014
    • Mads Kiilerich's avatar
      changelog: use headrevsfiltered · fe5f044b753d
      Mads Kiilerich authored
      2b5940f64750 introduced use of the new filtering headrevs C implementation. It
      caught TypeError to detect when to fall back to the implementation that was
      compatible with old extensions. That method was however not reliable.
      
      Instead, use the new headrevsfiltered function when passing a filter. It will
      reliably fail with AttributeError when an old extension that predates
      headrevsfiltered is used.
      fe5f044b753d
    • Mads Kiilerich's avatar
      parsers: introduce headrevsfiltered in C extension · 42342f9afe01
      Mads Kiilerich authored
      All extensions that have this function do support filtering. The existing
      headrevs function may support filtering but we cannot reliably detect whether
      it does.
      42342f9afe01
    • Matt Harbison's avatar
      httppeer: close the temporary bundle file after two-way streaming it · cde6904f1992
      Matt Harbison authored
      This fixes several push tests in test-bundle2-exchange.t that were failing on
      Windows with messages like the following:
      
         $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 \
              --bookmark book_32af
         pushing to http://localhost:$HGPORT2/
         searching for changes
         remote: adding changesets
         remote: adding manifests
         remote: adding file changes
         remote: added 1 changesets with 1 changes to 1 files
         remote: 1 new obsolescence markers
         updating bookmark book_32af
         abort: The process cannot access the file because it is being used by another
                  process: 'C:\path\to\tmp\bundle.hg'
         [255]
      cde6904f1992
  15. Oct 24, 2014
    • Martin von Zweigbergk's avatar
      status: make 'hg status --rev' faster when there are deleted files · e9165c18f8df
      Martin von Zweigbergk authored
      In order not to avoid listing files as both added and deleted, for
      example, we check for every file in the manifest if it is in the
      _list_ of deleted files. This can get quite slow when there are many
      deleted files. Change it to a set to make the containment check
      faster. On a somewhat contrived example of the Mozilla repo with the
      entire testing/ directory deleted (~14k files), this makes
      'hg status --rev .^' go from 26s to 2s.
      e9165c18f8df
  16. Oct 27, 2014
    • Pierre-Yves David's avatar
      setdiscovery: limit the size of the initial sample (issue4411) · 3ef893520a85
      Pierre-Yves David authored
      The set discovery start by sending a "known" command with all local heads. When
      the number of local heads is massive (eg: using hidden changesets) such request
      becomes too large. This lead to 414 error over http, aborting the whole
      process.
      
      We limit the size of the sample used by the first query to fix this.
      
      The test are impacted because they do test massive number of heads. But they do
      not test it over real world http setup.
      3ef893520a85
    • Pierre-Yves David's avatar
      setdiscovery: extract sample limitation in a `_limitsample` function · ee45f5c2ffcc
      Pierre-Yves David authored
      We need to reuse this logic for the initial query. We extract it in a function
      to unsure sample limiting is applied consistently in all cases.
      ee45f5c2ffcc
  17. Oct 24, 2014
    • Gregory Szorc's avatar
      exchange: don't report failure from identical bookmarks · 0fc4686de1d7
      Gregory Szorc authored
      b901645a8784 regressed the behavior of pushing an unchanged bookmark to
      a remote. Before that commit, pushing a unchanged bookmark would result
      in "exporting bookmark @" being printed. After that commit, we now see
      an incorrect message "bookmark %s does not exist on the local or remote
      repository!"
      
      This patch fixes the regression introduced by b901645a8784 by having
      the bookmark error reporting code filter identical bookmarks and adds
      a test for the behavior.
      0fc4686de1d7
    • Gregory Szorc's avatar
      bookmarks: explicitly track identical bookmarks · e62c330a044f
      Gregory Szorc authored
      bookmarks.compare() previously lumped identical bookmarks in the
      "invalid" bucket. This patch adds a "same" bucket.
      
      An 8-tuple for holding this state is pretty gnarly. The return value
      should probably be converted into a class to increase readability. But
      that is beyond the scope of a patch intended to be a late arrival to
      stable.
      e62c330a044f
    • Martin von Zweigbergk's avatar
      context.status: remove incorrect swapping of added/removed in workingctx · c586cb50872b
      Martin von Zweigbergk authored
      The comment in workingctx.status() says that "calling 'super' subtly
      reveresed the contexts", but that is simply not true, so we should not
      be swapping added and removed fields.
      c586cb50872b
  18. Oct 23, 2014
    • Martin von Zweigbergk's avatar
      keyword: use parent of working copy as base for status · c4ce50a3d634
      Martin von Zweigbergk authored
      Instead of calling repo[None].status(), use the more common form that
      uses the parent of the working copy as the base:
      repo['.'].status(). Note that the former defaults to comparing to
      revision '.', while the latter defaults to revision None, so the
      contexts being compared are the same.
      
      It might seem like this would result in a reverse diff, but it turns
      out that workingctx.status() incorrectly reverses the result. That bug
      will be fixed in a later commit.
      c4ce50a3d634
    • Yuya Nishihara's avatar
      revset: avoid O(n) lookup of invalid revision in rev() · eb763217152a
      Yuya Nishihara authored
      ba89f7b542c9 was not the final version of that patch.  It was really slow
      because `l not in repo.changelog` iterates revisions up to `l`.  Instead,
      rev() should utilize spanset.__contains__().
      
      revset #0: rev(210000)
      0) wall 0.000039 comb 0.000000 user 0.000000 sys 0.000000 (best of 67978)
      1) wall 0.002721 comb 0.000000 user 0.000000 sys 0.000000 (best of 1055)
      2) wall 0.000059 comb 0.000000 user 0.000000 sys 0.000000 (best of 45599)
      (0: 3.2-rc, 1: ba89f7b542c9, 2: this patch)
      
      Note that the benchmark result described in ba89f7b542c9 is wrong because
      it is the one of the initial version.
      eb763217152a
    • Matt Mackall's avatar
      run-tests: output diffs with only forward slashes · 605a8cb61a0c
      Matt Mackall authored
      This removes some gratuitous variance when testing on Windows with
      test-run-tests.t.
      605a8cb61a0c
Loading