Martin von Zweigbergk <martinvonz@google.com> [Thu, 15 Jun 2017 17:00:32 -0700] rev 32843
clonebundle: use context managers for lock and transaction
Yuya Nishihara <yuya@tcha.org> [Tue, 11 Apr 2017 21:38:24 +0900] rev 32842
changeset_templater: render template specified by templatespec tuple
Yuya Nishihara <yuya@tcha.org> [Sat, 22 Apr 2017 19:29:41 +0900] rev 32841
formatter: render template specified by templatespec tuple
Yuya Nishihara <yuya@tcha.org> [Sat, 22 Apr 2017 19:07:00 +0900] rev 32840
formatter: put topic in templatespec tuple
This will allow us to change the initial template reference depending on how
the template is looked up. For example,
-Tdefault => (ref='changeset', tmpl=None, mapfile='map-cmdline.default')
-T'{rev}' => (ref='', tmpl='{rev}', mapfile=None)
A literal template given by -T option will be stored as an unnamed template,
which will free up the template namespace so that we can load named templates
from [templates] section of user config.
Yuya Nishihara <yuya@tcha.org> [Sat, 22 Apr 2017 19:02:47 +0900] rev 32839
cmdutil: pass templatespec tuple directly to changeset_templater (API)
A fewer number of arguments should be better.
Yuya Nishihara <yuya@tcha.org> [Sat, 22 Apr 2017 18:48:38 +0900] rev 32838
formatter: wrap (tmpl, mapfile) by named tuple
I'm going to add more options to the templatespec tuple.
cmdutil.logtemplatespec() is just an alias now, but it will be changed to
a factory function later.
Yuya Nishihara <yuya@tcha.org> [Sat, 22 Apr 2017 18:42:03 +0900] rev 32837
cmdutil: factor out helper to create changeset_templater with literal template
changeset_templater has lots of arguments, but most callers only need to
specify a literal template 'tmpl'.
"hg debugtemplate" has no diff option, which means 'opts' were effectively {},
so dropped opts.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 14 Jun 2017 23:56:58 -0400] rev 32836
test-dirstate-race: stabilize for Windows
Without quoting, the output after "custom merge tool" in the next test is an
abort trying to open "C:UsersMattAppData..."
Yuya Nishihara <yuya@tcha.org> [Sat, 06 May 2017 16:24:21 +0900] rev 32835
formatter: document lookuptemplate()
Yuya Nishihara <yuya@tcha.org> [Sat, 22 Apr 2017 15:30:27 +0900] rev 32834
cmdutil: rename gettemplate() to _lookuplogtemplate()
This function is only useful when processing log options.
Yuya Nishihara <yuya@tcha.org> [Sat, 22 Apr 2017 15:11:53 +0900] rev 32833
formatter: inline gettemplater()
Since it's highly use-case dependent how template should be looked up,
gettemplater() function isn't useful. Keeping it would introduce another
bug I've made and fixed earlier in this series.
Yuya Nishihara <yuya@tcha.org> [Sat, 22 Apr 2017 15:06:06 +0900] rev 32832
formatter: factor out function to create templater from literal or map file
(tmpl, mapfile) will be packed into a named tuple later.
Yuya Nishihara <yuya@tcha.org> [Sat, 22 Apr 2017 14:53:05 +0900] rev 32831
graphlog: do not look up graphnodetemplate in template paths (BC)
ui.graphnodetemplate config should be a literal template as ui.logtemplate is.
The use of formatter.gettemplater() is valid only for a template string
given by -T/--template option.
Yuya Nishihara <yuya@tcha.org> [Sat, 06 May 2017 14:48:47 +0900] rev 32830
formatter: open raw template file in posix semantics
This should have no effect, but seems good for code consistency.
Yuya Nishihara <yuya@tcha.org> [Sat, 06 May 2017 14:47:31 +0900] rev 32829
formatter: open raw template file in binary mode (BC)
I believe it was a mistake to open file in text mode. Now '\r' is preserved
on Windows, but it should be okay to print '\r\n' as long as users live in
such platform.
Yuya Nishihara <yuya@tcha.org> [Sat, 06 May 2017 14:40:22 +0900] rev 32828
formatter: close raw template file explicitly
Matt Harbison <matt_harbison@yahoo.com> [Tue, 13 Jun 2017 22:24:41 -0400] rev 32827
largefiles: avoid a crash when archiving a subrepo with largefiles disabled
This path is also used for extdiff, which is how I crossed paths with it.
Without this, an AttributeError occurs looking for 'lfstatus' on
localrepository. See also
d414c28db84d.
The other archive method is for the archival.py override, so it doesn't need to
be special cased like this. (It looks like it is only called for the top level
repo.) Likewise, the transplant override is also for commands.py. The other
overrides set lfstatus before examining it.
Augie Fackler <augie@google.com> [Tue, 13 Jun 2017 17:43:33 -0400] rev 32826
patchbomb: make getaddrs function easier to work with
Prior to this the return value was potentially None, a string, or a
list of strings. It now always returns a list of strings where each
string is always only one email address
Augie Fackler <augie@google.com> [Tue, 13 Jun 2017 16:30:50 -0400] rev 32825
patchbomb: look for non-empty publicurl, not a non-None one
Otherwise it's impossible to turn this feature back off, which is
making writing of tests awkward.
Augie Fackler <augie@google.com> [Tue, 13 Jun 2017 16:30:11 -0400] rev 32824
patchbomb: make variable name for publicurl always be publicurl
Brandon McCaig <bamccaig@gmail.com> [Wed, 14 Jun 2017 01:43:47 -0400] rev 32823
bisect: simpler approach for option validation message
Yuya Nishihara gave this suggestion on the mailing list after the
previous patch was queued, and honestly this seems much simpler and
looks more efficient.
Martin von Zweigbergk <martinvonz@google.com> [Mon, 12 Jun 2017 16:35:57 -0700] rev 32822
pushkey: use False/True for return values from push functions
It was particularly unclear in phases.pushphase() whether the 0/1
returned were the 0/1 for public/draft phase or for False/True
Yuya Nishihara <yuya@tcha.org> [Fri, 10 Apr 2015 00:14:16 +0900] rev 32821
smartset: micro optimize spanset.slice() to narrow range accordingly
-1ms isn't significant, but seems not bad.
revset #0: limit(0:9999, 100, 9000)
6) 0.001145
7) 0.000214
revset #3: last(0:9999, 100)
6) 0.000197
7) 0.000171
Yuya Nishihara <yuya@tcha.org> [Thu, 09 Apr 2015 23:56:06 +0900] rev 32820
smartset: micro optimize baseset.slice() to use slice of list
-1ms isn't significant, but seems not bad.
revset #1: limit(0::9999, 100, 9000)
5) 0.001681
6) 0.000790
Yuya Nishihara <yuya@tcha.org> [Tue, 24 Mar 2015 00:14:53 +0900] rev 32819
smartset: extract method to slice abstractsmartset
Sub classes can provide optimized implementations.
Yuya Nishihara <yuya@tcha.org> [Sun, 24 May 2015 11:07:14 +0900] rev 32818
smartset: extract spanset factory to make it constructed without a repo
This renames the spanset class to _spanset, and moves its __init__ to new
spanset() function. spanset() is now a factory function.
This allows us to construct a spanset without keeping a repo instance.
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Jun 2017 00:21:38 +0900] rev 32817
smartset: change repr of spanset to show revisions as half-open range
Before, an empty spanset was displayed as '<spanset+ 0:-1>', which seemed
confusing.
Siddharth Agarwal <sid0@fb.com> [Mon, 12 Jun 2017 15:34:31 -0700] rev 32816
fsmonitor: don't write out state if identity has changed (
issue5581)
Inspired by the dirstate fix in
dc7efa2826e4, this should fix any race
conditions with the fsmonitor state changing from underneath.
Since we now grab the wlock for any non-invalidate writes, the only situation
this appears to happen in is with a concurrent invalidation. Test that.
Siddharth Agarwal <sid0@fb.com> [Mon, 12 Jun 2017 15:34:31 -0700] rev 32815
fsmonitor: write state with wlock held and dirstate unchanged (
issue5581)
This means that the state will not be written if:
(1) either the wlock can't be obtained
(2) something else came along and changed the dirstate while we were in the
middle of a status run.
Siddharth Agarwal <sid0@fb.com> [Mon, 12 Jun 2017 13:56:50 -0700] rev 32814
workingctx: add a way for extensions to run code at status fixup time
Some extensions like fsmonitor need to run code after dirstate.status is
called, but while the wlock is held. The extensions could grab the wlock again,
but that has its own peculiar race issues. For example, fsmonitor would not
like its state to be written out if the dirstate has changed underneath (see
issue5581 for what can go wrong in that sort of case).
To protect against these sorts of issues, allow extensions to declare that they
would like to run some code to run at fixup time.
fsmonitor will switch to using this in the next patch in the series.
Siddharth Agarwal <sid0@fb.com> [Mon, 12 Jun 2017 13:56:43 -0700] rev 32813
workingctx: also pass status tuple into poststatusfixup
fsmonitor is going to need this to compute its set of notable files to persist.
Siddharth Agarwal <sid0@fb.com> [Mon, 12 Jun 2017 13:54:59 -0700] rev 32812
workingctx: factor out post-status dirstate fixup
We want to allow extensions to be able to add code to run inside the wlock.