Wed, 09 Sep 2020 11:41:18 +0900 grep: fix hash(linestate) to not include linenum
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 11:41:18 +0900] rev 45430
grep: fix hash(linestate) to not include linenum linestate.__eq__() just compares the line values whereas __hash__() does hash both self.line and self.linenum, which violates the rule. __hash__() was added at fb502719c75c, "python 2.6 compatibility: add __hash__ to classes that have __eq__" with no additional remarks, so this would probably be a simple mistake. The test output changed because difflib.SequenceMatcher() internally uses a dict. As you can see, the line "export" is unchanged at the revision 2, so the new output is correct.
Tue, 08 Sep 2020 21:38:10 +0900 test-grep: document that trivially moved lines might not be detected
Yuya Nishihara <yuya@tcha.org> [Tue, 08 Sep 2020 21:38:10 +0900] rev 45429
test-grep: document that trivially moved lines might not be detected I'm not going to fix this. I just learned "grep --diff" does clever thing than a simple grep(patch.diff(context=0)), and I think it's better to document how things work.
Wed, 09 Sep 2020 11:51:51 +0900 revset: remove indirect indexing of status tuple
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 11:51:51 +0900] rev 45428
revset: remove indirect indexing of status tuple Just use the attribute name.
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -3 +3 +10 +30 +100 +300 +1000 +3000 tip