Sat, 02 Jan 2016 16:41:57 -0800 osutil: implement __enter__ and __exit__ on posixfile
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Jan 2016 16:41:57 -0800] rev 27704
osutil: implement __enter__ and __exit__ on posixfile So they can be used as context managers.
Mon, 11 Jan 2016 15:25:43 -0800 util: introduce ctxmanager, to avoid nested try/finally blocks
Bryan O'Sullivan <bos@serpentine.com> [Mon, 11 Jan 2016 15:25:43 -0800] rev 27703
util: introduce ctxmanager, to avoid nested try/finally blocks This is similar in spirit to contextlib.nested in Python <= 2.6, but uses an extra level of indirection to avoid its inability to clean up if an __enter__ method raises an exception. Why add this mechanism? It greatly simplifies scoped resource management, and lets us eliminate several hundred lines of try/finally blocks. In many of these cases the "finally" is separated from the "try" by hundreds of lines of code, which makes the connection between resource acquisition and disposal difficult to follow. (The preferred mechanism would be the "multi-with" syntax of 2.7+, but Mercurial can't move to 2.7 for a while.) Intended use: >>> with ctxmanager(lambda: file('foo'), lambda: file('bar')) as c: >>> f1, f2 = c() This will open both foo and bar when c() is invoked, and will close both upon exit from the block. If the attempt to open bar raises an exception, the block will not be entered - but foo will still be closed.
Mon, 11 Jan 2016 23:13:34 +0000 hghave: support HGMODULEPOLICY for pure
timeless <timeless@mozdev.org> [Mon, 11 Jan 2016 23:13:34 +0000] rev 27702
hghave: support HGMODULEPOLICY for pure HGMODULEPOLICY was introduced in 4374d819ccd5
Mon, 11 Jan 2016 14:27:12 -0600 merge with stable
Matt Mackall <mpm@selenic.com> [Mon, 11 Jan 2016 14:27:12 -0600] rev 27701
merge with stable
Fri, 08 Jan 2016 12:07:15 -0600 tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com> [Fri, 08 Jan 2016 12:07:15 -0600] rev 27700
tests: extend check-commit self-tests This now contains both positive and negative tests for almost all the check-commit rules.
Thu, 07 Jan 2016 14:57:57 -0600 encoding: handle UTF-16 internal limit with fromutf8b (issue5031)
Matt Mackall <mpm@selenic.com> [Thu, 07 Jan 2016 14:57:57 -0600] rev 27699
encoding: handle UTF-16 internal limit with fromutf8b (issue5031) Default builds of Python have a Unicode type that isn't actually full Unicode but UTF-16, which encodes non-BMP codepoints to a pair of BMP codepoints with surrogate escaping. Since our UTF-8b hack escaping uses a plane that overlaps with the UTF-16 escaping system, this gets extra complicated. In addition, unichr() for codepoints greater than U+FFFF may not work either. This changes the code to reuse getutf8char to walk the byte string, so we only rely on Python for unpacking our U+DCxx characters.
Wed, 11 Nov 2015 21:18:02 -0500 bmstore: add handling of the active bookmark
Augie Fackler <augie@google.com> [Wed, 11 Nov 2015 21:18:02 -0500] rev 27698
bmstore: add handling of the active bookmark This further centralizes the handling of bookmark storage, and will help get some lingering bookmarks business out of localrepo. Right now, this change implies reading of the active bookmark to also imply reading all bookmarks from disk - for users with many many bookmarks this may be a measurable performance hit. In that case, we should migrate bmstore to be able to lazy-read its properties from disk rather than having to eagerly read them, but I decided to avoid doing that to try and avoid some potentially complicated filecache decorator issues. This doesn't move the logic for writing the active bookmark into a transaction, though that is probably the correct next step. Since the API probably needs to morph a little more, I didn't bother marking bookmarks.{activate,deactivate} as deprecated yet.
Thu, 07 Jan 2016 20:02:47 -0800 patchbomb: treat empty address list as no addresses
Bryan O'Sullivan <bos@serpentine.com> [Thu, 07 Jan 2016 20:02:47 -0800] rev 27697
patchbomb: treat empty address list as no addresses Previously it wasn't possible to use configuration to avoid being prompted for e.g. a CC list when using patchbomb to send emails. We now make it possible to supply an empty value.
Thu, 07 Jan 2016 19:45:03 -0800 config: add hasconfig method and supporting plumbing
Bryan O'Sullivan <bos@serpentine.com> [Thu, 07 Jan 2016 19:45:03 -0800] rev 27696
config: add hasconfig method and supporting plumbing We add the hasconfig method to make it possible to distinguish between a config value that was never supplied and one that is empty.
Tue, 05 Jan 2016 21:25:51 -0800 verify: replace "output parameters" by return values
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Jan 2016 21:25:51 -0800] rev 27695
verify: replace "output parameters" by return values _verifychangelog() and _verifymanifest() accept dictionaries that they populate. We pass in empty dictionaries, so it's clearer to create them in the functions and return them.
(0) -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip