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 -10 +10 +100 +300 +1000 +3000 +10000 tip