Fri, 16 Jun 2017 02:48:17 +0530 pycompat: move multiline comments above a function to function doc
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 16 Jun 2017 02:48:17 +0530] rev 32864
pycompat: move multiline comments above a function to function doc pycompat.py is unorganized and looks ugly. Next few patches will try to make it look more cleaner so that adding more code is easy and reading code also. This patch moves the multiline comments above functions to function docs. While moving, I improved the comments and make them better suitable for func doc. While I was here I drop a unrequired and misplaced comment.
Fri, 16 Jun 2017 01:46:47 +0530 py3: replace dict.iterkeys() with iter(dict)
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 16 Jun 2017 01:46:47 +0530] rev 32863
py3: replace dict.iterkeys() with iter(dict) dict.iterkeys() does not exists on Python 3.
Fri, 16 Jun 2017 01:28:23 +0530 py3: explicitly convert dict.values() to a list on py3
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 16 Jun 2017 01:28:23 +0530] rev 32862
py3: explicitly convert dict.values() to a list on py3 dict.values() returns a dict_values() object, so we need to pass it into list() explicitly to get one.
Fri, 16 Jun 2017 01:24:31 +0530 py3: alias long to int and xrange to range in test-ancestor.py on Python 3
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 16 Jun 2017 01:24:31 +0530] rev 32861
py3: alias long to int and xrange to range in test-ancestor.py on Python 3
Fri, 16 Jun 2017 00:36:17 +0530 py3: add a new bytesurl() to convert a str url into bytes
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 16 Jun 2017 00:36:17 +0530] rev 32860
py3: add a new bytesurl() to convert a str url into bytes
Fri, 16 Jun 2017 00:32:52 +0530 py3: add a new strurl() which will convert a bytes url to str
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 16 Jun 2017 00:32:52 +0530] rev 32859
py3: add a new strurl() which will convert a bytes url to str
Thu, 15 Jun 2017 21:59:42 -0400 killdaemons: fix WaitForSingleObject() error handling logic on Windows
Matt Harbison <matt_harbison@yahoo.com> [Thu, 15 Jun 2017 21:59:42 -0400] rev 32858
killdaemons: fix WaitForSingleObject() error handling logic on Windows The error return is not 0 for this method, so _check() was doing nothing when an error occurred. This forces the error path, much like the check for OpenProcess(). The only unhandled return is now WAIT_ABANDONED, but I don't see how that could happen in this case.
Tue, 06 Jun 2017 20:18:06 -0400 killdaemons: explicitly set the ctypes signatures
Matt Harbison <matt_harbison@yahoo.com> [Tue, 06 Jun 2017 20:18:06 -0400] rev 32857
killdaemons: explicitly set the ctypes signatures When I tried importing util.posixfile to work around removing a file opened by another process on Windows, it brought along the declarations in win32.py, which broke the error handling[1]. It doesn't seem worth hacking killdaemons[2] just to isolate these declarations in win32.py, so just declare them here to prevent any future issues. (win32.py mentions the declarations are required by pypy.) [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-May/097905.html [2] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-May/097907.html
Sun, 07 May 2017 14:58:40 -0400 hghave: enable 'serve' on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 07 May 2017 14:58:40 -0400] rev 32856
hghave: enable 'serve' on Windows I've been using a local hghaveaddon.py to enable this for a couple of months with reasonable success, and 'killdaemons' is already enabled on Windows. There's one failure[1] in test-http-proxy.t that this adds, which I can't figure out. [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-April/096987.html
Thu, 15 Jun 2017 11:00:29 -0400 contrib: add a ratchet for tests in Python 3
Augie Fackler <augie@google.com> [Thu, 15 Jun 2017 11:00:29 -0400] rev 32855
contrib: add a ratchet for tests in Python 3 This gives us an easy way to automatically update passing tests in Python 3.
Thu, 15 Jun 2017 10:59:48 -0400 contrib: check in a whitelist of passing tests in Python 3
Augie Fackler <augie@google.com> [Thu, 15 Jun 2017 10:59:48 -0400] rev 32854
contrib: check in a whitelist of passing tests in Python 3
Thu, 15 Jun 2017 13:13:36 -0400 tests: try and fail more gracefully with broken unicode escapes
Augie Fackler <augie@google.com> [Thu, 15 Jun 2017 13:13:36 -0400] rev 32853
tests: try and fail more gracefully with broken unicode escapes
Thu, 15 Jun 2017 12:49:13 -0400 md5sum: adapt for python 3 support
Augie Fackler <augie@google.com> [Thu, 15 Jun 2017 12:49:13 -0400] rev 32852
md5sum: adapt for python 3 support
Thu, 15 Jun 2017 11:10:51 -0700 profiling: allow configuring minimum display threshold for hotpath
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 15 Jun 2017 11:10:51 -0700] rev 32851
profiling: allow configuring minimum display threshold for hotpath statprof.display_hotpath() accepts a "limit" function to choose the minimum threshold for samples to display. The default is 0.05, which means you don't need individual items contributing less than 5%. I had a need to adjust this threshold. We already have a config option for it. So let's reuse it. check-config.py doesn't like having multiple defaults for the ui.configwith() calls. The behavior is obviously correct. I'm not sure if it is worth teaching check-config.py how to ignore this. So I've just accepted the new output.
Thu, 15 Jun 2017 11:04:46 -0700 config: document profiling.show{min,max}
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 15 Jun 2017 11:04:46 -0700] rev 32850
config: document profiling.show{min,max}
Thu, 15 Jun 2017 10:58:36 -0700 check-config: look for ui.configwith
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 15 Jun 2017 10:58:36 -0700] rev 32849
check-config: look for ui.configwith We previously weren't looking for this config helper. And, surprise, profiling.py references config options without docs. If I tried hard enough, I could have combined the regexps using a positive lookbehind assertion or something. But I didn't want to make my brain explode. At some point, we should probably do this linting at the tokenizer or ast layer. I'm not willing to open that can of worms right now.
Thu, 15 Jun 2017 10:38:19 -0700 check-config: use named groups in regexp
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 15 Jun 2017 10:38:19 -0700] rev 32848
check-config: use named groups in regexp In preparation for making this regexp a bit more complicated.
Thu, 15 Jun 2017 10:36:23 -0700 check-config: use compiled regexp
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 15 Jun 2017 10:36:23 -0700] rev 32847
check-config: use compiled regexp And split the regexp across multiple lines to make it easier to read.
Thu, 15 Jun 2017 10:46:39 -0700 tests: add test coverage for check-config
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 15 Jun 2017 10:46:39 -0700] rev 32846
tests: add test coverage for check-config We didn't have explicit test coverage before. I broke check-config.py as part of writing patches and was lucky I realized it.
Thu, 15 Jun 2017 22:57:20 -0700 exchange: use context manager for bundle1 unbundling
Martin von Zweigbergk <martinvonz@google.com> [Thu, 15 Jun 2017 22:57:20 -0700] rev 32845
exchange: use context manager for bundle1 unbundling The lazy locking is not used for bundle1, so using a regular context manager is clearer.
Thu, 15 Jun 2017 14:47:18 -0700 unbundle: use context manager for transaction
Martin von Zweigbergk <martinvonz@google.com> [Thu, 15 Jun 2017 14:47:18 -0700] rev 32844
unbundle: use context manager for transaction
Thu, 15 Jun 2017 17:00:32 -0700 clonebundle: use context managers for lock and transaction
Martin von Zweigbergk <martinvonz@google.com> [Thu, 15 Jun 2017 17:00:32 -0700] rev 32843
clonebundle: use context managers for lock and transaction
Tue, 11 Apr 2017 21:38:24 +0900 changeset_templater: render template specified by templatespec tuple
Yuya Nishihara <yuya@tcha.org> [Tue, 11 Apr 2017 21:38:24 +0900] rev 32842
changeset_templater: render template specified by templatespec tuple
Sat, 22 Apr 2017 19:29:41 +0900 formatter: 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
Sat, 22 Apr 2017 19:07:00 +0900 formatter: put topic in 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.
Sat, 22 Apr 2017 19:02:47 +0900 cmdutil: pass templatespec tuple directly to changeset_templater (API)
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.
Sat, 22 Apr 2017 18:48:38 +0900 formatter: wrap (tmpl, mapfile) by named tuple
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.
Sat, 22 Apr 2017 18:42:03 +0900 cmdutil: factor out helper to create changeset_templater with literal template
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.
Wed, 14 Jun 2017 23:56:58 -0400 test-dirstate-race: stabilize for Windows
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..."
Sat, 06 May 2017 16:24:21 +0900 formatter: document lookuptemplate()
Yuya Nishihara <yuya@tcha.org> [Sat, 06 May 2017 16:24:21 +0900] rev 32835
formatter: document lookuptemplate()
Sat, 22 Apr 2017 15:30:27 +0900 cmdutil: rename gettemplate() to _lookuplogtemplate()
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.
Sat, 22 Apr 2017 15:11:53 +0900 formatter: inline gettemplater()
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.
Sat, 22 Apr 2017 15:06:06 +0900 formatter: factor out function to create templater from literal or map file
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.
Sat, 22 Apr 2017 14:53:05 +0900 graphlog: do not look up graphnodetemplate in template paths (BC)
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.
Sat, 06 May 2017 14:48:47 +0900 formatter: open raw template file in posix semantics
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.
Sat, 06 May 2017 14:47:31 +0900 formatter: open raw template file in binary mode (BC)
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.
Sat, 06 May 2017 14:40:22 +0900 formatter: close raw template file explicitly
Yuya Nishihara <yuya@tcha.org> [Sat, 06 May 2017 14:40:22 +0900] rev 32828
formatter: close raw template file explicitly
Tue, 13 Jun 2017 22:24:41 -0400 largefiles: avoid a crash when archiving a subrepo with largefiles disabled stable
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.
Tue, 13 Jun 2017 17:43:33 -0400 patchbomb: make getaddrs function easier to work with
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
Tue, 13 Jun 2017 16:30:50 -0400 patchbomb: look for non-empty publicurl, not a non-None one
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.
Tue, 13 Jun 2017 16:30:11 -0400 patchbomb: make variable name for publicurl always be publicurl
Augie Fackler <augie@google.com> [Tue, 13 Jun 2017 16:30:11 -0400] rev 32824
patchbomb: make variable name for publicurl always be publicurl
Wed, 14 Jun 2017 01:43:47 -0400 bisect: simpler approach for option validation message
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.
Mon, 12 Jun 2017 16:35:57 -0700 pushkey: use False/True for return values from push functions
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
Fri, 10 Apr 2015 00:14:16 +0900 smartset: micro optimize spanset.slice() to narrow range accordingly
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
Thu, 09 Apr 2015 23:56:06 +0900 smartset: micro optimize baseset.slice() to use slice of list
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
Tue, 24 Mar 2015 00:14:53 +0900 smartset: extract method to slice abstractsmartset
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.
Sun, 24 May 2015 11:07:14 +0900 smartset: extract spanset factory to make it constructed without a repo
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.
Sun, 11 Jun 2017 00:21:38 +0900 smartset: change repr of spanset to show revisions as half-open range
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.
Mon, 12 Jun 2017 15:34:31 -0700 fsmonitor: don't write out state if identity has changed (issue5581)
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.
Mon, 12 Jun 2017 15:34:31 -0700 fsmonitor: write state with wlock held and dirstate unchanged (issue5581)
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.
Mon, 12 Jun 2017 13:56:50 -0700 workingctx: add a way for extensions to run code at status fixup time
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.
Mon, 12 Jun 2017 13:56:43 -0700 workingctx: also pass status tuple into poststatusfixup
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.
Mon, 12 Jun 2017 13:54:59 -0700 workingctx: factor out post-status dirstate fixup
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.
Tue, 13 Jun 2017 10:02:34 -0400 merge with stable
Augie Fackler <augie@google.com> [Tue, 13 Jun 2017 10:02:34 -0400] rev 32811
merge with stable
Mon, 12 Jun 2017 17:24:10 +0200 profile: properly propagate exception from the sub-context manager
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 12 Jun 2017 17:24:10 +0200] rev 32810
profile: properly propagate exception from the sub-context manager Context manager has a mechanism to control extension propagation. It is not used by profiling right now, but making the code correct will help prevent bug in the future.
Mon, 12 Jun 2017 17:25:37 +0200 profile: close 'fp' in all cases
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 12 Jun 2017 17:25:37 +0200] rev 32809
profile: close 'fp' in all cases There are no way for this to happen today, but better be safe than sorry, no one know how the code will evolve. We now make sure the file pointer is closed even is profiler is None.
Mon, 12 Jun 2017 17:21:41 +0200 profile: close 'fp' on error within '__enter__'
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 12 Jun 2017 17:21:41 +0200] rev 32808
profile: close 'fp' on error within '__enter__' Previously, error when initialying the profiler would forgot to explicitly close the file. Thank goes to Yuya Nishihara for spotting this.
Mon, 12 Jun 2017 17:20:48 +0200 profile: indent part of '__enter__'
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 12 Jun 2017 17:20:48 +0200] rev 32807
profile: indent part of '__enter__' We are about to introduce a try except. We start with adding the indent to make the next patch clearer.
Mon, 12 Jun 2017 17:15:43 +0200 profile: remove now useless indent
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 12 Jun 2017 17:15:43 +0200] rev 32806
profile: remove now useless indent We no longer rely on the value of '_output' so we can remove this conditional.
Mon, 12 Jun 2017 17:14:56 +0200 profile: use explicit logic to control file closing
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 12 Jun 2017 17:14:56 +0200] rev 32805
profile: use explicit logic to control file closing We make the decision to close 'fp' more explicit instead of relying on the implication of other variable. This makes the overall logic more robust.
(0) -30000 -10000 -3000 -1000 -300 -100 -60 +60 +100 +300 +1000 +3000 +10000 tip