Yuya Nishihara <yuya@tcha.org> [Sat, 24 Mar 2018 17:54:02 +0900] rev 38297
templater: introduce a wrapper for date tuple (BC)
Strictly speaking, this is BC, but I believe the original string format
(str(float(unixtime)) + str(int(tzoffset))) was just plain wrong.
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Apr 2018 19:01:35 +0900] rev 38296
templater: promote tomap() to an interface type
I originally considered merging tomap() with itermaps()/getmember(), but
decided to not. We might want to add support for chained map operations
(e.g. {foo % func() % ...}), where func() will return a mappable object,
and 'foo % func()' will be a mappedgenerator of mappable objects.
Yuya Nishihara <yuya@tcha.org> [Sat, 09 Jun 2018 12:36:06 +0900] rev 38295
templater: rename mappable to hybriditem as it is the primary use case
This frees up the name 'mappable' for new interface type.
Yuya Nishihara <yuya@tcha.org> [Fri, 08 Jun 2018 23:32:33 +0900] rev 38294
serve: do not daemonize by default by --print-url
Per discussion in D3649, -d/--daemon should be explicitly specified to avoid
surprising result.
Differential Revision: https://phab.mercurial-scm.org/D3703
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 07 Jun 2018 16:19:18 -0700] rev 38293
mercurial: add .t files to .editorconfig
The notable entry here prevents the stripping of trailing whitespace,
which is important in .t tests.
Differential Revision: https://phab.mercurial-scm.org/D3702
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 28 May 2018 21:13:32 +0530] rev 38292
graft: add a new `--stop` flag to stop interrupted graft
This patch adds a new flag `--stop` to `hg graft` command which stops the
interrupted graft.
The `--stop` flag takes back you to the last successful step i.e. it will keep
your grafted commits, it will just clear the mergestate and interrupted graft
state.
The `--stop` is different from `--abort` flag as the latter also undoes all the
work done till now which is sometimes not what the user wants.
Suppose you grafted a lot of changesets, you encountered conflicts, you resolved
them, did `hg graft --continue`, again encountered conflicts, continue, again
encountered conflicts. Now you are tired of solving merge conflicts and want to
resume this sometimes later. If you use the `--abort` functionality, it will
strip your already grafted changesets, making you loose the work you have done
resolving merge conflicts.
A general goal related to this flag is to add this flag to `rebase` and
`histedit` too. The evolve command already has this --stop flag.
Tests are added for the new flag.
.. feature::
`hg graft` now has a `--stop` flag to stop interrupted graft.
Differential Revision: https://phab.mercurial-scm.org/D3668
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 12 Jun 2018 02:36:34 +0530] rev 38291
graft: fix the help text to say `graft reapplies previous options`
The options which graft accepts are:
* rev
* continue
* edit
* log
* force
* currentdate
* currentuser
* date
* user
* tool
* dryrun
Out of these following should be reapplied in case conflicts occur and user does
`hg graft --continue`:
* rev
* log
* force
* currentuser
* currentdate
* date
* user
rev and force were already reapplied by --continue. Some recent refactors made
graft to store the values of other options in graftstate and reapplies them at
`hg graft --continue`.
Now all the options which should be reapplied are taken care of, we can easily
remove the help note which says that `--continue does not reapply earlier
options` and help text saying that we reapplies earlier options.
.. feature:: `hg graft --continue` now reapplies all the earlier options
`hg graft` now preserves the value of all the flags and reapplies them in
case of `hg graft --continue`.
Differential Revision: https://phab.mercurial-scm.org/D3667
Martin von Zweigbergk <martinvonz@google.com> [Mon, 11 Jun 2018 10:09:35 -0700] rev 38290
files: drop now-unnecessary filtering of removed dirstate files
workingctx.matches() now filters out removed files.
Differential Revision: https://phab.mercurial-scm.org/D3712
Martin von Zweigbergk <martinvonz@google.com> [Mon, 11 Jun 2018 10:05:23 -0700] rev 38289
context: make workingctx.matches() filter our removed files (API)
It seems surprising that workingctx.matches() includes files that had
been removed in the working copy. The callers don't want that either
(besides the `hg locate` that was changed in the previous patch).
The only observable difference that I'm aware of is that `hg log -T
'wdir()' -r '{files(...)}'` will no longer include removed files (an
improvement, IMO). That matches `hg files` (but does not match the
deprecated `hg locate`).
Differential Revision: https://phab.mercurial-scm.org/D3711
Martin von Zweigbergk <martinvonz@google.com> [Mon, 11 Jun 2018 09:47:07 -0700] rev 38288
locate: explicitly use dirstate.matches() for working copy
`hg locate` is odd in that it includes files that have been removed
from the working copy. It relies on workingctx.matches() for that. I
want to make workingctx.matches() not include removed files, so this
patch makes `hg locate` handle the working copy differently instead.
Differential Revision: https://phab.mercurial-scm.org/D3710
Martin von Zweigbergk <martinvonz@google.com> [Mon, 11 Jun 2018 11:37:21 -0700] rev 38287
revsets: define a none() revset
This can be useful for default values in corp-wide configuration
(e.g. for commits to hide, which defaults to none()), and perhaps in
scripts. I named it none() rather than empty() to match all().
Differential Revision: https://phab.mercurial-scm.org/D3713
Boris Feld <boris.feld@octobus.net> [Mon, 11 Jun 2018 19:24:01 +0200] rev 38286
statprof: fix save and load
Fix these functions even if they don't are used at the moment. Thanks to Yuya
Nishihara for spotting that.
Boris Feld <boris.feld@octobus.net> [Mon, 11 Jun 2018 19:05:41 +0200] rev 38285
perftemplating: abort on incompatible version
This is what the other debug commands do. Thanks to Yuya Nishihara for
pointing this out.
Yuya Nishihara <yuya@tcha.org> [Tue, 05 Jun 2018 21:40:33 +0900] rev 38284
templater: fix string representation of wrapped None
flatten() and stringify() skip None, which means wrappedvalue(None).show()
must return '' instead of 'None'. This isn't a problem right now, but we'll
encounter it once we start using wrapped types extensively.
Yuya Nishihara <yuya@tcha.org> [Fri, 08 Jun 2018 20:57:54 +0900] rev 38283
templater: show slightly better hint on map operation error
It was super hard to find where the templater went wrong if a keyword was
evaluated to '' or None.
Yuya Nishihara <yuya@tcha.org> [Wed, 21 Mar 2018 12:28:12 +0900] rev 38282
templater: inline unwraphybrid()
flatten() is the solo user of this function.
Yuya Nishihara <yuya@tcha.org> [Mon, 19 Mar 2018 00:26:55 +0900] rev 38281
templater: drop hybrid-ness on unwrapvalue()
Proxy methods are no longer necessary as list/dict functions go through
the wrapped interface.
Yuya Nishihara <yuya@tcha.org> [Fri, 23 Mar 2018 22:31:58 +0900] rev 38280
templater: mark .keytype as a private attribute
Yuya Nishihara <yuya@tcha.org> [Mon, 19 Mar 2018 00:23:20 +0900] rev 38279
templater: abstract ifcontains() over wrapped types
This allows us to make .keytype private.
There's a minor BC that a hybrid dict/list of keytype=None now strictly
checks the type of the needle. For example, {ifcontains(rev, files)} no longer
matches a file named "1" at the rev=1. I made this change for consistency
with the get(dict, key) function. We can restore the old behavior by making
keytype=bytes the default if desired.
Yuya Nishihara <yuya@tcha.org> [Wed, 21 Mar 2018 12:06:18 +0900] rev 38278
templater: inline wraphybridvalue()
All wraphybridvalue() calls are now handled in the hybrid class.
Yuya Nishihara <yuya@tcha.org> [Mon, 19 Mar 2018 00:16:12 +0900] rev 38277
templater: abstract min/max away
I'm not certain how many get*() functions I'll add to the wrapped types,
but getmin() and getmax() will allow us to optimize a revset wrapper.
Yuya Nishihara <yuya@tcha.org> [Sun, 10 Jun 2018 12:24:53 +0900] rev 38276
stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org> [Sun, 10 Jun 2018 11:55:52 +0900] rev 38275
debugwalk: pretty-print nested matcher
While porting filesets to composition of matchers, I found the original
one-liner was hard to read.
Yuya Nishihara <yuya@tcha.org> [Sun, 10 Jun 2018 11:53:56 +0900] rev 38274
debugwalk: show matcher output only if -v/--verbose
And drop "egrep -v". This matches the behavior of "hg debugrevspec".
Yuya Nishihara <yuya@tcha.org> [Sun, 10 Jun 2018 11:50:09 +0900] rev 38273
stringutil: promote smartset.prettyformat() to utility function
It will be used by debugwalk.
Boris Feld <boris.feld@octobus.net> [Fri, 01 Jun 2018 17:27:58 +0200] rev 38272
profiling: introduce a "profiling.time-track" option
This option allows to switch the time used by the statistical profiler from
cpu to real time. Our goal is to profile IO intensive operations using the
mercurial profiler.
Boris Feld <boris.feld@octobus.net> [Fri, 01 Jun 2018 11:23:27 +0200] rev 38271
statprof: also gather wall time
Gathering wall time information is useful for operations that are IO (files,
network) intensive.
For now we only expose it in the final summary.
Boris Feld <boris.feld@octobus.net> [Thu, 31 May 2018 19:34:08 +0200] rev 38270
perftemplating: allow to specify the template to test
This is useful to test the evolution of rendering time for a given template.
Boris Feld <boris.feld@octobus.net> [Thu, 31 May 2018 19:23:04 +0200] rev 38269
perftemplating: stop going through the log command
Only benchmark the rendering phase by moving steps outside of the timed
function:
* revisions resolution,
* template parsing
Boris Feld <boris.feld@octobus.net> [Thu, 31 May 2018 18:48:08 +0200] rev 38268
perftemplating: move revision argument to flag only
The revision we want to render are less important than the templates. We move
revision specification behind the usual `--rev` flag.