Yuya Nishihara <yuya@tcha.org> [Mon, 09 Jan 2017 15:15:21 +0900] rev 30752
parser: make buildargsdict() precompute position where keyword args start
This prepares for adding *varargs support. See the next patch.
Jun Wu <quark@fb.com> [Wed, 11 Jan 2017 07:40:52 +0800] rev 30751
chg: change server's process title
This patch uses the newly introduced "setprocname" interface to update the
process title server-side, to make it easier to tell what a worker is actually
doing.
The new title is "chg[worker/$PID]", where PID is the process ID of the
connected client. It can be directly observed using "ps -AF" under Linux, or
"ps -A" under FreeBSD.
Jun Wu <quark@fb.com> [Wed, 11 Jan 2017 07:36:48 +0800] rev 30750
chgserver: add the setprocname interface
This allows clients to change its process title freely.
Anton Shestakov <av6@dwimlabs.net> [Tue, 10 Jan 2017 23:41:58 +0800] rev 30749
hgweb: use archivespecs for links on repo index page too
Moving archivespecs to the module level allows using it from other modules
(such as hgwebdir_mod), and keeping a reference to it in requestcontext allows
current code to just work.
Anton Shestakov <av6@dwimlabs.net> [Tue, 10 Jan 2017 23:34:39 +0800] rev 30748
hgweb: use util.sortdict for archivespecs
Thus we allow dict-like indexing and "in" checks, and also preserve the order
of archive types and can generate links in a certain order (so
requestcontext.archives is no longer needed).
Anton Shestakov <av6@dwimlabs.net> [Wed, 11 Jan 2017 01:25:07 +0800] rev 30747
hgweb: test the order of archive links
Remi Chaintron <remi@fb.com> [Thu, 05 Jan 2017 17:16:51 +0000] rev 30746
revlog: REVIDX_EXTSTORED flag
This flag will be used by the lfs extension to mark the revision data as stored
externally.
Remi Chaintron <remi@fb.com> [Tue, 10 Jan 2017 16:15:21 +0000] rev 30745
revlog: flag processor
Add the ability for revlog objects to process revision flags and apply
registered transforms on read/write operations.
This patch introduces:
- the 'revlog._processflags()' method that looks at revision flags and applies
flag processors registered on them. Due to the need to handle non-commutative
operations, flag transforms are applied in stable order but the order in which
the transforms are applied is reversed between read and write operations.
- the 'addflagprocessor()' method allowing to register processors on flags.
Flag processors are defined as a 3-tuple of (read, write, raw) functions to be
applied depending on the operation being performed.
- an update on 'revlog.addrevision()' behavior. The current flagprocessor design
relies on extensions to wrap around 'addrevision()' to set flags on revision
data, and on the flagprocessor to perform the actual transformation of its
contents. In the lfs case, this means we need to process flags before we meet
the 2GB size check, leading to performing some operations before it happens:
- if flags are set on the revision data, we assume some extensions might be
modifying the contents using the flag processor next, and we compute the
node for the original revision data (still allowing extension to override
the node by wrapping around 'addrevision()').
- we then invoke the flag processor to apply registered transforms (in lfs's
case, drastically reducing the size of large blobs).
- finally, we proceed with the 2GB size check.
Note: In the case a cachedelta is passed to 'addrevision()' and we detect the
flag processor modified the revision data, we chose to trust the flag processor
and drop the cachedelta.
Remi Chaintron <remi@fb.com> [Thu, 05 Jan 2017 17:16:07 +0000] rev 30744
revlog: pass revlog flags to addrevision
Adding the ability to passing flags to addrevision instead of simply passing
default flags to _addrevision will allow extensions relying on flag transforms
to wrap around addrevision() in order to update revlog flags.
The first use case of this patch will be the lfs extension marking nodes as
stored externally when the contents are larger than the defined threshold.
One of the reasons leading to setting flags in addrevision() wrappers in the
flag processor design is that it allows to detect files larger than the 2GB
limit before the check is performed, which allows lfs to transform the contents
into metadata.
Remi Chaintron <remi@fb.com> [Thu, 05 Jan 2017 17:16:07 +0000] rev 30743
revlog: add 'raw' argument to revision and _addrevision
This patch introduces a new 'raw' argument (defaults to False) to revlog's
revision() and _addrevision() methods.
When the 'raw' argument is set to True, it indicates the revision data should be
handled as raw data by the flagprocessor.
Note: Given revlog.addgroup() calls are restricted to changegroup generation, we
can always set raw to True when calling revlog._addrevision() from
revlog.addgroup().
Jun Wu <quark@fb.com> [Tue, 10 Jan 2017 06:59:49 +0800] rev 30742
pager: do not special case chg
Since chg has its own _runpager implementation, it's no longer necessary to
special-case chg in the pager extension. This will effectively enable the
new chg pager code path that runs inside runcommand.
Jun Wu <quark@fb.com> [Tue, 10 Jan 2017 06:59:39 +0800] rev 30741
chg: remove getpager support
We have enough bits to switch to the new chg pager code path in runcommand.
So just remove the legacy getpager support.
This is a red-only patch, and will break chg's pager support temporarily.
Jun Wu <quark@fb.com> [Tue, 10 Jan 2017 06:59:31 +0800] rev 30740
chgserver: implement chgui._runpager
This patch implements chgui._runpager in a relatively simple way. A more
clean way is to move the core logic of "attachio" to "ui", which will be
done later after chg runs uisetup per request.
Jun Wu <quark@fb.com> [Tue, 10 Jan 2017 06:59:21 +0800] rev 30739
chgserver: make S channel support pager request
This patch adds the "pager" support for the S channel. The pager API allows
running some subcommands, namely attachio, and waiting for the client to be
properly synchronized.
Jun Wu <quark@fb.com> [Tue, 10 Jan 2017 06:59:03 +0800] rev 30738
chg: handle pager request client-side
This patch implements the simple S-channel pager handling at chg
client-side.
Note: It does not deal with environ and cwd currently for simplicity, which
will be fixed later.
Jun Wu <quark@fb.com> [Tue, 10 Jan 2017 06:58:51 +0800] rev 30737
chgserver: use util.shellenviron
This avoids code duplication.
Jun Wu <quark@fb.com> [Tue, 10 Jan 2017 06:58:02 +0800] rev 30736
util: extract the logic calculating environment variables
The method will be reused in chgserver. Move it out so it can be reused.
Anton Shestakov <av6@dwimlabs.net> [Sun, 08 Jan 2017 00:52:54 +0800] rev 30735
hgweb: generate archive links in order
It would be nice for archive links to always be in a certain commonly used
order, such as 'zip', 'bz', 'gzip2'. Repo index page (hgwebdir_mod) already
shows archive links in this order, let's do the same in hgweb_mod.
Sadly, archivespecs is a regular unordered dict, and collections.OrderedDict is
new in 2.7. But requestcontext.archives is a tuple of archive types, so it can
be used as an index to archivespecs.
Anton Shestakov <av6@dwimlabs.net> [Sun, 08 Jan 2017 01:24:45 +0800] rev 30734
hgweb: use archivespecs (dict) instead of archives (tuple) for "in" check
Matt Harbison <matt_harbison@yahoo.com> [Sun, 08 Jan 2017 14:37:44 -0500] rev 30733
test-obsolete: stabilize output on platforms without 'serve' support
The conditional was updating the repository, which wasn't reflected in
subsequent logs on Windows, so the conditional is narrowed to just the serve
commands. The serve operation generates log files, so those are deleted to keep
the output of summary consistent.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 08 Jan 2017 13:49:53 -0500] rev 30732
tests: update globs for Windows
The extra glob in test-command-template.t caused it to say no result was
reported. It used to be (within the past year), that both this and the missing
glob cases could be fixed simply by editing any output in the test, and
re-running it in interactive mode. But that no longer works, and I had to diff
*.t against *.t.err. I didn't dig into what changed.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 08 Jan 2017 12:05:10 -0500] rev 30731
help: merge the various operator sections of revsets, filesets and templates
Having sections for specific operator types assumes the user already knows what
type of operators are supported. By having a common heading, the user can
simply lookup help for "(revsets|filesets|templates).operators".
Matt Harbison <matt_harbison@yahoo.com> [Sun, 08 Jan 2017 02:43:01 -0500] rev 30730
help: apply the section headings from revsets to templates
Unlike filesets, there are a few distinct headings that are not shared with
revsets. But common names are used where possible.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 08 Jan 2017 02:40:36 -0500] rev 30729
help: apply the section headings from revsets to filesets
This has the nice property of visually breaking up the wall of text. It also
allows specific smaller sections to be called out. For example,
`hg help filesets.predicates` now prints just the predicate section. At the
moment, the revset headings are a superset of the fileset headings, so there is
consistency in how example, predicate and operator help is called out.
The reference to `hg help patterns` was moved to the overview section, so that
it isn't stuck in the examples section.
Jun Wu <quark@fb.com> [Fri, 06 Jan 2017 16:14:52 +0000] rev 30728
chg: check type read from S channel
The previous patch added the check server-side. This patch added it
client-side.
Jun Wu <quark@fb.com> [Fri, 06 Jan 2017 16:12:25 +0000] rev 30727
chgserver: check type passed to S channel
It currently only supports the "system" type. Add an explicit check.
Jun Wu <quark@fb.com> [Fri, 06 Jan 2017 16:11:03 +0000] rev 30726
chg: send type information via S channel (BC)
Previously S channel is only used to send system commands. It will also be
used to send pager commands. So add a type parameter.
This breaks older chg clients. But chg and hg should always come from a
single commit and be packed into a single package. Supporting running
inconsistent versions of chg and hg seems to be unnecessarily complicated
with little benefit. So just make the change and assume people won't use
inconsistent chg with hg.
Valters Vingolds <valters@vingolds.ch> [Sun, 01 Jan 2017 13:16:29 +0100] rev 30725
rebase: fail-fast the pull if working dir is not clean (BC)
Refuse to run 'hg pull --rebase' if there are uncommitted changes:
so that instead of going ahead with fetching changes and then suddenly aborting
the rebase, we can warn user of uncommitted changes (or unclean repo state)
right up front.
In tests, we create a 'histedit' session to verify that also an unfinished
state is detected and handled.
Yuya Nishihara <yuya@tcha.org> [Fri, 06 Jan 2017 22:50:04 +0900] rev 30724
commit: fix unmodified message detection for the "--- >8 ----" magic
We need the raw editortext to be compared with the templatetext.
Yuya Nishihara <yuya@tcha.org> [Fri, 06 Jan 2017 22:44:39 +0900] rev 30723
commit: update test to actually modify template text
We have a check for unmodified commit message (introduced by
bec1a579ebc4),
which should be enabled for the "--- >8 ---" magic but currently not.
Jun Wu <quark@fb.com> [Mon, 26 Dec 2016 00:25:44 +0000] rev 30722
pager: wrap ui._runpager
As discussed at [1], ui._runpager will be the new low-level API accepting a
pager command to actually run the pager. And ui.pager is the high-level API
which reads config directly from self.
This change is necessary for chgserver to override _runpager cleanly.
[1]: www.mercurial-scm.org/pipermail/mercurial-devel/2016-December/091656.html
Denis Laxalde <denis@laxalde.org> [Sat, 07 Jan 2017 12:24:15 +0100] rev 30721
summary: use ui.label and join to write evolution troubles
Follow-up on
7b526670f540 to avoid a convoluted loop.
Denis Laxalde <denis@laxalde.org> [Sat, 07 Jan 2017 12:07:56 +0100] rev 30720
log: drop unnecessary ui.note label from "trouble: " line
Follow-up on
f05ede08dcf7 and
6d0b1a69f98c.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 04 Jan 2017 16:47:49 +0100] rev 30719
revset: add a followlines(file, fromline, toline[, rev]) revset
This revset returns the history of a range of lines (fromline, toline) of a
file starting from `rev` or the current working directory.
Added tests in test-annotate.t which already contains a reasonably complex
repository.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 28 Dec 2016 23:03:37 +0100] rev 30718
context: add a `blockancestors(fctx, fromline, toline)` function
This yields ancestors of `fctx` by only keeping changesets touching the file
within specified linerange = (fromline, toline).
Matching revisions are found by inspecting the result of `mdiff.allblocks()`,
filtered by `mdiff.blocksinrange()`, to find out if there are blocks of type
"!" within specified line range.
If, at some iteration, an ancestor with an empty line range is encountered,
the algorithm stops as it means that the considered block of lines actually
has been introduced in the revision of this iteration. Otherwise, we finally
yield the initial revision of the file as the block originates from it.
When a merge changeset is encountered during ancestors lookup, we consider
there's a diff in the current line range as long as there is a diff between
the merge changeset and at least one of its parents (in the current line
range).
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 03 Jan 2017 18:15:58 +0100] rev 30717
mdiff: add a "blocksinrange" function to filter diff blocks by line range
The function filters diff blocks as generated by mdiff.allblock function based
on whether they are contained in a given line range based on the "b-side" of
blocks.
Jun Wu <quark@fb.com> [Fri, 06 Jan 2017 16:19:41 +0000] rev 30716
run-tests: unset CHGDEBUG
With CHGDEBUG, chg outputs much more stuff and the test could fail running
with --chg. So unset the environment variable.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 06 Jan 2017 14:35:22 +0100] rev 30715
summary: add evolution "troubles" information to summary output
Extend the "parent: " lines in summary with the list of evolution "troubles"
in parentheses, when the parent is troubled.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 06 Jan 2017 14:34:34 +0100] rev 30714
summary: use the same labels as log command in "parent: " line
Re-use the cmdutil._changesetlabels function introduced in
5289fd78017a to
have consistent labels between the "changeset: " line in log command and the
"parent: " line in summary.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 06 Jan 2017 13:50:52 +0100] rev 30713
templates: display evolution "troubles" in command line style
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 06 Jan 2017 13:50:16 +0100] rev 30712
templatekw: add a "troubles" template keyword
The "troubles" template keyword returns a list of evolution troubles.
It is EXPERIMENTAL, as anything else related to changeset evolution.
Test it in test-obsolete.t which has troubled changesets.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 06 Jan 2017 15:48:22 +0100] rev 30711
test: test "trouble: " line in log output with multiple troubles
Follow-up on
f05ede08dcf7.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 06 Jan 2017 12:36:21 +0100] rev 30710
cmdutil: add missing "i18n" comment about "trouble: " line
Follow-up on
f05ede08dcf7 per late review.
Valters Vingolds <valters@vingolds.ch> [Fri, 06 Jan 2017 09:58:41 +0100] rev 30709
rebase: use repo.vfs.exists in 'hg summary' hook
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 28 Dec 2016 15:48:17 -0700] rev 30708
hgweb: link to raw-file on annotation page (BC)
Every other template has the "raw" link load "raw-file." However,
fileannotate.tmpl's "raw" link loads "raw-annotate." This feels
inconsistent and wrong.
As far as I can tell, linking to the "raw annotate" view has occurred
since 2006.
Martin von Zweigbergk <martinvonz@google.com> [Wed, 04 Jan 2017 10:35:04 -0800] rev 30707
repair: combine two loops over changelog revisions
This just saves a few lines.
Martin von Zweigbergk <martinvonz@google.com> [Wed, 04 Jan 2017 10:07:12 -0800] rev 30706
repair: speed up stripping of many roots
repair.strip() expects a set of root revisions to strip. It then
builds the full set of descedants by walking the descandants of
each. It is rare that more than a few roots get passed in, but if that
happens, it will wastefully walk the changelog for each root. So let's
just walk it once.
I noticed this because the narrowhg extension was passing not only
roots, but all the commits to strip. When there were tens of thousands
of commits to strip, this resulted in quadratic behavior with that
extension.
Anton Shestakov <av6@dwimlabs.net> [Fri, 06 Jan 2017 09:56:40 +0800] rev 30705
make: remove targets for building packages for ubuntu wily (end of life)
Ubuntu 15.10 (Wily Werewolf) came out on October 22, 2015 and reached end of
life on July 28, 2016 [1]. Users were encouraged to upgrade to 16.04 (Xenial).
PPA doesn't allow new uploads targeting 15.10 anymore.
[1]: https://wiki.ubuntu.com/Releases
Sean Farley <sean@farley.io> [Wed, 04 Jan 2017 22:32:42 -0600] rev 30704
config: add docs for ignoring all text below in the editor
This is an example of how to use the new skip-from-there string for ignoring the
diff in a commit message.
Sean Farley <sean@farley.io> [Sat, 31 Dec 2016 15:36:36 -0600] rev 30703
cmdutil: add special string that ignores rest of text
Similar to git, we add a special string:
HG: ------------------------ >8 ------------------------
that means anything below it is ignored in a commit message.
This is helpful for integrating with third-party tools that display the
Yuya Nishihara <yuya@tcha.org> [Sat, 14 May 2016 20:52:44 +0900] rev 30702
revset: drop TODO comment about sorting issue of fullreposet
The bootstrapping issue was addressed at the parsing phase and we expect
that fullreposet.__and__() fully complies to the smartset API, in which
'self & other' should return a result set in self's order. See also
90455e7bf543.
Yuya Nishihara <yuya@tcha.org> [Thu, 05 Jan 2017 22:53:42 +0900] rev 30701
revset: document wdir() as an experimental function
Let's resurrect the docstring since our help module can detect the EXPERIMENTAL
tag and display it only if -v is specified.
This patch updates the test added by
015c0d1087a3 since wdir() is now
documented.
Yuya Nishihara <yuya@tcha.org> [Sat, 20 Aug 2016 17:50:23 +0900] rev 30700
revset: categorize wdir() as very fast function
The cost of wdir() should be identical to or cheaper than _intlist().
Yuya Nishihara <yuya@tcha.org> [Sat, 23 May 2015 11:04:11 +0900] rev 30699
revset: make children() not look at p2 if null (
issue5439)
Unlike p1 = null, p2 = null denotes the revision has only one parent, which
shouldn't be considered a child of the null revision. This was spotted while
fixing the
issue4682 and rediscovered as
issue5439.
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Jan 2017 19:17:44 -0800] rev 30698
setup: pass named argument to setup_zstd
The next release from upstream adds another named argument to this
function. Specify arguments by name so there is no ambiguity about
which argument is being passed.
Augie Fackler <augie@google.com> [Wed, 04 Jan 2017 14:52:59 -0500] rev 30697
merge with stable
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 03 Jan 2017 13:25:29 +0100] rev 30696
templates-default: factor out definition of changeset labels
This is redundant for normal and debug mode and prepares extension of this
list that should effect both modes.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 10 Oct 2016 12:06:58 +0200] rev 30695
cmdutil: add support for evolution "troubles" display in changeset_printer
Add a "trouble" line in changeset header along with a couple of labels on
"log.changeset" line to indicate whether a changeset is troubled or not and
which kind trouble occurs.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 03 Jan 2017 10:56:41 +0100] rev 30694
cmdutil: extract a _changesetlabels function out of changeset_printer._show()
There is a common logic in changeset_printer and in the summary command for
labelling a changeset.
This prepares extension of changeset's labels with evolution "troubles"
information that would show up in both log and summary outputs. Ultimately,
both would use this function.
Jun Wu <quark@fb.com> [Mon, 02 Jan 2017 14:57:14 +0000] rev 30693
chg: add procutil.h
This patch adds a formal header procutil.h for procutil.c, and changes
Makefile to build procutil.c independently.