Fri, 11 Sep 2020 12:39:45 +0900 test-grep: add tests for --follow with/without --diff and/or paths
Yuya Nishihara <yuya@tcha.org> [Fri, 11 Sep 2020 12:39:45 +0900] rev 45477
test-grep: add tests for --follow with/without --diff and/or paths This tests the behavior of cmdutil.walkchangerevs(). I'm going to rewrite cmdutil.walkchangerevs() to leverage the "log -f" logic, but the code coverage looked quite small. And the history traversal of "grep -f" goes wrong in various ways.
Thu, 10 Sep 2020 13:10:53 +0900 grep: clarify that --all works exactly the same way as --diff
Yuya Nishihara <yuya@tcha.org> [Thu, 10 Sep 2020 13:10:53 +0900] rev 45476
grep: clarify that --all works exactly the same way as --diff 7fbb5d76c555 "grep: add --diff flag" says as such, but the help strings have diverged since, and it's getting fuzzier what this --all will do.
Thu, 17 Sep 2020 15:34:13 +0200 churn: add an usage example in docstring
"Stephane" <stephane@yaal.fr> [Thu, 17 Sep 2020 15:34:13 +0200] rev 45475
churn: add an usage example in docstring
Thu, 17 Sep 2020 15:47:19 +0530 tests: run test-check-py3-compat only in pure python mode
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 17 Sep 2020 15:47:19 +0530] rev 45474
tests: run test-check-py3-compat only in pure python mode This test was added few years ago to detect syntax and import related warnings and kickstart the python-3 porting efforts. It tries to parse the ast and import the module. When using in strict modes like `HGMODULEPOLICY=rust` or `HGMODULEPOLICY=c`, the test fails. Let's run the test only on pure python mode. We now have full test suite being run with python 3 and some people even use hg with python 3 in production (like me).
Sat, 12 Sep 2020 07:23:47 +0900 log: make -frREV PATH detect missing files before falling back to slow path
Yuya Nishihara <yuya@tcha.org> [Sat, 12 Sep 2020 07:23:47 +0900] rev 45473
log: make -frREV PATH detect missing files before falling back to slow path If -rREV isn't specified, "log --follow" would abort on nonexistent paths. Let's implement this behavior for "-frREV" case as we have ctx.hasdir() now. Otherwise "log -frREV PATH" would silently fall back to slow path and files wouldn't be followed across renames. The loop is quadratic (as before), but the size of the startctxs and match.files() should be small in general. Some tests are marked as BROKEN since file renames aren't tracked in the slow path. This is a known limitation of the current history traversal function.
Fri, 11 Sep 2020 15:13:35 +0900 log: fix -fr'wdir()' PATH to follow newly added file
Yuya Nishihara <yuya@tcha.org> [Fri, 11 Sep 2020 15:13:35 +0900] rev 45472
log: fix -fr'wdir()' PATH to follow newly added file Testing filelog doesn't make sense in this case because the file existence is tested against the specified changectxs. If the filelog is empty and if startctxs != [wctx], 'f not in c' should be triggered.
Fri, 11 Sep 2020 15:08:58 +0900 log: reorganize if-else and for loop in logcmdutil._makematcher()
Yuya Nishihara <yuya@tcha.org> [Fri, 11 Sep 2020 15:08:58 +0900] rev 45471
log: reorganize if-else and for loop in logcmdutil._makematcher() The test conditions are branchy depending on --follow and --rev options, so it should be better to switch first by --follow --rev. Note that revs is not empty so "if follow and startctxs" can be replaced with "if follow and opts.get(b'rev')".
Wed, 26 Aug 2020 16:37:23 +0530 merge: update commitinfo from all mergeresults during bid merge
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 26 Aug 2020 16:37:23 +0530] rev 45470
merge: update commitinfo from all mergeresults during bid merge During bid merge, it's not clear which commitinfo should be stored and which one should not. This depends on which side the bid merge chooses for a file. For this we will need to refactor bid merge code and commitinfo handling. For now, we just blindly updates info since we hardly have any users of commitinfo and this will help us in testing and clearing out further path. Differential Revision: https://phab.mercurial-scm.org/D8965
Mon, 24 Aug 2020 17:22:28 +0530 merge: add missing ACTION_KEEP when both remote and ancestor are not present
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 24 Aug 2020 17:22:28 +0530] rev 45469
merge: add missing ACTION_KEEP when both remote and ancestor are not present Previous patch may lead to confusion that the related criss-cross merge is consistent when done from any of the parents. However this is not true and we were missing setting an ACTION_KEEP. This patch now exposes that bid-merge favors ACTION_KEEP always and the result of merge is different when started from different parents. This change also effects a test case above where bid merge was wrongly picking `r` because it was missing keep related information from one of the ancestor. After this test, we are back in a state in the criss-cross merge tests where the result depends on which parent we are merging from. Differential Revision: https://phab.mercurial-scm.org/D8941
Mon, 24 Aug 2020 15:20:09 +0530 merge: store ACTION_KEEP_ABSENT when we are keeping the file absent locally
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 24 Aug 2020 15:20:09 +0530] rev 45468
merge: store ACTION_KEEP_ABSENT when we are keeping the file absent locally If a file is not present on the local side, and it's unchanged between other merge parent and ancestor, we don't use any action, neither we had a if-else branch for that condition. This leads to bid-merge missing that there is a such action possible which can be performed. As test changes demonstrate, we now choose the locally deleted side instead of choosing the remote one consistently. This is also wrong behavior which is resulted because of missing possible action. It will be fixed in next patch. This whole logic is not acurrate as we should prompt user on what to do when this kind of criss-cross merge is in play. Differential Revision: https://phab.mercurial-scm.org/D8940
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip