effectflag: fix content change detection for filtered revs
In some cases (like amended an obsolete changeset), computing the diff and
comparing them need to work with filtered revisions. We need to use unfiltered
change contexts to safely compute diffs.
--- a/README Mon Jun 05 10:15:00 2017 +0100
+++ b/README Fri Jun 02 19:07:35 2017 +0200
@@ -121,6 +121,11 @@
Changelog
=========
+6.3.2 - in progress
+-------------------
+
+ - effect flag: fix a small bug related to hidden changeset,
+
6.3.1 -- 2017-06-01
-------------------
--- a/hgext3rd/evolve/obshistory.py Mon Jun 05 10:15:00 2017 +0100
+++ b/hgext3rd/evolve/obshistory.py Fri Jun 02 19:07:35 2017 +0200
@@ -494,8 +494,14 @@
This is a first and basic implementation, with many shortcoming.
"""
- leftdiff = leftctx.diff(git=1)
- rightdiff = rightctx.diff(git=1)
+
+ # Leftctx or right ctx might be filtered, so we need to use the contexts
+ # with an unfiltered repository to safely compute the diff
+ leftunfi = leftctx._repo.unfiltered()[leftctx.rev()]
+ leftdiff = leftunfi.diff(git=1)
+ rightunfi = rightctx._repo.unfiltered()[rightctx.rev()]
+ rightdiff = rightunfi.diff(git=1)
+
left, right = (0, 0)
while None not in (left, right):
left = _getdifflines(leftdiff)