Sat, 12 Sep 2015 16:11:17 -0700 revlog: optionally cache the full text when adding revisions
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 12 Sep 2015 16:11:17 -0700] rev 26243
revlog: optionally cache the full text when adding revisions revlog instances can cache the full text of a single revision. Typically the most recently read revision is cached. When adding a delta group via addgroup() and _addrevision(), the full text isn't always computed: sometimes only the passed in delta is sufficient for adding a new revision to the revlog. When writing the changelog from a delta group, the just-added full text revision is always read immediately after it is written because the changegroup code needs to extract the set of files from the entry. In other words, revision() is *always* being called and caching the full text of the just-added revision is guaranteed to result in a cache hit, making the cache worthwhile. This patch adds support to _addrevision() for always building and caching the full text. This option is currently only active when processing changelog entries from a changegroup. While the total number of revision() calls is the same, the location matters: buildtext() calls into revision() on the base revision when building the full text of the just-added revision. Since the previous revision's _addrevision() built the full text and the the previous revision is likely the base revision, this means that the base revision's full text is likely cached and can be used to compute the current full text from just a delta. No extra I/O required. The end result is the changelog isn't opened and read after adding every revision from a changegroup. On my 2013 MacBook Pro running OS X 10.10.5 from an SSD and Python 2.7, this patch impacted the time taken to apply ~262,000 changesets from a mozilla-central gzip bundle: before: ~43s after: ~32s ~25% reduction in changelog processing times. Not bad.
Sat, 12 Sep 2015 15:16:47 -0700 revlog: drop local assignment of cache variable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 12 Sep 2015 15:16:47 -0700] rev 26242
revlog: drop local assignment of cache variable The purpose of this code was to provide thread safety. With the conversion of hgweb to use separate localrepository instances per request/thread, we should no longer have any consumers that need to access revlog instances from multiple threads. Remove the code.
Sat, 12 Sep 2015 12:47:00 -0700 revlog: rename generic "i" variable to "indexdata"
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 12 Sep 2015 12:47:00 -0700] rev 26241
revlog: rename generic "i" variable to "indexdata" Increase readability.
Sat, 12 Sep 2015 11:31:56 -0700 hg: always create new localrepository instance
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 12 Sep 2015 11:31:56 -0700] rev 26240
hg: always create new localrepository instance cachedlocalrepo.copy() didn't actually create new localrepository instances. This meant that the new thread isolation code in hgweb wasn't actually using separate localrepository instances, even though it was properly using separate cachedlocalrepo instances. Because the behavior of the API changed, the single caller in hgweb had to be refactored to always call _webifyrepo() or it may not have used the proper filter. I confirmed via print() debugging that id(repo) is in fact different on each thread. This was not the case before. For reasons I can't yet explain, this does not fix issue4756. I suspect there is shared cache somewhere that isn't thread safe.
Thu, 10 Sep 2015 19:45:46 -0400 test-bad-extension: reduce dependencies on other things
timeless@mozdev.org [Thu, 10 Sep 2015 19:45:46 -0400] rev 26239
test-bad-extension: reduce dependencies on other things test-bad-extension would jitter if the format of the first line of hg help changed, which isn't relevant to its goal.
Thu, 10 Sep 2015 20:22:37 -0400 help: fix help argument parsing and documentation
timeless@mozdev.org [Thu, 10 Sep 2015 20:22:37 -0400] rev 26238
help: fix help argument parsing and documentation support combining -c and -e previously -k was misdocumented: * the first line didn't mention it * the help half implied you could do help -k keyword topic with these changes, -k just changes the search method support -c and -e for -k searches
Thu, 10 Sep 2015 10:48:20 -0400 minirst: establish leveling for nested definitions
timeless@mozdev.org [Thu, 10 Sep 2015 10:48:20 -0400] rev 26237
minirst: establish leveling for nested definitions
Sun, 13 Sep 2015 16:30:21 -0400 dispatch: use the right context manager to deactivate demandimport
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Sun, 13 Sep 2015 16:30:21 -0400] rev 26236
dispatch: use the right context manager to deactivate demandimport In e86d12404d69 I very embarrassingly wrote a patch with the completely wrong function name. This should fix it.
Thu, 10 Sep 2015 10:50:03 -0400 ui: improve docs on ui.log
Augie Fackler <augie@google.com> [Thu, 10 Sep 2015 10:50:03 -0400] rev 26235
ui: improve docs on ui.log This makes the documentation on ui.log line up with the use of that interface in blackbox.
Sat, 12 Sep 2015 00:21:41 +0900 templater: switch ctx of list expression to rev of revset() (BC)
Yuya Nishihara <yuya@tcha.org> [Sat, 12 Sep 2015 00:21:41 +0900] rev 26234
templater: switch ctx of list expression to rev of revset() (BC) Because revset() function generates a list of revisions, it seems sensible to switch the ctx as well where a list expression will be evaluated. I think "{revset(...) % "..."}" expression wasn't considered well when it was introduced at cda9d2b6beab.
Thu, 10 Sep 2015 23:32:36 +0900 fileset: handle error of string unescaping
Yuya Nishihara <yuya@tcha.org> [Thu, 10 Sep 2015 23:32:36 +0900] rev 26233
fileset: handle error of string unescaping
Thu, 10 Sep 2015 23:29:55 +0900 revset: handle error of string unescaping
Yuya Nishihara <yuya@tcha.org> [Thu, 10 Sep 2015 23:29:55 +0900] rev 26232
revset: handle error of string unescaping
Thu, 10 Sep 2015 23:25:10 +0900 parser: move unescape helper from templater
Yuya Nishihara <yuya@tcha.org> [Thu, 10 Sep 2015 23:25:10 +0900] rev 26231
parser: move unescape helper from templater revset and fileset have a similar problem, so let's make it a common helper function.
Thu, 10 Sep 2015 16:14:39 -0700 unionrepo: take delta base in account with building unified revlog
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 10 Sep 2015 16:14:39 -0700] rev 26230
unionrepo: take delta base in account with building unified revlog When general delta is enabled, the base is actually meaningful and should be used. With general delta is enabled, test-unionrepo.t crash without this fix.
Wed, 09 Sep 2015 22:27:48 -0400 extdiff: enable -I/-X with --patch
Matt Harbison <matt_harbison@yahoo.com> [Wed, 09 Sep 2015 22:27:48 -0400] rev 26229
extdiff: enable -I/-X with --patch Not sure how useful this really is, but it's trivial to add and ignoring the existing arguments supported seems like a bad UI.
Wed, 09 Sep 2015 21:07:38 -0400 extdiff: add a --patch argument for diffing changeset deltas
Matt Harbison <matt_harbison@yahoo.com> [Wed, 09 Sep 2015 21:07:38 -0400] rev 26228
extdiff: add a --patch argument for diffing changeset deltas One of the things I missed the most when transitioning from versioned MQ to evolve was the loss of being able to check that rebase conflicts were properly resolved by: $ hg ci --mq -m "before" $ hg rebase -s qbase -d tip $ hg bcompare --mq The old csets stay in the tree with evolve, but a straight diff includes all of the other changes that were pulled in, obscuring the code that was rebased. Diffing deltas can be confusing, but unless radical changes were made during the resolve, it is very clear when individual hunks are added, dropped or modified. Unlike the MQ technique, this can only compare a single pair of csets/patches at a time. Like the MQ method, this also highlights changes in the commit comment and other metadata. I originally tried monkey patching from the evolve extension, but that is too complicated given that it depends on the order the two different extensions are loaded. This functionality is also useful when comparing grafts however, so implementing it in the core is more than just convenience. The --change argument doesn't make much sense for this, but it isn't harmful so I didn't bother blocking it. The -I/-X options are ignored because of a limitation of cmdutil.export(). We'll fix that next.
Wed, 09 Sep 2015 20:48:09 -0400 extdiff: prepare sections of dodiff() for conditionalizing
Matt Harbison <matt_harbison@yahoo.com> [Wed, 09 Sep 2015 20:48:09 -0400] rev 26227
extdiff: prepare sections of dodiff() for conditionalizing This is purely indenting under an unconditional branch, so that the actual changes in the next patch are clear. Feel free to fold them if desired.
Fri, 11 Sep 2015 12:48:09 -0700 hgweb: drop unused import
Matt Mackall <mpm@selenic.com> [Fri, 11 Sep 2015 12:48:09 -0700] rev 26226
hgweb: drop unused import
Thu, 10 Sep 2015 13:45:00 -0400 help/config: back out 5f2a1ebd6e78
Augie Fackler <augie@google.com> [Thu, 10 Sep 2015 13:45:00 -0400] rev 26225
help/config: back out 5f2a1ebd6e78 This breaks building manpages, and by association breaks building debs. timeless has a fix coming, but it turns out we'll need to back out 5f2a1ebd6e78 anyway, so just back it out now to fix building packages.
Thu, 10 Sep 2015 09:41:11 -0400 filemerge: add non-interactive :merge-local and :merge-other
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Thu, 10 Sep 2015 09:41:11 -0400] rev 26224
filemerge: add non-interactive :merge-local and :merge-other There are two non-interactive internal merge tools, :other and :local, but they don't really merge, they just pick all changes from the local or other version of the file. In some situations, it is known that we want a merge and also know that all merge conflicts should be resolved in one direction. Although external merge tools can do this, sometimes it can be convenient to do so from within hg, without invoking a merge tool. These new :merge-local and :merge-other tools can do just that.
Wed, 12 Aug 2015 08:53:01 -0400 simplemerge: enable option to resolve conflicts one way
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 12 Aug 2015 08:53:01 -0400] rev 26223
simplemerge: enable option to resolve conflicts one way With this change, the simplemerge algorithm grows an option to only return the local or the other hunk in a conflicting region.
Wed, 26 Aug 2015 16:27:14 -0500 templater: add new docheader/footer components for XML (issue4135)
Matt Mackall <mpm@selenic.com> [Wed, 26 Aug 2015 16:27:14 -0500] rev 26222
templater: add new docheader/footer components for XML (issue4135) The existing header/footer components were templated per-changeset, and thus couldn't be correctly printed for an empty log
Thu, 10 Sep 2015 09:52:17 -0400 import-checker: use modern .endswith for multiple suffixes
Augie Fackler <augie@google.com> [Thu, 10 Sep 2015 09:52:17 -0400] rev 26221
import-checker: use modern .endswith for multiple suffixes Suggested by Anton Shestakov <engored@ya.ru> on the list. Thanks!
Sat, 22 Aug 2015 18:43:24 -0700 hgweb: use separate repo instances per thread
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 22 Aug 2015 18:43:24 -0700] rev 26220
hgweb: use separate repo instances per thread Before this change, multiple threads/requests could share a localrepository instance. This meant that all of localrepository needed to be thread safe. Many bugs have been reported telling us that localrepository isn't actually thread safe. While making localrepository thread safe is a noble cause, it is a lot of work. And there is little gain from doing so. Due to Python's GIL, only 1 thread may be processing Python code at a time. The benefits to multi-threaded servers are marginal. Thread safety would be a lot of work for little gain. So, we're not going to even attempt it. This patch establishes a pool of repos in hgweb. When a request arrives, we obtain the most recently used repository from the pool or create a new one if none is available. When the request has finished, we put that repo back in the pool. We start with a pool size of 1. For servers using a single thread, the pool will only ever be of size 1. For multi-threaded servers, the pool size will grow to the max number of simultaneous requests the server processes. No logic for pruning the pool has been implemented. We assume server operators either limit the number of threads to something they can handle or restart the Mercurial process after a certain amount of requests or time has passed.
(0) -10000 -3000 -1000 -300 -100 -50 -24 +24 +50 +100 +300 +1000 +3000 +10000 tip