- Sep 01, 2015
-
-
Yuya Nishihara authored
Because pwd should start with "/", "/`pwd`" is enough to make absolute path.
-
- Sep 02, 2015
-
-
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).
-
- Sep 01, 2015
-
-
Augie Fackler authored
Without this, building RPMs can fail.
-
Matt Mackall authored
-
Augie Fackler authored
os.popen was deprecated in Python 2.6 in favor of subprocess, so let's move into the future.
-
- Aug 22, 2015
-
-
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.
-
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.
-
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.
-
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.
-
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.
-
- Sep 01, 2015
-
-
Anton Shestakov authored
Tags and bookmarks on summary page are already limited to 10, let's limit branches as well. Each of the blocks (tags, bookmarks, branches) currently has a link to the full list.
-
Anton Shestakov authored
This allows showing correct status for each branch, which was missing on /summary. Usually that means that closed branches get the same css class (resulting in e.g. different color/shade) as they do on /branches page. The sorting of the branches on summary page also changes and is now the same as on /branches page: closed branches are now at the end of the list.
-
Anton Shestakov authored
-
- Aug 18, 2015
-
-
Yuya Nishihara authored
The keyword extension uses "utcdate" for a different function, so we can't add new "utcdate" filter or function. Instead, this patch extends "localdate" to a general timezone converter.
-
- Sep 01, 2015
-
-
Yuya Nishihara authored
It will be extended to accept a timezone argument.
-
Yuya Nishihara authored
It will be used to parse a timezone argument passed to a template function.
-
Yuya Nishihara authored
Because evalfuncarg() accepts an argument tuple, there is little meaning to pass (func, data, filt) in place of ((func, data), filt).
-
Yuya Nishihara authored
It will be used to get a date tuple from an argument. Perhaps some of "stringify(args[n][0], ...)" can be replaced by this function.
-
- Aug 28, 2015
-
-
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) ----
-
- Sep 01, 2015
-
-
Matt Mackall authored
-
Matt Mackall authored
-
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.
-
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.
-
- Aug 30, 2015
-
-
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
-
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.
-
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.
-
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.
-
- Aug 19, 2015
-
-
Anton Shestakov authored
-
- Aug 30, 2015
-
-
timeless authored
-
- Aug 31, 2015
-
-
Matt Mackall authored
-
- Aug 25, 2015
-
-
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.
-
Augie Fackler authored
-
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.
-
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.
-
- Aug 26, 2015
-
-
Augie Fackler authored
We had to do this before because Python 2.4 didn't understand the n format specifier in Py_BuildValue and friends. We no longer have that problem.
-
- Jul 04, 2015
-
-
Yuya Nishihara authored
These filters are defined as 'date()' and 'strip()' functions. Help messages are moved to the corresponding functions.
-
Yuya Nishihara authored
"filter(expr)" is allowed already. This patch adds the opposite, "expr|func".
-
Yuya Nishihara authored
This prepares for the unified filter syntax that will be introduced by the next patch.
-
- Aug 30, 2015
-
-
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.
-
- Aug 20, 2015
-
-
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.
-