Commit Graph

29657 Commits

Author SHA1 Message Date
liscju
3f71c6cdfa help: show content for explicitly disabled extension (issue5228) 2016-09-01 22:06:42 +02:00
liscju
338add4253 obsolete: fix minor module documentation issues 2016-09-02 10:18:56 +02:00
Yuya Nishihara
fd192b732a 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".
2016-08-26 23:31:17 +09:00
Yuya Nishihara
1e5148d260 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.
2016-08-31 23:22:07 +09:00
Yuya Nishihara
10ae6ca778 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.
2016-08-31 23:36:37 +09:00
Pulkit Goyal
8b4f697218 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.
2016-09-01 02:29:46 +05:30
Martin von Zweigbergk
2fbf01764c 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?
2016-08-30 09:22:53 -07:00
Durham Goode
133c1fe33e 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.
2016-08-29 17:48:14 -07:00
Augie Fackler
24579e9893 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.
2016-08-30 13:13:50 -04:00
Augie Fackler
79ea2f0a0b 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.
2016-08-30 13:33:48 -04:00
Yuya Nishihara
9695a817e8 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.
2016-08-26 23:38:52 +09:00
Yuya Nishihara
228026b4ee extensions: use ismoduleinternal() thoroughly
"ships-with-hg-core" would be long enough to typo.
2016-08-27 00:00:28 +09:00
Mark Ignacio
1ca1a521d4 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.
2016-08-30 09:25:00 -07:00
Yuya Nishihara
e42d0fb100 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.
2016-08-29 00:00:05 +09:00
Pierre-Yves David
b9ebcea85e 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.
2016-08-26 21:06:31 +02:00
Pierre-Yves David
d2bccef0ce 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.
2016-08-26 21:00:33 +02:00
Pierre-Yves David
e83d8435c9 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.
2016-08-26 20:54:52 +02:00
Pierre-Yves David
c056fb41dc 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.
2016-08-26 20:54:32 +02:00
Pierre-Yves David
58fa162d21 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.
2016-08-26 20:42:18 +02:00
Pierre-Yves David
5dfe266b33 histedit: drop the 'nodetoverify' local variable
We can just use 'action.node'.
2016-08-26 20:38:37 +02:00
Pierre-Yves David
f113c210a5 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.
2016-08-26 20:34:58 +02:00
Pierre-Yves David
d390c8d401 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.
2016-08-26 20:31:33 +02:00
Yuya Nishihara
64a2940225 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.
2016-08-29 22:59:39 +09:00
timeless
faab59b629 rebase: properly calculate total commits to rebase (issue5347)
Before this, predecessor commits were being included in the count
2016-08-26 00:16:51 +00:00
Maciej Fijalkowski
b115657a10 mpatch: add setup_mpatch_cffi.py
This file got dropped when the corresponding setup.py changes were
made.
2016-08-28 17:51:32 -07:00
Pierre-Yves David
816a66763b 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'.
2016-08-24 03:59:19 +02:00
timeless
1ad349cf3d tests: guard demandimport segment of test-extension.t 2016-08-25 23:13:36 +00:00
timeless
5e52f93083 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...
2016-08-25 22:03:51 +00:00
timeless
eab7889a37 hghave: add demandimport checking 2016-08-25 22:30:35 +00:00
timeless
1e21e7a9f5 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.
2016-08-25 22:51:39 +00:00
Gregory Szorc
57934ad4c1 help: document wire protocol commands 2016-08-22 19:50:21 -07:00
Gregory Szorc
a167c55bc7 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.
2016-08-22 19:49:59 -07:00
Gregory Szorc
378142967e help: document wire protocol capabilities
All capabilities from the history of the project are now documented.
2016-08-22 19:48:31 -07:00
Gregory Szorc
b21abff69d 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.
2016-08-22 19:47:34 -07:00
Gregory Szorc
5c136c2209 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.
2016-08-22 19:46:39 -07:00
Yuya Nishihara
23829625a1 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".
2016-08-18 15:13:56 +09:00
Yuya Nishihara
bc268d1d3a 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.
2016-08-18 14:52:06 +09:00
Yuya Nishihara
69e3fa3cab grep: build list of columns without "grep." label prefix
Prepares for formatter support. We need field names without "grep.".
2016-08-18 14:23:29 +09:00
Yuya Nishihara
18d54828a3 grep: factor out function that prints matched line with labels
Prepares for formatter support.
2016-08-18 14:09:49 +09:00
Yuya Nishihara
1e04cbab83 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.
2016-08-18 14:03:25 +09:00
liscju
6bdf778d3e files: change documentation to match its behaviour (issue5276)
Documentation gave the usage pattern as '[OPTION]... [PATTERN]...'
when the command match given files as relpaths by default.
2016-07-05 09:37:07 +02:00
Matt Mackall
6041ad2e9e templater: add template path to __base__ search
This does a fall-back check for style files or directories that are
in Mercurial's template path for user convenience.

We intentionally don't use this for the built-in coal style because we don't
want the style to mysteriously break if the working directory just
happens to have a file named "paper".
2016-08-24 17:43:45 -07:00
Augie Fackler
82bc5f196f blackbox: also log alias expansions
This should be extremely useful for helping users debug without having
to see their complete configuration.

Shell aliases do not get their expansion logged, because we don't look
and see if we're in a repo before we dive into the execution of a
shell alias. As a result, the ui object doesn't know where to log.
2016-08-23 16:40:08 -04:00
Augie Fackler
d368fe9648 test-clonebundles: accept another error string here
This is what happens if you run the test in a FreeBSD Jail, rather
than "connection refused".
2016-08-25 01:06:32 -04:00
Augie Fackler
f20b54b5ab tests: guard test-archive-symlink with unziplinks check
This fixes the test on FreeBSD, where the stock unzip doesn't
understand symlinks.
2016-08-25 01:26:39 -04:00
Augie Fackler
51a50cbe97 hghave: add a check for unzip(1) that understands symlinks
unzip(1) from the FreeBSD base system does not understand symlinks, so
test-archive-symlinks is busted.
2016-08-25 01:25:52 -04:00
Augie Fackler
1a37c09b9f test-https: drop two spurious --traceback flags
These make test failures scarier than they are.
2016-08-25 01:00:54 -04:00
Augie Fackler
4e1c384d0a extensions: change magic "shipped with hg" string
I've caught multiple extensions in the wild lying about being
'internal', so it's time to move the goalposts on people. Goalpost
moving will continue until third party extensions stop trying to
defeat the system.
2016-08-23 11:26:08 -04:00
Yuya Nishihara
3e1f2a73cd version: add formatter support
The license message isn't exported, which I don't think is useful and I
couldn't find a way to restructure it for JSON or template outputs.
2016-08-25 01:00:26 -04:00
Yuya Nishihara
161bc66818 version: factor out mapping of internal/external labels
Prepares for formatter support, where translation should be disabled
conditionally.
2016-08-16 16:09:12 +09:00