Skip to content
Snippets Groups Projects
  1. Oct 01, 2018
  2. Sep 05, 2018
  3. Sep 26, 2018
  4. Sep 25, 2018
  5. Sep 11, 2018
    • Matt Harbison's avatar
      subrepo: mask out passwords embedded in the messages displaying a URL · 41ac8ea1
      Matt Harbison authored
      I noticed the password in maintenance logs for the "no changes since last push"
      and "pushing to" messages when pushing with an explicit path.  But the test case
      here with :pushurl was also affected.  I didn't see that cloning or pulling
      subrepos on demand had this problem, but it seems safer to just mask that too.
      
      There's a bit of a disconnect here, because it looks like clone is slicing off
      the password (makes sense not to store it in the hgrc in cleartext).  But not
      shearing it off of an explicit path causes the subrepo not to realize that it
      already pushed the latest stuff.  This is the easiest fix, however.
      41ac8ea1
  6. Sep 05, 2018
  7. Sep 04, 2018
  8. Aug 31, 2018
  9. Aug 25, 2018
    • Gregory Szorc's avatar
      scmutil: avoid quadratic membership testing (issue5969) · d750a6c9
      Gregory Szorc authored
      tr.changes['revs'] is an xrange, which has an O(n) __contains__
      implementation. The `rev not in newrevs` lookup a few lines below
      will therefore be O(n^2) if all incoming changesets are public.
      
      This issue isn't present on @ because 45e05d39d9ce introduced
      a custom type implementing an xrange primitive with O(1) contains
      and switched tr.changes['revs'] to be an instance of that type.
      
      We work around the problem on the stable branch by casting the
      xrange to a set. This is a bit hacky because it requires allocating
      memory to hold each integer in the range. But we are already
      holding the full set of pulled revision numbers in memory
      multiple times (such as in `tr.changes['phases']`). So this is
      a relatively minor problem.
      
      This issue has been present since the phases reporting code was
      introduced in the 4.7 cycle by eb9835014d20.
      
      This change should be reverted/ignored when stable is merged into
      default.
      
      On the mozilla-unified repository with 483492 changesets, `hg clone`
      time improves substantially:
      
      before: 1843.700s user; 29.810s sys
      after:   461.170s user; 29.360s sys
      d750a6c9
  10. Aug 18, 2018
  11. Aug 20, 2018
  12. Aug 19, 2018
  13. Aug 18, 2018
  14. Aug 17, 2018
    • Boris Feld's avatar
      remotephase: avoid full changelog iteration (issue5964) · f736fdbe
      Boris Feld authored
      Changeset 88efb7d6bcb6 introduced a performance regression by triggering a
      full ancestors walk.
      
      This changeset reworks this logic so that we no longer walk down the full
      changelog. The motivation for 88efb7d6bcb6, issue5939, is still fixed.
      
      mercurial compared to a draft repository
      ----------------------------------------
      
      8eeed92475d5: 0.012637 seconds
      88efb7d6bcb6: 0.202699 seconds (x16)
      46da52f4b820: 0.215551 seconds (+6%)
      this code:    0.008397 seconds (-33% from base)
      
      The payload size reduction we see in `test-bookmarks-pushpull.t` comes from a
      more aggressive filter of nullid and is harmless.
      f736fdbe
    • Boris Feld's avatar
      remotephase: fast path newheads computation in simple case (issue5964) · c89e2fb2
      Boris Feld authored
      Changeset 88efb7d6bcb6 fixed the logic of `phases.newheads` but greatly
      regressed its performance (up to many order of magnitude). The first step to
      fix the regression is to exit early when there is no work to do. If there are
      no heads to filter or not roots to filter them, we don't have to do any work.
      
      This fixes the regression when talking to an all public changeset. The
      performance is even better than before.
      
      pypy, compared to an all public repo
      ------------------------------------
      
      8eeed92475d5: 0.005758 seconds
      88efb7d6bcb6: 0.602517 seconds (x104)
      this code:    0.001508 seconds (-74% from base)
      
      mercurial compared to an all public repo
      ----------------------------------------
      
      8eeed92475d5: 0.000577 seconds
      88efb7d6bcb6: 0.185316 seconds (x321)
      this code:    0.000150 seconds (-74% from base)
      
      The performance of newheads, when actual computations are required, is fixed
      in the next changeset.
      c89e2fb2
    • Boris Feld's avatar
      perf: add a perfphasesremote command · 1732db2f
      Boris Feld authored
      This command measure the time we spend analysing remote phase during push and
      pull and display some information relevant to this computation.
      
      The `test-contrib-perf.t` expected output has to be updated but I do need
      these module for this perf command.
      1732db2f
  15. Aug 15, 2018
    • Boris Feld's avatar
      sparse-revlog: fix delta validity computation · 3730b779
      Boris Feld authored
      When considering the validity of a delta with sparse-revlog, we check the size
      of the largest read. To do so, we use some regular logic with the extra delta
      information. Some of this logic was not handling this extra delta properly,
      confusing it with "nullrev". This confusion with nullrev lead to wrong results
      for this computation but preventing a crash.
      
      Changeset 781b2720d2ac on default revealed this error, crashing. This
      changeset fixes the logic on stable so that the computation is correct (and
      the crash is averted).
      
      The fix is made on stable as this will impact 4.7 clients interacting with
      sparse-revlog repositories (eg: created by later version).
      3730b779
  16. Aug 14, 2018
    • Matt Harbison's avatar
      convert: don't drop missing or corrupt tag entries · 7e023ce2
      Matt Harbison authored
      Cleaning up the tags file could be a useful feature in some cases, so maybe
      there should be a switch for this.  However, the default hg -> hg convert tries
      to maintain identical hashes (thus convert.hg.saverev is off by default, but is
      on by default for other source types).  It looks like _rewritesubstate() has a
      `continue` in it, and therefore a similar problem.
      
      I ran into this conversion divergence when a coworker "merged" two repositories
      by copy/pasting all of the files from the source repo and massaging the code,
      and forgetting to revert the .hg* files.  That silently emptied the .hgtags file
      after the conversion.  (This isn't the manifest node bug Yuya has been helping
      with- this occurred well after the bzr -> hg conversion and wasn't a merge
      commit, which made it extra puzzling.  That bug is still an issue.)
      7e023ce2
  17. Aug 09, 2018
  18. Aug 03, 2018
    • Augie Fackler's avatar
      tests: update test expectations in pre-2.7.9 branch of this test · c9e6ca31
      Augie Fackler authored
      As far as I can tell this is the only spot that got overlooked. Rough
      test methodology (run inside an hg working copy):
      
      docker run --rm -v `pwd`:/hg -it debian:wheezy bash
      apt-get update
      apt-get install python python-dev build-essential unzip mercurial \
        wget libbz2-dev
      make testpy-2.7.8
      
      You could try and use the system Python, but it's 2.7.3 and has lots
      of issues for hg these days that are not worth fixing.
      
      Differential Revision: https://phab.mercurial-scm.org/D4070
      c9e6ca31
  19. Aug 01, 2018
Loading