Skip to content
Snippets Groups Projects
  1. Sep 01, 2015
  2. Sep 02, 2015
    • Kevin Bullock's avatar
      vagrant: update to official Debian 8.1 base box · a31ffc445f02
      Kevin Bullock authored
      Debian now rolls their own official Vagrant base boxes, so use that. At
      the same time, we're updating from Debian 7.4 (wheezy) to 8.1 (jessie),
      and switching from 32-bit to 64-bit (Debian does not provide 32-bit base
      boxes).
      a31ffc445f02
  3. Sep 01, 2015
  4. Aug 22, 2015
    • Gregory Szorc's avatar
      hgweb: move archive related attributes to requestcontext · 6defc74f3066
      Gregory Szorc authored
      As part of this, "archive_specs" was renamed to "archivespecs" to align
      with naming conventions.
      
      "archive_specs" didn't technically need to be moved from hgweb. But it
      seemed to make sense to have all the archive code in the same class.
      
      As part of this, hgweb.configlist is no longer used, so it was deleted.
      6defc74f3066
    • Gregory Szorc's avatar
      hgweb: move some config options to requestcontext · edfb4d3b9672
      Gregory Szorc authored
      Various config options from the repository were stored on the
      hgweb instance. While unlikely, there could be race conditions between
      a new request updating these values and an in-flight request seeing both
      old and new values, leading to weird results.
      
      We move some of options/attributes from hgweb to requestcontext.
      
      As part of this, we establish config* helpers on requestcontext. As
      part of the move, we changed int() casts to configint() calls. The
      int() usage likely predates the existence of configint().
      
      We also removed config option updating from once every refresh to every
      request. I don't believe obtaining config options is expensive enough to
      warrant only doing when the repository has changed.
      
      The excessive use of object.__setattr__ is unfortunate. But it will
      eventually disappear once the proxy is no longer necessary.
      edfb4d3b9672
    • Gregory Szorc's avatar
      hgweb: establish class for holding per request context · e0a6908f066f
      Gregory Szorc authored
      Currently, hgweb applications have many instance variables holding
      mutated state. This is somewhat problematic because multiple threads
      may race accessing or changing this state.
      
      This patch starts a series that will add more thread safety to
      hgweb applications. It will do this by moving mutated state out
      of hgweb and into per-request instances of the newly established
      "requestcontext" class.
      
      Our new class currently behaves like a proxy to hgweb instances. This
      should change once all state is captured in it instead of hgweb. The
      effectiveness of this proxy is demonstrated by passing instances of
      it - not hgweb instances/self - to various functions.
      e0a6908f066f
    • Gregory Szorc's avatar
      hgweb: don't make request optional · 44ed220ef26f
      Gregory Szorc authored
      The "request" argument has been optional in this code since
      it was introduced in 38170eeed18c in 2009. There are no consumers that
      don't pass this argument. So don't make it an optional argument.
      44ed220ef26f
    • Gregory Szorc's avatar
      hgweb: add some documentation · 9df8c729e2e7
      Gregory Szorc authored
      It took longer than I wanted to grok how the various parts of hgweb
      worked. So I added some class and method documentation to help whoever
      hacks on this next.
      9df8c729e2e7
  5. Sep 01, 2015
  6. Aug 18, 2015
  7. Sep 01, 2015
  8. Aug 28, 2015
    • Matt Mackall's avatar
      contrib: add showstack extension · bdac264e5ed4
      Matt Mackall authored
      This allows getting a Python stack trace at any time on Unix by
      hitting Ctrl-\ (or Ctrl-T on BSDs). Useful for debugging mysterious
      hangs on the fly. Sample output:
      
      $ hg log -k nosuchmessage
      ^\
        File "/home/mpm/hg/mercurial/revset.py", line 3089, in _iterfilter
          if cond(x):
        File "/home/mpm/hg/mercurial/util.py", line 415, in f
          cache[arg] = func(arg)
        File "/home/mpm/hg/mercurial/revset.py", line 1215, in matches
          for t in c.files() + [c.user(), c.description()])
        File "/home/mpm/hg/mercurial/context.py", line 525, in files
          return self._changeset[3]
        File "/home/mpm/hg/mercurial/util.py", line 531, in __get__
          result = self.func(obj)
        File "/home/mpm/hg/mercurial/context.py", line 498, in _changeset
          return self._repo.changelog.read(self.rev())
        File "/home/mpm/hg/mercurial/changelog.py", line 338, in read
          text = self.revision(node)
        File "/home/mpm/hg/mercurial/revlog.py", line 1092, in revision
          bins = self._chunks(chain)
        File "/home/mpm/hg/mercurial/revlog.py", line 1013, in _chunks
          ladd(decompress(buffer(data, chunkstart - offset, chunklength)))
        File "/home/mpm/hg/mercurial/revlog.py", line 91, in decompress
          return _decompress(bin)
      ----
      bdac264e5ed4
  9. Sep 01, 2015
    • Matt Mackall's avatar
      Added signature for changeset 1a45e49a6bed · d0843f7e16b4
      Matt Mackall authored
      d0843f7e16b4
    • Matt Mackall's avatar
      Added tag 3.5.1 for changeset 1a45e49a6bed · e0bfa3374a6a
      Matt Mackall authored
      e0bfa3374a6a
    • Matt Mackall's avatar
      hgweb: fix trust of templates path (BC) · 1a45e49a6bed
      Matt Mackall authored
      Long ago we disabled trust of the templates path with a comment
      describing the (insecure) behavior before the change. At some later
      refactor, the code was apparently changed back to match the comment,
      unaware that the intent of the comment was to describe the behavior to
      avoid.
      
      This change disables the trust and updates the comment to explicitly
      say not only what the old problem was, but also that it was in fact a
      problem and the action taken to prevent it.
      
      Impact: prior to this change, if you had a UNIX-based hgweb server
      where users can write hgrc files, those users could potentially read
      any file readable by the web server.
      
      This is marked as a backwards compatibility issue because people may
      have configured templates without proper trust settings. Issue spotted
      by Greg Szorc.
      3.5.1
      1a45e49a6bed
    • Matt Harbison's avatar
      wix: avoid an abort with 'hg help -k foo' · 65d2538ac993
      Matt Harbison authored
      Previously:
      
       $ /c/Program\ Files/Mercurial/hg help -k merge-tools
       abort: No such file or directory: c:\Program Files\Mercurial\help\scripting.txt
      
      The Inno installer seems OK, but the TortoiseHg required the same fix.  That got
      queued with an additional change of 'helpFolder.guid' in guids.wxi (probably by
      Steve).  I'm not sure if that is necessary here too.
      65d2538ac993
  10. Aug 30, 2015
    • Durham Goode's avatar
      revlog: add an aggressivemergedelta option · 049005de325e
      Durham Goode authored
      This adds an option for delta'ing against both p1 and p2 when applying merge
      revisions and picking whichever is smallest.
      
      Some before and after stats on manifest.d size:
      
      internal large repo:
      before: 1.2 GB
      after: 930 MB
      
      mozilla-central:
      before: 261 MB
      after: 92 MB
      049005de325e
    • Durham Goode's avatar
      revlog: change generaldelta delta parent heuristic · 4dc5b51f38fe
      Durham Goode authored
      The old generaldelta heuristic was "if p1 (or p2) was closer than the last full text,
      use it, otherwise use prev". This was problematic when a repo contained multiple
      branches that were very different. If commits to branch A were pushed, and the
      last full text was branch B, it would generate a fulltext. Then if branch B was
      pushed, it would generate another fulltext. The problem is that the last
      fulltext (and delta'ing against `prev` in general) has no correlation with the
      contents of the incoming revision, and therefore will always have degenerate
      cases.
      
      According to the blame, that algorithm was chosen to minimize the chain length.
      Since there is already code that protects against that (the delta-vs-fulltext
      code), and since it has been improved since the original generaldelta algorithm
      went in (2011), I believe the chain length criteria will still be preserved.
      
      The new algorithm always diffs against p1 (or p2 if it's closer), unless the
      resulting delta will fail the delta-vs-fulltext check, in which case we delta
      against prev.
      
      Some before and after stats on manifest.d size.
      
      internal large repo
      old heuristic - 2.0 GB
      new heuristic - 1.2 GB
      
      mozilla-central
      old heuristic - 242 MB
      new heuristic - 261 MB
      
      The regression in mozilla central is due to the new heuristic choosing p2r as
      the delta when it's closer to the tip. Switching the algorithm to always prefer
      p1r brings the size back down (242 MB). This is result of the way in which
      mozilla does merges and pushes, and the result could easily swing the other
      direction in other repos (depending on if they merge X into Y or Y into X), but
      will never be as degenerate as before.
      
      I future patch will address the regression by introducing an optional, even more
      aggressive delta heuristic which will knock the mozilla manifest size down
      dramatically.
      4dc5b51f38fe
    • Durham Goode's avatar
      revlog: move textlen calculation to be above delta chooser · 562cfc99e611
      Durham Goode authored
      This moves the textlen calculation to be above the delta chooser. Since textlen
      is needed for calling isgooddelta, we need it above the delta chooser so future
      patches can call isgooddelta.
      562cfc99e611
    • Durham Goode's avatar
      revlog: move delta check to it's own function · 748347e0e8d4
      Durham Goode authored
      This moves the delta vs fulltext comparison to its own function. This will allow
      us to reuse the function in future patches for more efficient delta choices. As
      a side effect, this will also allow extensions to modify our delta criteria.
      748347e0e8d4
  11. Aug 19, 2015
  12. Aug 30, 2015
  13. Aug 31, 2015
  14. Aug 25, 2015
    • Augie Fackler's avatar
      hghave: add a check for docker support · dcc12365fa38
      Augie Fackler authored
      This currently refuses to operate if on a non-Linux host. I suspect
      that Docker running on FreeBSD 11 or on an Illumos derivative would
      work fine, but I don't have ready access to such a system.
      
      On OS X using boot2docker (I used a hacky xhyve-based one for
      testing), it won't work because $TESTTEMP doesn't end up inside the
      set of directories that get forwarded to the boot2docker VM, so you
      can't actually drop debs in the $TESTTEMP at all. It would be possible
      (probably even trivial) to hack around this by using a randomly-named
      temporary directory inside the working directory, but that seems
      unlikely to be useful enough to justify the ugliness.
      dcc12365fa38
    • Augie Fackler's avatar
      hghave: add a check for debian packaging tools · 2dcfb98c5314
      Augie Fackler authored
      2dcfb98c5314
    • Augie Fackler's avatar
      run-tests: add support for marking tests as very slow · bad09bd22b6a
      Augie Fackler authored
      I want to add tests for our packaging rules, but those necessarily run
      a whole build, or possibly two if both native packaging and docker are
      available. This lets us flag such tests with a `#require slow` so that
      they don't unnecessarily slow down normal test runs.
      bad09bd22b6a
    • Augie Fackler's avatar
      builddeb: rework how output dir and platform are specified · 05306b9359d3
      Augie Fackler authored
      This makes it possible to write tests for both builddeb and dockerdeb
      that actually build .debs and then sanity check the contents.
      05306b9359d3
  15. Aug 26, 2015
  16. Jul 04, 2015
  17. Aug 30, 2015
    • liscju's avatar
      clone: fix updaterev to update to latest branch changeset (issue4528) · 30be3aeb5344
      liscju authored
      Before this patch if clone --updaterev points to branch which head
      on src repo wasnt in dest repo, clone updated dest repo to
      default branch. After applying this patch, if changeset from
      src repo pointing at given branch is not in dest repo, it searches
      for changeset pointing for given branch locally in dest repo.
      
      Lookup in destination repo:
        559: uprev = destrepo.lookup(update)
      is wrapped by try/except block to preserve current behaviour when
      given revset to -u is not found - it will not fail,but silently update
      dest repo to head of default branch.
      30be3aeb5344
  18. Aug 20, 2015
    • liscju's avatar
      revsets: makes follow() supports file patterns (issue4757) (BC) · 5618858dce26
      liscju authored
      Before this patch, follow only supports full, exact filenames.
      This patch makes follow argument to be treated like file
      pattern same way like log treats their arguments.
      
      It preserves current behaviour of follow() matching paths
      relative to the repository root by default.
      5618858dce26
Loading