Mercurial > evolve
diff hgext3rd/evolve/obshistory.py @ 2449:0b05142117d2
effectflag: detect parent change
Add the detection of parent changes.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 19 May 2017 19:52:57 +0200 |
parents | 66f05d5f4769 |
children | 98613938d098 |
line wrap: on
line diff
--- a/hgext3rd/evolve/obshistory.py Fri May 19 19:48:44 2017 +0200 +++ b/hgext3rd/evolve/obshistory.py Fri May 19 19:52:57 2017 +0200 @@ -360,6 +360,7 @@ # logic around storing and using effect flags DESCCHANGED = 1 << 0 # action changed the description METACHANGED = 1 << 1 # action change the meta (user, date, branch, etc...) +PARENTCHANGED = 1 << 2 # action change the parent def geteffectflag(relation): """compute the effect flag by comparing the source and destination""" @@ -382,6 +383,10 @@ if changectx.branch() != source.branch(): effects |= METACHANGED + # Check if at least one of the parent has changes + if changectx.parents() != source.parents(): + effects |= PARENTCHANGED + return effects @eh.wrapfunction(obsolete, 'createmarkers')