Gregory Szorc <gregory.szorc@gmail.com> [Fri, 08 Jan 2016 10:57:01 -0800] rev 27737
exchange: make clonebundleprefers non-experimental
In preparation for making the feature enabled by default.
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 08 Jan 2016 10:53:07 -0800] rev 27736
clonebundles: remove advertisement of feature
I screwed up.
When clone bundles is enabled on the server and a compatible client
without the feature enabled clones, the server sends down an
advertisement saying to enable the feature. The server creates the
message which is printed verbatim on the client as an "output" part.
There are 2 problems:
1) The message doesn't respect the client's localization
2) The message contains a reference to the "experimental.clonebundles"
option.
Since clone bundles is about to be marked as non-experimental and the
goal of the advertisement was to encourage clients to test the
experimental feature, let's just remove the broken advertisement since
it no longer serves a purpose.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Jan 2016 21:14:08 -0800] rev 27735
changegroup: remove now-unused 'wasempty' variable and parameter
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Jan 2016 21:13:06 -0800] rev 27734
treemanifests: set bundle2 part parameter indicating treemanifest
By adding a mandatory 'treemanifest' parameter in the bundle2 part, we
make it possible for the recipient to set repo requirements before the
manifest revlog is accessed.
timeless <timeless@mozdev.org> [Wed, 06 Jan 2016 20:05:18 +0000] rev 27733
docchecker: scan for missing space before :hg:
timeless <timeless@mozdev.org> [Wed, 06 Jan 2016 19:57:29 +0000] rev 27732
tests: run docchecker in gendoc.t
timeless <timeless@mozdev.org> [Wed, 06 Jan 2016 19:49:53 +0000] rev 27731
tests: move gendoc.t runrst comment next to runrst
timeless <timeless@mozdev.org> [Wed, 06 Jan 2016 19:47:14 +0000] rev 27730
docchecker: introduce a way to check for poor markup
Specifically, :hg:`foo 'bar baz'` when rendered by `hg help`
results in:
'hg foo 'bar baz''
... which is hard to read.
We encourage :hg:`foo "bar baz"` instead.
timeless <timeless@mozdev.org> [Tue, 12 Jan 2016 06:03:36 +0000] rev 27729
minirst: change hgrole to use single quotes
We decided to reserve double quotes for arguments to hg because cmd
does not like single quotes, so switch the outer quotes to single
Yuya Nishihara <yuya@tcha.org> [Sun, 13 Dec 2015 22:09:57 +0900] rev 27728
paths: port to generic templater
Embedded passwords are masked only in plain output because we'll want raw
values in machine-readable format such as JSON. For custom template, we can
add a filter to mask passwords (e.g. "{url|hidepassword}").
path.rawloc field is called as "url" than "path" because we have "pushurl"
sub-option. Also, "name" and "url" are not allowed as sub-options as they
conflict with the field names.
Yuya Nishihara <yuya@tcha.org> [Sun, 13 Dec 2015 23:01:19 +0900] rev 27727
paths: merge conditions that select visibility of fields
Truth table (extracted from the original implementation):
search quiet name path subopt
------ ----- ---- ---- ------
f f T T T
f T T f f
T f f T f
T T f f f
Yuya Nishihara <yuya@tcha.org> [Sun, 13 Dec 2015 22:02:32 +0900] rev 27726
paths: use single loop for both search=None|pattern cases
This will help porting to the formatter API. This patch adds test for empty
pathitems to make sure "hg paths" never say "not found!".
Yuya Nishihara <yuya@tcha.org> [Sun, 13 Dec 2015 21:55:57 +0900] rev 27725
paths: reorder else clause for readability of subsequent patches
This prepares for porting to the formatter API. Future patches will use a
single loop to handle both search=None|pattern cases because formatter output
should be the same. "pathitems" will be switched instead.
Yuya Nishihara <yuya@tcha.org> [Sun, 13 Dec 2015 21:54:00 +0900] rev 27724
paths: drop ui.status label from output of "hg paths name"
We just need to not print path if --quiet. ui.status label is unwanted.
Sean Farley <sean@farley.io> [Wed, 06 Jan 2016 11:01:55 -0800] rev 27723
unionrepo: fix wrong rev being checked in iscensored (
issue5024)
Matt Harbison <matt_harbison@yahoo.com> [Mon, 11 Jan 2016 21:00:29 -0500] rev 27722
summary: print unstable, bumped and divergent as unconditionally plural
This aligns with the unconditional plural output for the update line contents,
as well as the incoming/outgoing bookmarks line. It also matches the message
in evolve's summary hook as of
4f83b2d2d20d. (Though I thought this was removed
recently?)
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 11 Jan 2016 18:16:38 -0800] rev 27721
debugshell: disable demand importer when importing debugger
For reasons I can't explain (but likely have something to do with a
combination of __import__ inferring default values for arguments and
the demand importer mechanism further assuming defaults), the demand
importer isn't playing well with IPython. Without this patch, we get
a failure "ValueError: Attempted relative import in non-package" when
attempting to import "IPython." The stack has numerous demandimport
calls on it and adding "IPython" to the exclude list in demandimport
isn't enough to make the problem go away, which means the issue is
likely somewhere in the bowells of IPython. It's easier to just disable
the demand importer when importing the debugger.
Martin von Zweigbergk <martinvonz@google.com> [Mon, 04 Jan 2016 10:13:29 -0800] rev 27720
status: change + back out == clean (API)
After backing out a change, so the file contents is equal to a
previous revision of itself, we currently report the status between
the two equal revisions as modified. This is because
context._buildstatus() reports any file whose new nodeid is not equal
to _newnode as modified. That magic nodeid is given only to files
added or modified in the working directory, so any file whose nodeid
has changed between two revisions will be reported as modified.
Fix by simply comparing the file contents for all cases where the
nodeid changed, whether they are in the working copy or committed.
Marking with (API) as it subtly changes the semantics of the method.
Martin von Zweigbergk <martinvonz@google.com> [Sat, 09 Jan 2016 22:58:10 -0800] rev 27719
convert: use manifest.diff() instead of ctx.status()
mercurial_source.getchanges() seems to care about files whose nodeid
has changed even if their contents has not (i.e. it has been
reverted/backed out). The method uses ctx1.status(ctx2) to find
differencing files. However, that method is currently broken and
reports reverted changes as modified. In order to fix that method, we
first need to rewrite getchanges() using manifest.diff(), which does
report reverted files as modified (because it's about differences in
the manifest, so about nodeids).
Martin von Zweigbergk <martinvonz@google.com> [Sun, 10 Jan 2016 21:07:34 -0800] rev 27718
convert: replace cache of (m,a,r) by (ma,r)
The next commit will rewrite the way we find changes between two
manifests. By making the cache not care about the difference between
added and modified files, we don't require the rewritten code to care
about that difference either. Also extract the call to ctx.status() to
simplify the next commit.
Martin von Zweigbergk <martinvonz@google.com> [Sat, 09 Jan 2016 21:42:48 -0800] rev 27717
convert: use _ prefix for private methods in hg sink
This makes it clearer which methods are part of the interface defined
by the superclass.
timeless <timeless@mozdev.org> [Wed, 06 Jan 2016 17:18:18 +0000] rev 27716
children: update help with replacement
timeless <timeless@mozdev.org> [Wed, 06 Jan 2016 17:17:49 +0000] rev 27715
graphlog: update help with replacement
timeless <timeless@mozdev.org> [Wed, 23 Dec 2015 06:36:47 +0000] rev 27714
histedit: clarify modes
also fix terse command syntax
timeless <timeless@mozdev.org> [Tue, 22 Dec 2015 23:21:53 +0000] rev 27713
histedit: explain basics of histedit commands
This should be hooked into @action via an extended
help argument, but that is future work.
timeless <timeless@mozdev.org> [Wed, 23 Dec 2015 07:37:45 +0000] rev 27712
histedit: report the unacceptable changeset
Mike Hommey <mh@glandium.org> [Mon, 11 Jan 2016 22:00:07 -0500] rev 27711
mdiff: don't emit a diff header for empty trivial deltas
An empty trivial delta, coded as (0, 0, 0) makes the delta application
do nothing, but still takes 12 bytes, while skipping it altogether works
as much, without taking any space at all.
Bryan O'Sullivan <bos@serpentine.com> [Mon, 11 Jan 2016 09:49:48 -0800] rev 27710
commands: get rid of empty try/finally block from _dograft
This diff is purely an indentation change to clean up a block that
was kept in place to make
77995317b374 easier to read.
Bryan O'Sullivan <bos@serpentine.com> [Mon, 11 Jan 2016 09:49:47 -0800] rev 27709
commands: get rid of empty try/finally block from _dobackout
This diff is purely an indentation change to clean up a block that
was kept in place to make
c7217f1458bf easier to read.
Bryan O'Sullivan <bos@serpentine.com> [Mon, 11 Jan 2016 09:49:39 -0800] rev 27708
commands: get rid of empty try/finally block from import_
This diff is purely an indentation change to clean up a block that
was kept in place to make
713b09fc9fbb easier to read.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Jan 2016 15:09:58 -0800] rev 27707
streamclone: use context manager for writing files
These are the file writes that have the most to gain from background
I/O. Plug in a context manager so I can design the background I/O
mechanism with context managers in mind.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Jan 2016 15:19:47 -0800] rev 27706
scmutil: use context managers for file handles
Now that we dropped support for Python 2.4, we are able to use context
managers. Let's replace the try..finally pattern in scmutil.py with
context managers, which close files automatically when the context
manager is exited.
There should be no change in behavior with this patch.
Why convert to context managers if nothing is broken? I'm working on
closing file handles in background threads to improve performance on
Windows. As part of this, I realized there could be some future issues
if the background file closing code isn't designed with context
managers in mind. So, I'd like to switch some code to context managers
so I can design an API that works with context managers.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Jan 2016 15:33:01 -0800] rev 27705
statichttprepo: implement __enter__ and __exit__ on httprangeheader
httprangeheader behaves like a file object. Implement __enter__ and
__exit__ so it can be used as a context manager, just like file objects.
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.
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.
timeless <timeless@mozdev.org> [Mon, 11 Jan 2016 23:13:34 +0000] rev 27702
hghave: support HGMODULEPOLICY for pure
HGMODULEPOLICY was introduced in
4374d819ccd5
Matt Mackall <mpm@selenic.com> [Mon, 11 Jan 2016 14:27:12 -0600] rev 27701
merge with stable
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.
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.
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.
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.
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.
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.
timeless <timeless@mozdev.org> [Tue, 05 Jan 2016 22:23:27 +0000] rev 27694
shelve: hook afterresolvedstates
Matt Mackall <mpm@selenic.com> [Fri, 08 Jan 2016 12:35:02 -0600] rev 27693
check-code: allow only-whitespace lines in tests
These turn out to be necessary to embed diffs with blank lines in test
input. So we now complain about whitespace following a character.
Matt Mackall <mpm@selenic.com> [Thu, 10 Dec 2015 12:56:23 -0600] rev 27692
check-commit: try to curb bad commit summary keywords
The goal of commit summary keywords is to help us sort, categorize,
and filter our voluminous commits for our release notes in a way
that's helpful and meaningful to end users. Lately, there have been a
huge number of "keywords" that are neither words nor particularly key.
This patch tries to discourage that by narrowing the allowed
characters to alphanumeric. In particular, it doesn't allow "."
(method, function names, and file extensions) and "/" (filenames). It
also gives a short reminder of what a keyword ought to be.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Jan 2016 14:47:02 -0800] rev 27691
changegroup: don't add a second trailing '/' in dir name
The paths given from treemanifest.dir() already contains the trailing
slash.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Jan 2016 14:33:13 -0800] rev 27690
changegroup: remove left-over debugging help