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.
Mon, 12 Jun 2017 17:13:35 +0200 profiling: move 'fp' closing logic into its own function
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 12 Jun 2017 17:13:35 +0200] rev 32804
profiling: move 'fp' closing logic into its own function We are about to make the logic more robust and reuse it in more place, we start by isolating what we have.
Tue, 13 Jun 2017 01:23:54 +0530 py3: use python3 hg in test-py3-commands.t at places where py2 hg was used
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 13 Jun 2017 01:23:54 +0530] rev 32803
py3: use python3 hg in test-py3-commands.t at places where py2 hg was used This patch fixes my mistakes where I added test in test-py3-commands.t as `hg ...` where I forgot hg here refers to Python 2 mercurial.
Mon, 12 Jun 2017 13:10:09 -0700 test-dirstate-race: back out changeset c82fa7efcbc8
Siddharth Agarwal <sid0@fb.com> [Mon, 12 Jun 2017 13:10:09 -0700] rev 32802
test-dirstate-race: back out changeset c82fa7efcbc8 This is non-deterministic. In any case, I switched to using debugrebuilddirstate in my WIP patches, which makes this moot.
Sat, 10 Jun 2017 19:48:48 +0900 revset: fix order of first/last members in compound expression (BC)
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Jun 2017 19:48:48 +0900] rev 32801
revset: fix order of first/last members in compound expression (BC) Suppose len(subset) >> len(ls) in common cases, 'subset & ls' should be avoided whenever possible.
Sat, 10 Jun 2017 19:41:42 +0900 revset: filter first/last members by __and__ operation
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Jun 2017 19:41:42 +0900] rev 32800
revset: filter first/last members by __and__ operation This replaces 'if y in subset' with '& subset'. first(null) and last(wdir()) are fixed thanks to fullreposet.__and__. This also revealed that first() and last() don't follow the order of the input set. 'ls & subset' is valid only if the ordering requirement is 'define' or 'any'. No performance regression observed: revset #0: limit(0:9999, 100, 9000) 0) 0.001164 1) 0.001135 revset #2: 9000 & limit(0:9999, 100, 9000) 0) 0.001224 1) 0.001181 revset #3: last(0:9999, 100) 0) 0.000237 1) 0.000199
Sat, 10 Jun 2017 18:35:11 +0900 revset: reject negative number to select first/last n members
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Jun 2017 18:35:11 +0900] rev 32799
revset: reject negative number to select first/last n members Negative 'lim' doesn't make sense here, and it makes things complicated when using list[:lim].
Sat, 10 Jun 2017 18:04:56 +0900 revset: fix order of last() n members where n > 1 (BC)
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Jun 2017 18:04:56 +0900] rev 32798
revset: fix order of last() n members where n > 1 (BC) last() is implemented using a reversed iterator, so the result should be reversed again. I've marked this as BC since it's quite old bug seen in 3.0. The first bad revision is 4849f574aa24 "revset: changed last implementation to use lazy classes."
Sat, 10 Jun 2017 20:14:23 +0900 debugrevspec: add option to suppress list of computed revisions
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Jun 2017 20:14:23 +0900] rev 32797
debugrevspec: add option to suppress list of computed revisions Test will be added later.
Sat, 10 Jun 2017 20:03:35 +0900 debugrevspec: add option to print representation of smartset object
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Jun 2017 20:03:35 +0900] rev 32796
debugrevspec: add option to print representation of smartset object It's possible by -v, but -v also prints a parsed tree. Test will be added later.
Mon, 12 Jun 2017 11:24:21 -0700 help: correct description of "glob:foo/*" matching stable
Martin von Zweigbergk <martinvonz@google.com> [Mon, 12 Jun 2017 11:24:21 -0700] rev 32795
help: correct description of "glob:foo/*" matching Unlike what the description says, it does not match recursively. Also add an example of "glob:foo/**" (which does match recursively).
Sat, 10 Jun 2017 01:59:22 +0100 bookmarks: make sure we close the bookmark file after reading
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jun 2017 01:59:22 +0100] rev 32794
bookmarks: make sure we close the bookmark file after reading We previously lacked an explicit close of the bookmark file.
Sat, 10 Jun 2017 01:55:01 +0100 bookmarks: rephrase a comment to be shorted and clearer
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jun 2017 01:55:01 +0100] rev 32793
bookmarks: rephrase a comment to be shorted and clearer The initial motivation is that I need an initial level of indent in the next changeset o:-) It turn out I like the new version better.
Mon, 05 Jun 2017 13:44:15 +0100 checkheads: use a "lazyancestors" object for allfuturecommon
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Jun 2017 13:44:15 +0100] rev 32792
checkheads: use a "lazyancestors" object for allfuturecommon Instead of walking all ancestors to compute the full set we now check membership lazily. This massively speed. On a million-ish revision repository, this remove 14 seconds from the push logic, making the checkheads function disappear from profile.
Mon, 05 Jun 2017 13:37:04 +0100 checkheads: use "revnum" in the "allfuturecommon" set
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Jun 2017 13:37:04 +0100] rev 32791
checkheads: use "revnum" in the "allfuturecommon" set The obsolete post-processing needs to know the extend of the pushed set. The way it is implemented is... suboptimal. It build a full set of all nodes in the pushset and it does so using changectx. We have much better API for this now. The simplest is to use the existing lazy ancestors computation. That logic uses revnum and not node (for good reason) so we start with updating the post-processing code to handle a "allfuturecommon" set containing revision numbers.
Mon, 05 Jun 2017 15:20:20 +0100 checkheads: use 'nodemap.get' to convert nodes to revs
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Jun 2017 15:20:20 +0100] rev 32790
checkheads: use 'nodemap.get' to convert nodes to revs We are about to call 'torev' on node that might be locally missing. In this case, 'nodemap.revs' will return None (something valid in our usecase) while 'changelog.rev' would raise an exception. We make this change in a distinct changeset to show it does not impact the tests.
Mon, 05 Jun 2017 15:17:47 +0100 checkheads: pass "ispushed" function to the obsmarkers logic
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Jun 2017 15:17:47 +0100] rev 32789
checkheads: pass "ispushed" function to the obsmarkers logic We are about to make "allfuturecommon" a set of revs instead of a set of nodes. The function updated in this patch do not needs to know about these details so we just pass it a 'ispushed(node)' function. This will simplify the next changeset.
Fri, 09 Jun 2017 12:29:29 +0100 profile: drop maybeprofile
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Jun 2017 12:29:29 +0100] rev 32788
profile: drop maybeprofile It seems sufficiently simple to use "profile(enabled=X)" to not justify having a dedicated context manager just to read the config. (I do not have a too strong opinion about this).
Fri, 09 Jun 2017 12:36:07 +0100 profile: support --profile in alias and abbreviated version (--prof)
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Jun 2017 12:36:07 +0100] rev 32787
profile: support --profile in alias and abbreviated version (--prof) We now process the "--profile" a second time after alias has been processed and the command argument fully parsed. If appropriate we enable profiling at that time. In these situation, the --profile will cover less than if the full --profile flag was passed on the command line. This is better than the previous behavior (flag ignored) and still fullfil multiple valid usecases.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip