Yuya Nishihara <yuya@tcha.org> [Sun, 21 Aug 2016 12:36:23 +0900] rev 29914
debugrevspec: deprecate --optimize option
This option has been superseded by '--show-stage NAME', and will cause
confusion in future patches.
Yuya Nishihara <yuya@tcha.org> [Sun, 21 Aug 2016 12:33:57 +0900] rev 29913
debugrevspec: add option to print parsed tree at given stages
"-p <stage>" is useful for investigating parsing stages. With -p option, a
transformed tree is printed no matter if it is changed or not, which allows
us to know valid stage names by "-p all".
Yuya Nishihara <yuya@tcha.org> [Sun, 21 Aug 2016 12:04:08 +0900] rev 29912
debugrevspec: transform and print parsed tree by stages
Prepares for adding new option to print transformed tree at each stage.
Yuya Nishihara <yuya@tcha.org> [Sun, 21 Aug 2016 11:50:54 +0900] rev 29911
debugrevspec: build parsed tree even if no --verbose specified
Prepares for evaluating unoptimized tree. The output is suppressed by
ui.note() anyway.
Maciej Fijalkowski <fijall@gmail.com> [Thu, 08 Sep 2016 10:37:58 +0200] rev 29910
osutil: fix the declaration to work on different sizes of off_t
Durham Goode <durham@fb.com> [Wed, 31 Aug 2016 12:46:53 -0700] rev 29909
manifest: change manifestctx to not inherit from manifestdict
If manifestctx inherits from manifestdict, it requires some weird logic to
lazily load the dict if a piece of information is asked for. This ended up being
complicated and unintuitive to use.
Let's move the dict creation to .read(). This will make even more sense once we
start adding readdelta() and other similar methods to manifestctx.
Durham Goode <durham@fb.com> [Mon, 29 Aug 2016 18:02:09 -0700] rev 29908
manifest: make uses of _mancache aware of contexts
In a future patch we will change manifestctx and treemanifestctx to no longer
derive from manifestdict and treemanifest, respectively. This means that
consumers of the _mancache will now need to be aware of the different between
the two, until we get rid of the manifest entirely and the _mancache becomes
only filled with ctxs.
Durham Goode <durham@fb.com> [Wed, 31 Aug 2016 13:29:49 -0700] rev 29907
manifest: add treemanifestctx class
Before we start using repo.manifestlog in the rest of the code base, we need to
make sure that it's capable of returning treemanifests. As we add new
functionality to manifestctx, we'll add it to treemanifestctx at the same time.
We also comment out the manifestctx p1, p2, and linkrev fields for now, since
we're not implementing them on treemanifest yet.
Yuya Nishihara <yuya@tcha.org> [Sun, 21 Aug 2016 11:37:00 +0900] rev 29906
revset: add public function to create matcher from evaluatable tree
"hg debugrevspec" will use it to evaluate unoptimized tree.
Yuya Nishihara <yuya@tcha.org> [Sun, 21 Aug 2016 11:29:57 +0900] rev 29905
revset: make analyze() a separate step from optimize()
This will allow us to evaluate unoptimized tree and compare the result with
optimized one.
The private _analyze() function isn't renamed since I'll add more parameters
to it.
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Aug 2016 14:35:03 +0900] rev 29904
revset: extract tree transformation from optimize()
This patch separates the simple tree transformation from the optimization step,
which is called as _analyze() since I'll extend this function to infer ordering
flags. I want to avoid making _optimize() more complicated.
This will also allow us to evaluate unoptimized tree.
Yuya Nishihara <yuya@tcha.org> [Sun, 04 Sep 2016 17:19:44 +0900] rev 29903
hghave: fix has_bzr() to not try to import RevisionSpec as module
Since RevisionSpec isn't a module, "import bzrlib.revisionspec.RevisionSpec"
would always raise ImportError.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 22 Aug 2016 14:44:14 +0200] rev 29902
update: label bookmark name in message
We label bookmark name as such in various messages. This will help them to
standout (or at least give the user the option to make them stand out). We use a
distinct label for the 'active' bookmark, this can help users to catch bookmark
operation affecting their working copy.
Ryan McElroy <rmcelroy@fb.com> [Tue, 06 Sep 2016 09:43:25 -0700] rev 29901
discovery: explicitly check for None in outgoing init
f09d0004481c introduced default params for discovery.outgoing(), but it used a
falsy check instead of an explicit check for None. The result is that callers
that passed in an empty list would have that list overridden by the defaults,
which is not the expected behavior.
This was discovered by changes to the test-pushrebase.t test in Facebook's
repository of mercurial extensions.
liscju <piotr.listkiewicz@gmail.com> [Fri, 26 Aug 2016 12:48:20 +0200] rev 29900
import: report directory-relative paths in error messages (
issue5224)
Import uses paths relative to the root of the repository, so when
user imports patch with paths relative to the current working directory
import aborts with 'unable to find file for patching'.
This patch improves this situation by warning the user that paths are
relative to the root of repository when patching fails.
Hannes Oldenburg <hannes.christian.oldenburg@gmail.com> [Mon, 05 Sep 2016 08:29:36 +0000] rev 29899
commands: remove unecessary copying of list in graft()
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Aug 2016 16:36:08 +0900] rev 29898
revset: do not partial-match operator and function names in optimize()
It was error-prone, and actually there was a typo, s/ancestorspec/ancestor/.
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Aug 2016 14:13:27 +0900] rev 29897
revset: remove false condition to process 'negate' operator
'negate' is mapped to 'string' at the above clause.
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Aug 2016 15:01:42 +0900] rev 29896
revset: make optimize() reject unknown operators
This should have caught the bug of 'keyvalue' operator fixed at
5004ef47f437.
The catch-all pattern is useless since optimize() should be aware of all known
operators.
liscju <piotr.listkiewicz@gmail.com> [Thu, 01 Sep 2016 22:06:42 +0200] rev 29895
help: show content for explicitly disabled extension (
issue5228)
liscju <piotr.listkiewicz@gmail.com> [Fri, 02 Sep 2016 10:18:56 +0200] rev 29894
obsolete: fix minor module documentation issues
Yuya Nishihara <yuya@tcha.org> [Fri, 26 Aug 2016 23:31:17 +0900] rev 29893
debugextensions: hide "ships-with-hg-core" magic string (BC)
Since we have "bundled" flag, we no longer need to rephrase "ships-with-hg-core"
to show as "internal".
Yuya Nishihara <yuya@tcha.org> [Wed, 31 Aug 2016 23:22:07 +0900] rev 29892
debugextensions: show ships-with-hg-core state as a separate field
This is less magical than rephrasing ships-with-hg-core as internal, and
we can distinguish "internal" liar. "tested with: internal" will be hidden
by the next patch.
Yuya Nishihara <yuya@tcha.org> [Wed, 31 Aug 2016 23:36:37 +0900] rev 29891
test-debugextensions: add dummy extension to make ifcontains() test more solid
If testedwith were a string, ifcontains("3.2", testedwith) would match "3.2.1".
New test added to cover that.
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Sep 2016 02:29:46 +0530] rev 29890
py3: remove use of *L syntax
The int in Python 3 behaves as long so no need of L's in py3.
Moreover we dont need long here.
Martin von Zweigbergk <martinvonz@google.com> [Tue, 30 Aug 2016 09:22:53 -0700] rev 29889
util: rename checkcase() to fscasesensitive() (API)
I always read the name "checkcase(path)" as "do we need to check for
case folding at this path", but it's actually (I think) meant to be
read "check if the file system cares about case at this path". I'm
clearly not the only one confused by this as the dirstate has this
property:
def _checkcase(self):
return not util.checkcase(self._join('.hg'))
Maybe we should even inverse the function and call it fscasefolding()
since that's what all callers care about?
Durham Goode <durham@fb.com> [Mon, 29 Aug 2016 17:48:14 -0700] rev 29888
manifest: call m1.load and m2.load before writing a subtree
As part of refactoring the manifest, certain test cases started failing because
writesubtrees was called with p1 and p2 manifests that had not been loaded (so
accessing m1._dirs resulted in an empty set). Let's call _load on these before
attempting to access _dirs.
This was caught by tests when future patches were applied.
Augie Fackler <augie@google.com> [Tue, 30 Aug 2016 13:13:50 -0400] rev 29887
histedit: correct output of error when 'base' is from the edit list
This was made more obvious by marmoute's recent rearrangement of this code.
Augie Fackler <augie@google.com> [Tue, 30 Aug 2016 13:33:48 -0400] rev 29886
py3: split check of pygments-using files from the rest of the tree
If we don't do this, people without pygments installed in their Python
3 environment silently stop checking test-check-py3-compat, which
isn't really what we wanted. This preserves stability of the test
output while still letting anyone with a recent-enough Python 3 run
the majority of the Python 3 compat checking test.
Yuya Nishihara <yuya@tcha.org> [Fri, 26 Aug 2016 23:38:52 +0900] rev 29885
version: change "place" field of extension to "bundled" flag
The name "place" sounds odd. We can simply expose raw boolean values instead
of switching external/internal literals.
Yuya Nishihara <yuya@tcha.org> [Sat, 27 Aug 2016 00:00:28 +0900] rev 29884
extensions: use ismoduleinternal() thoroughly
"ships-with-hg-core" would be long enough to typo.
Mark Ignacio <mignacio@fb.com> [Tue, 30 Aug 2016 09:25:00 -0700] rev 29883
lock: show more detail for new-style locks in lock waiting message (
issue4752)
Improve the lock waiting warning message by explicitly saying that a host and
process are holding the lock. This nudges confused new users in the direction
of investigating the other process instead of removing the lock.
Yuya Nishihara <yuya@tcha.org> [Mon, 29 Aug 2016 00:00:05 +0900] rev 29882
formatter: add context manager interface for convenience
And port "hg files" to test it.
As you can see, extra indent is necessary to port to this API. I don't think
we should switch every fm.formatter() call to "with" statement.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 21:06:31 +0200] rev 29881
histedit: remove now unused 'constraints' related code
Now that the one action that need different logic handle that using inheritance
and overriding, we can remove that code.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 21:00:33 +0200] rev 29880
histedt: use inheritance to override the constraints in 'base'
All actions but one actually have the same constraints when it comes to validate
the 'action.node' value. So we actually just add this code to a method that can
be overwritten in the one action where it matters.
The now unused 'contraints' related enum and class attribute will be cleaned up
in the next changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 20:54:52 +0200] rev 29879
histedit: move constraint verification to the 'action.verify' method
Action has a method dedicated to verifying its validity. So we move code
related to constrains into that method. This requires a bit more context to the
'verify' method in the same fashion we were passing the 'prev' argument.
This is an extra step before we can simplify the constraint handling code
further.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 20:54:32 +0200] rev 29878
histedit: directly use node in 'verifyactions'
It does not seem useful to convert to hex: it is an extra step and they are
longer strings. So we stick to node for the logic. We only convert to short hex
for error when needed. As a nice side effect this remove the explicit constant
usage in'[12:]'. This will also help moving the code around later as we just
have to access action.node.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 20:42:18 +0200] rev 29877
histedit: temporarily shorten name of 'constraints' variable
An upcoming changeset will make the line where this variable is used
slightly too long. Other later changesets will clean that up further and makes
the variable unnecessary, so this is only temporary and it does seems useful to
put anything more complicate in place.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 20:38:37 +0200] rev 29876
histedit: drop the 'nodetoverify' local variable
We can just use 'action.node'.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 20:34:58 +0200] rev 29875
histedit: make 'constraints' a class attribute instead of a method
There does not seem to be a reason for this to be a method. So we initialise
the class attribute once and for all at creation time and drop the instance
method.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 20:31:33 +0200] rev 29874
histedit: drop the 'nodetoverify' method
That method is just returning self.node and is never overridden. We just use
the attribute directly instead and get rid of the method.
This is the beginning of series to simplify and unify verification of constraints
for actions.
Yuya Nishihara <yuya@tcha.org> [Mon, 29 Aug 2016 22:59:39 +0900] rev 29873
test-gpg: start gpg-agent by gpg-connect-agent only if GnuPG v2.1+ detected
Danek Duvall found that gpg-connect-agent of GnuPG 2.0 never starts gpg-agent
daemon. The 2.1 way is documented as "gpg-coonect-agent /bye" [1], which
appears to be different from the 2.0 way [2].
[1]: https://www.gnupg.org/documentation/manuals/gnupg/Invoking-GPG_002dAGENT.html
[2]: https://www.gnupg.org/documentation/manuals/gnupg-2.0/Invoking-GPG_002dAGENT.html
Since "gpg-agent --daemon" of GnuPG 2.1 never prints environment variables,
"eval $(gpg-agent --daemon)" would be valid only for GnuPG < 2.1, and we'll
need a different workaround for 2.0. I have no 2.0 environment, I won't
implement it.
timeless <timeless@mozdev.org> [Fri, 26 Aug 2016 00:16:51 +0000] rev 29872
rebase: properly calculate total commits to rebase (
issue5347)
Before this, predecessor commits were being included in the count
Maciej Fijalkowski <fijall@gmail.com> [Sun, 28 Aug 2016 17:51:32 -0700] rev 29871
mpatch: add setup_mpatch_cffi.py
This file got dropped when the corresponding setup.py changes were
made.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 24 Aug 2016 03:59:19 +0200] rev 29870
journal: rename on disk files to 'namejournal'
The 'journal' naming is already used by the transaction journal. Having an
unrelated group of file with such a close naming is confusing and error prone.
We rename the file used by the 'journal' extension to use 'namejournal' as the
extension track the location of various 'names'.
timeless <timeless@mozdev.org> [Thu, 25 Aug 2016 23:13:36 +0000] rev 29869
tests: guard demandimport segment of test-extension.t
timeless <timeless@mozdev.org> [Thu, 25 Aug 2016 22:03:51 +0000] rev 29868
tests: skip demandimport if disabled
demandimport and setuptools and decorator (from ironpython) and
pygments leads to lots of fail.
If demandimport is disabled we should skip testing it...
timeless <timeless@mozdev.org> [Thu, 25 Aug 2016 22:30:35 +0000] rev 29867
hghave: add demandimport checking
timeless <timeless@mozdev.org> [Thu, 25 Aug 2016 22:51:39 +0000] rev 29866
hghave: make bzr checks stricter
My bzr does not have bzrlib.revisionspec.RevisionSpec,
and thus tests were failing because convert refused to believe in bzr,
but hghave without this change thought it was available.
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 22 Aug 2016 19:50:21 -0700] rev 29865
help: document wire protocol commands
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 22 Aug 2016 19:49:59 -0700] rev 29864
help: document wire protocol "handshake" protocol
There isn't a formal handshake protocol in the wire protocol. But
clients almost certainly need to perform particular actions before they
can communicate with a server optimally. So document what that is
so people understand what's going on at connection establishment time.
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 22 Aug 2016 19:48:31 -0700] rev 29863
help: document wire protocol capabilities
All capabilities from the history of the project are now documented.
timeless <timeless@mozdev.org> [Fri, 02 Sep 2016 20:15:37 +0000] rev 29862
crecord: properly handle files with No newline at eof (
issue5268)
Yes, this bug was a single character with the wrong case...
Jun Wu <quark@fb.com> [Fri, 02 Sep 2016 15:20:59 +0100] rev 29861
annotate: pre-calculate the "needed" dictionary (
issue5360)
The "needed" dict is used as a reference counter to free items in the giant
"hist" dict. However, currently it is not very accurate and can lead to
dropping "hist" items unnecessarily, for example, with the following DAG,
-3-
/ \
0--1--2--4--
The current algorithm will visit and calculate rev 1 twice, undesired. And
it tries to be smart by clearing rev 1's parents: "pcache[1] = []" at the
time hist[1] being accessed (note: hist[1] needs to be used twice, by rev 2
and rev 3). It can result in incorrect results if p1 of rev 4 deletes chunks
belonging to rev 0.
However, simply removing "needed" is not okay, because it will consume 10x
memory:
# without any change
% HGRCPATH= lrun ./hg annotate mercurial/commands.py -r d130a38 3>&2 [1]
MEMORY
49074176
CPUTIME 9.213
REALTIME 9.270
# with "needed" removed
MEMORY
637673472
CPUTIME 8.164
REALTIME 8.249
This patch moves "needed" (and "pcache") calculation to a separate DFS to
address the issue. It improves perf and fixes
issue5360 by correctly reusing
hist, while maintaining low memory usage. Some additional attempt has been
made to further reduce memory usage, like changing "pcache[f] = []" to "del
pcache[f]". Therefore the result can be both faster and lower memory usage:
# with this patch applied
MEMORY
47575040
CPUTIME 7.870
REALTIME 7.926
[1]: lrun is a lightweight sandbox built on Linux cgroup and namespace. It's
used to measure CPU and memory usage here. Source code is available at
github.com/quark-zju/lrun.
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 22 Aug 2016 19:47:34 -0700] rev 29860
help: document wire protocol transport protocols
The HTTP and SSH transport protocols are documented. This
includes how commands and arguments are serialized as well as
response types.
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 22 Aug 2016 19:46:39 -0700] rev 29859
help: internals topic for wire protocol
The Mercurial wire protocol is under-documented. This includes a lack
of source docstrings and comments as well as pages on the official
wiki.
This patch adds the beginnings of "internals" documentation on the
wire protocol.
The documentation should have nearly complete coverage on the
lower-level parts of the protocol, such as the different transport
mechanims, how commands and arguments are sent, capabilities, and,
of course, the commands themselves.
As part of writing this documentation, I discovered a number of
deficiencies in the protocol and bugs in the implementation. I've
started sending patches for some of the issues. I hope to send a lot
more.
This patch starts with the scaffolding for a new internals page.
Yuya Nishihara <yuya@tcha.org> [Thu, 18 Aug 2016 15:13:56 +0900] rev 29858
grep: add formatter support
Several fields are renamed to be consistent with the annotate command, which
doesn't mean the last call for the name unification [1]. Actually, I'd rather
rename line_number to linenumber, linenum, lineno or line, but I want to
port the grep command to formatter first.
[1]: https://www.mercurial-scm.org/wiki/GenericTemplatingPlan#Dictionary
I don't have any better name for the list of matched/unmatched texts, so
they are just called as "texts".
Yuya Nishihara <yuya@tcha.org> [Thu, 18 Aug 2016 14:52:06 +0900] rev 29857
grep: build list of all columns regardless of display options
These columns should always be available in JSON or template outputs. The
"change" column is excluded because it has no useful data unless --all is
specified.
Yuya Nishihara <yuya@tcha.org> [Thu, 18 Aug 2016 14:23:29 +0900] rev 29856
grep: build list of columns without "grep." label prefix
Prepares for formatter support. We need field names without "grep.".
Yuya Nishihara <yuya@tcha.org> [Thu, 18 Aug 2016 14:09:49 +0900] rev 29855
grep: factor out function that prints matched line with labels
Prepares for formatter support.
Yuya Nishihara <yuya@tcha.org> [Thu, 18 Aug 2016 14:03:25 +0900] rev 29854
grep: refactor loop that yields matched text with label
As preparation for formatter support, this and the next patch split
linestate.__iter__() into two functions, line scanner and displayer.
New code uses regexp.search(str, pos) in place of regexp.search(substr),
which appears to fix a bug of highlighting.
Kevin Bullock <kbullock@ringworld.org> [Thu, 01 Sep 2016 14:01:43 -0500] rev 29853
Added signature for changeset
ccd436f7db6d
Kevin Bullock <kbullock@ringworld.org> [Thu, 01 Sep 2016 14:01:37 -0500] rev 29852
Added tag 3.9.1 for changeset
ccd436f7db6d
Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp> [Thu, 01 Sep 2016 13:16:55 -0500] rev 29851
bundle2: localize handleoutput remote prompts
Code archaeology suggests that there was no good reason for this not to
be localized. 'remote: ' is already localized elsewhere.