Yuya Nishihara <yuya@tcha.org> [Wed, 17 Sep 2014 23:21:20 +0900] rev 22480
annotate: port to generic templater enabled by hidden -T option
If the selected formatter is other than plainformatter, raw data are passed
to the formatter. In this case, it isn't necessary (and not possible) to
calculate column widths.
Field names are substituted to be the same as "log" command.
There are a few limitations:
- "binary file" message is not included in formatted output.
- no data structure for multiple files. all lines are packed to single list.
Yuya Nishihara <yuya@tcha.org> [Tue, 16 Sep 2014 23:40:24 +0900] rev 22479
annotate: split functions to get data without applying text formatting
This prepares for porting to generic templater API, where raw data should
be passed to the formatter.
makefunc() is necessary to build closure in list comprehension.
Yuya Nishihara <yuya@tcha.org> [Fri, 29 Aug 2014 06:19:32 +0200] rev 22478
annotate: remove unused variable in calculation of column widths
Yuya Nishihara <yuya@tcha.org> [Fri, 29 Aug 2014 05:36:52 +0200] rev 22477
annotate: build format string separately from annotation data
This prepares for porting to generic templater API.
Note that we cannot use '%*s' to pad white spaces because it doesn't take
into account character widths, as described in
4f5a6df2af92.
Yuya Nishihara <yuya@tcha.org> [Wed, 17 Sep 2014 22:21:01 +0900] rev 22476
formatter: convert float value to json
It will be used to encode ctx.date().
Yuya Nishihara <yuya@tcha.org> [Wed, 17 Sep 2014 21:30:22 +0900] rev 22475
formatter: have jsonformatter accept tuple as value
This is necessary for "annotate" to encode ctx.date() in the same manner
as jsonchangeset printer.
It doesn't support list object because keeping mutable object in _item could
be a source of hidden bugs. Also, I can't think of the use case.
Yuya Nishihara <yuya@tcha.org> [Wed, 17 Sep 2014 21:15:43 +0900] rev 22474
formatter: extract function that encode values to json string
This is the stub for tuple support, which will be used to encode ctx.date()
in the same manner as jsonchangeset printer.
Mike Edgar <adgar@google.com> [Fri, 12 Sep 2014 21:38:52 -0400] rev 22473
contrib/synthrepo: pass options to ctx.diff as kwargs, not a dict
Mike Edgar <adgar@google.com> [Fri, 12 Sep 2014 17:43:37 -0400] rev 22472
contrib/synthrepo: only generate 2 parents if model contains merges
If `hg analyze` is run on a revision set which contains no merges, then
`hg synthesize` will raise IndexError trying to select from p2distance,
which will be empty.
Siddharth Agarwal <sid0@fb.com> [Fri, 12 Sep 2014 12:28:30 -0700] rev 22471
convert: add support to find git copies from all files in the working copy
I couldn't think of a better name for this option, so I stole the Git one in
the hope that anyone converting a Git repo knows what it means.
Siddharth Agarwal <sid0@fb.com> [Fri, 12 Sep 2014 11:23:26 -0700] rev 22470
convert: add support to detect git renames and copies
Git is fairly unique among VCSes in that it doesn't record copies and renames,
instead choosing to detect them on the fly. Since Mercurial expects copies and
renames to be recorded, it can be valuable to preserve this history while
converting a Git repository to Mercurial. This patch adds a new convert option,
called 'convert.git.similarity', which determines how similar files must be to
be treated as renames or copies.
Siddharth Agarwal <sid0@fb.com> [Thu, 11 Sep 2014 23:57:49 -0700] rev 22469
convert: for git, factor out code to add entries to a separate function
We're going to call this for multiple files in one iteration in upcoming
patches.
Siddharth Agarwal <sid0@fb.com> [Thu, 11 Sep 2014 23:37:47 -0700] rev 22468
convert: for git's getchanges, always split entry line into components
We always need to know whether the entry is a rename or copy, so split it up
unconditionally.
Siddharth Agarwal <sid0@fb.com> [Thu, 11 Sep 2014 23:35:19 -0700] rev 22467
convert: for git's getchanges, use explicit index for iteration
Upcoming patches will add support for copies and renames, for which we'll need
to access multiple lines of the difftree output at once.
Siddharth Agarwal <sid0@fb.com> [Fri, 12 Sep 2014 10:17:56 -0700] rev 22466
convert: add initial docs for git sources
Upcoming patches will add config options for git sources. This patch adds a
place to document them.
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Sun, 24 Aug 2014 17:27:28 -0400] rev 22465
color: document that changeset phases have labels
It's very useful to be able to colourise csets according to their
phases. There was no indication anywhere in the docs that this is
possible.
We use e.g. `changeset.secret = ` instead of `changeset.secret
='none'`, because otherwise this is a BC: it would nullify the effects
given to log.changeset label that usually surrounds the
changeset.{phase} labels. Specifying the label without any effect
instead of 'none' is a true no-op change and purely documentation.
Matt Mackall <mpm@selenic.com> [Fri, 19 Sep 2014 12:51:15 -0500] rev 22464
color: change the debug output format
Before, the format was
label(labeled text) # single label
[label1 label2](labeled text) # multiple
Now, it's
[labels|labeled text]
..which should make things a bit more clear.
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Sun, 24 Aug 2014 17:40:27 -0400] rev 22463
color: enable debug option to show labels
This is a debug option for showing labels. This can be helpful for
knowing which labels are available for colouring or to see the output
when defining your own templates. A couple of tests are included.
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Sun, 24 Aug 2014 17:35:36 -0400] rev 22462
color: document that labels are used for colorizing text
It is a deeply hidden secret that it's possible to colorise so many
things with so many different labels. This is an attempt to document
this. The text is a bit long, but it seems as short as can be while
documenting everything. Perhaps it should be hidden under a --verbose
option.
Mads Kiilerich <madski@unity3d.com> [Wed, 27 Aug 2014 16:39:44 +0200] rev 22461
contrib: add OS X p4merge to mergetools.hgrc
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 20 Aug 2014 15:15:50 -0400] rev 22460
patch: enable diff.tab markup for the color extension
The following patch splits up changed lines along tabs (using
re.findall), and gives them a "diff.tab" label. This can be used by
the color extension for colorising tabs, like it does right now with
trailing whitespace.
I also provide corresponding tests.
Siddharth Agarwal <sid0@fb.com> [Wed, 17 Sep 2014 13:08:03 -0700] rev 22459
dirstate: copyedit exception for no beginparentchange call
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 07 Sep 2014 11:33:22 -0700] rev 22458
revsetbenchmarks: add an additional roots() benchmark
The existing roots(x - y) revset only considered the most recent 100
revisions. This was a good start. But expanding it to the full history
of the repository can dramatically increase execution time and thus
constitutes a useful benchmark.
Matt Mackall <mpm@selenic.com> [Tue, 16 Sep 2014 14:49:56 -0500] rev 22457
merge with stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 12 Sep 2014 02:29:19 +0900] rev 22456
mq: examine "pushable" of already applied patch correctly
Before this patch, "hg qselect" with --pop/--reapply may pop patches
unexpectedly, even when all of patches applied before "qselect" are
still pushable.
Strictly speaking about the condition of this issue:
- before "qselect"
- there are N applied patches
- the index of the guarded patch X in the series is less than N
- after "qselect"
- X is still guarded, and
- all of applied patched are still pushable
In the case above, "hg qselect" should keep current status, but it
actually tries to pop patches because of X.
The index in "the series" should be used to examine "pushable" of a
patch by "mq.pushablek()", but the index in "applied patches" is used,
and this may cause unexpected examination of guarded patch.
To examine "pushable" of already applied patch correctly, this patch
uses "mq.applied[i].name": "pushable" is the function introduced by
the previous patch, and it returns "mq.pushable(mq.applied[i].name)[0]".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 12 Sep 2014 02:29:19 +0900] rev 22455
mq: pop correct patches when changing pushable-ness of already applied ones
Before this patch, "hg qselect" with --pop/--reapply may pop incorrect
patches, because the index in "applied patches" is used to pop patches
by "mq.pop()", even though the index in "the series" should be used.
For example, when the already applied patch becomes guarded and it
follows the already guarded (= not yet applied) one, "hg qselect" is
aborted, because it tries to pop to guarded one.
This patch uses "mq.applied[i - 1].name" to pop to the patch, of which
the index in the "applied ones" is "i - 1".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 12 Sep 2014 02:29:19 +0900] rev 22454
mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety
Before this patch, "hg qselect --reapply" is aborted when "--verbose"
is specified, because "mq.appliedname()" returns "INDEX PATCHNAME"
instead of "PATCHNAME" in such case and "mq.push" can't accept the
former as the name of patch.
This patch uses "mq.applied[i].name" instead of "mq.appliedname(i)" as
the name of the patch to be pushed for safety.
Now, there is no code path using "mq.appliedname()", and it should be
removed to prevent developers from using it in the wrong way like this
issue.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 12 Sep 2014 02:29:19 +0900] rev 22453
mq: report correct numbers for changing "number of guarded, applied patches"
Before this patch, "hg qselect" may report incorrect numbers for
"number of guarded, applied patches has changed", because it examines
"pushable" of patches by the index not in "the series" but in "applied
patches", even though "mq.pushable()" expects the former.
To report correct numbers for changing "number of guarded, applied
patches", this patch uses the name of applied patch to examine
pushable-ness of it.
This patch also changes the result of existing "hg qselect" tests,
because they doesn't change pushable-ness of already applied patches.
This patch assumes that "hg qselect" focuses on changing pushable-ness
only of already applied patches, because:
- the report message uses not "previous" (in the series) but
"applied"
- the logic to pop patches for --pop/--reapply examines
pushable-ness only of already applied ones (in fact, there are
some incorrect code paths)
Yuya Nishihara <yuya@tcha.org> [Fri, 29 Aug 2014 05:09:59 +0200] rev 22452
annotate: remove redundant check for empty list of annotation data
It isn't necessary because zip(*pieces) returns [] if pieces are empty,
and pieces are empty only if lines are empty.
Durham Goode <durham@fb.com> [Fri, 12 Sep 2014 14:21:18 -0700] rev 22451
revset: lower weight for _intlist function
The histedit command uses a revset like:
(_intlist('1234\x001235')) and merge()
Previously the optimizer gave a weight of 1.5 to the _intlist side (1 for the
function, 0.5 for the string) which caused it to process the merge() side first.
This caused it to evaluate merge against every commit in the repo, which took
2.5 seconds on a large repo.
I changed the weight of _intlist to 0, since it's a trivial calculation, which
makes it process intlist first, which makes merge apply only to the revs in the
list. Which makes the revset take 0.15 seconds now. Cutting off 2.4 seconds off
our histedit performance.
>From the revset benchmark:
revset #25: (_intlist('20000\x0020001')) and merge()
0) obsolete feature not enabled but 54243 markers found!
! wall 0.036767 comb 0.040000 user 0.040000 sys 0.000000 (best of 100)
1) obsolete feature not enabled but 54243 markers found!
! wall 0.000198 comb 0.000000 user 0.000000 sys 0.000000 (best of 9084)
Durham Goode <durham@fb.com> [Fri, 12 Sep 2014 15:00:51 -0700] rev 22450
revset: make parents() O(number of parents)
Strip executes a revset like this:
max(parents(_intlist('1234\x001235')) - _intlist('1234\x001235'))
Previously the parents() revset would do 'subset & parents' which iterates over
each item in the subset and checks if it's in parents. subset is usually the
entire repo (a spanset) so this takes a while.
Reversing the parameters to be 'parents & subset' means the operation becomes
O(number of parents) instead of O(size of repo). It also means the result gets
evaluated immediately (since parents isn't a lazy set), but I think this is a
win in most scenarios.
This shaves 0.3 seconds off strip (amend/histedit/rebase/etc) for large repositories.
revset #0: parents(20000)
0) obsolete feature not enabled but 54243 markers found!
! wall 0.006256 comb 0.010000 user 0.010000 sys 0.000000 (best of 289)
1) obsolete feature not enabled but 54243 markers found!
! wall 0.000391 comb 0.000000 user 0.000000 sys 0.000000 (best of 4323)
Durham Goode <durham@fb.com> [Fri, 12 Sep 2014 16:21:13 -0700] rev 22449
revset: make descendants() lazier
Previously descendants() would force the provided subset to become a set. In
the case of revsets like '(%ld::) - (%ld)' (as used by histedit) this would
force the '- (%ld)' set to be evaluated, which produced a set containing every
commit in the repo (except %ld). This takes 0.6s on large repos.
This changes descendants to trust the subset to implement __contains__
efficiently, which improves the above revset to 0.16s. Shaving 0.4 seconds off
of histedit.
revset #27: (20000::) - (20000)
0) obsolete feature not enabled but 54243 markers found!
! wall 0.023640 comb 0.020000 user 0.020000 sys 0.000000 (best of 100)
1) obsolete feature not enabled but 54243 markers found!
! wall 0.019589 comb 0.020000 user 0.020000 sys 0.000000 (best of 100)
This commit removes the final revset related perf hotspot from histedit.
Combined with the previous two patches, they shave a little over 3 seconds off
histedit on large repos.
Yuya Nishihara <yuya@tcha.org> [Wed, 17 Sep 2014 00:28:37 +0900] rev 22448
check-code: look for misuse of __bool__
Yuya Nishihara <yuya@tcha.org> [Wed, 17 Sep 2014 00:31:03 +0900] rev 22447
formatter: correct bool testing which should be __nonzero__ in Python 2
Mike Edgar <adgar@google.com> [Mon, 15 Sep 2014 16:07:54 -0400] rev 22446
contrib/synthrepo: return None to delete files on commit, don't raise IOError
The internal commit API was changed in
650b5b6e75ed to expect None from the
filectx function when a file is to be deleted, not an IOError. This change
keeps synthrepo up-to-date.
Steve Borho <steve@borho.org> [Mon, 15 Sep 2014 09:36:12 -0500] rev 22445
wix: contrib/sample.hgrc is no more
Mads Kiilerich <madski@unity3d.com> [Sun, 31 Aug 2014 13:41:09 +0200] rev 22444
dockerrpm: create a yum/dnf repo from the generated rpms
This gives "PPA" functionality where users easily can stay uptodate with latest
nightly build.
Mads Kiilerich <madski@unity3d.com> [Thu, 15 May 2014 01:48:37 +0200] rev 22443
docker: add CentOS 5
There is no official CentOS 5 docker template so we use one from saltstack.
Mads Kiilerich <madski@unity3d.com> [Sun, 31 Aug 2014 13:41:09 +0200] rev 22442
docker: use stable tags for fedora and centos
A moving target is rarely useful.
Mads Kiilerich <madski@unity3d.com> [Fri, 30 May 2014 14:14:33 +0200] rev 22441
dockerrpm: prepare source outside docker and just run rpmbuild inside docker
Simplifies the rpm build process.
We will use platform specific rpmbuild directories and will not clean them and
will drop the explicit copy to build directory.
Mads Kiilerich <madski@unity3d.com> [Fri, 30 May 2014 14:14:33 +0200] rev 22440
dockerrpm: run docker build process as the current user, not as root
Docker can be run by ordinary users if they are in the docker group. The build
process would however be run as a root user, only protected by the sandboxing.
That caused problems with the shared directory where rpmbuild would be picky
about building from sources owned by less privileged users and producing files
owned by root.
Instead, add a build user with the right uid/gid to the image and run the
docker process as that user.
Mads Kiilerich <madski@unity3d.com> [Fri, 30 May 2014 14:14:33 +0200] rev 22439
dockerrpm: better handling of specification of docker name
Mads Kiilerich <madski@unity3d.com> [Fri, 30 May 2014 14:14:33 +0200] rev 22438
dockerrpm: check that docker is running correctly before building
Mads Kiilerich <madski@unity3d.com> [Sun, 31 Aug 2014 13:40:53 +0200] rev 22437
buildrpm: introduce --rpmdir instead of using hardcoded rpmbuild dir
Used as rpm _topdir when preparing spec and source and building rpms.
Mads Kiilerich <madski@unity3d.com> [Thu, 15 May 2014 01:50:11 +0200] rev 22436
buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com> [Sun, 31 Aug 2014 12:51:06 +0200] rev 22435
buildrpm: introduce --prepare for preparing without actually building rpms
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 28 Aug 2014 22:45:36 +0900] rev 22434
templater: add "diff" template function
"diff" allows to embed changes in the target revision into template
output, even if the command itself doesn't take "--patch" option
Combination of "[committemplate]" configuration and "diff" template
function can achieve the feature like
issue231 ("option to have diff
displayed in commit editor buffer")
http://bz.selenic.com/show_bug.cgi?id=231
For example, templating below can be used to add each "diff" output
lines "HG: " prefix::
{splitlines(diff) % 'HG: {line}\n'}
This patch implements "diff" not as "a template keyword" but as "a
template function" to take include/exclude patterns at runtime.
It allows to specify target files of command (by -I/-X command line
options) and "diff" separately.
Matt Mackall <mpm@selenic.com> [Tue, 16 Sep 2014 11:08:29 -0500] rev 22433
locate: add pointer to files command in help
Matt Mackall <mpm@selenic.com> [Tue, 16 Sep 2014 11:08:14 -0500] rev 22432
tests: fix breakage from locate deprecation
Matt Mackall <mpm@selenic.com> [Sun, 16 Mar 2014 13:29:08 -0500] rev 22431
locate: deprecate in favor of files
Matt Mackall <mpm@selenic.com> [Fri, 12 Sep 2014 18:36:38 -0500] rev 22430
formatter: add pickle format
This gives convenient Python2 output. Python 3 users will need encoding=bytes.
Matt Mackall <mpm@selenic.com> [Mon, 15 Sep 2014 13:15:07 -0500] rev 22429
commands: add hidden -T option for files/manifest/status/tags
These commands have generic formatting support but no way to enable it
yet. When this feature is more fully developed, this flag will be unhidden.
Matt Mackall <mpm@selenic.com> [Fri, 12 Sep 2014 18:29:29 -0500] rev 22428
formatter: add json formatter
Matt Mackall <mpm@selenic.com> [Mon, 15 Sep 2014 13:11:13 -0500] rev 22427
cmdutil: add json style to log-like commands
Sadly, this can't be done with the normal templater like we do with
XML due to JSON's inter-record comma rules.
Matt Mackall <mpm@selenic.com> [Mon, 15 Sep 2014 13:12:49 -0500] rev 22426
encoding: add json escaping filter
This ends up here because it needs to be somewhat encoding aware.
Matt Mackall <mpm@selenic.com> [Mon, 15 Sep 2014 13:12:20 -0500] rev 22425
encoding: handle empty string in toutf8
Matt Mackall <mpm@selenic.com> [Fri, 12 Sep 2014 19:06:11 -0500] rev 22424
formatter: make debug style match Python syntax
Matt Mackall <mpm@selenic.com> [Fri, 12 Sep 2014 18:32:46 -0500] rev 22423
files: add new command unifying locate and manifest functionality
Mike Edgar <adgar@google.com> [Tue, 02 Sep 2014 14:42:30 -0400] rev 22422
filelog: parsemeta stops returning unused key list
Currently, only the returned meta dictionary is used. An upcoming change will
use the returned text offset.
Mike Edgar <adgar@google.com> [Wed, 10 Sep 2014 00:18:15 -0400] rev 22421
filelog: make parsemeta a public module function, to be used by censor module