diff mercurial/obsutil.py @ 34417:55ef17ec8e59

effectflag: detect when user changed Store in effect flag when the user changed between the predecessor and its successors. It can happens with "hg commit --amend -u" or "histedit". Differential Revision: https://phab.mercurial-scm.org/D536
author Boris Feld <boris.feld@octobus.net>
date Thu, 06 Jul 2017 14:53:48 +0200
parents 51aadc0d0da2
children 54af8de9bd09
line wrap: on
line diff
--- a/mercurial/obsutil.py	Thu Jul 06 14:52:34 2017 +0200
+++ b/mercurial/obsutil.py	Thu Jul 06 14:53:48 2017 +0200
@@ -309,6 +309,7 @@
 EFFECTFLAGFIELD = "ef1"
 
 DESCCHANGED = 1 << 0 # action changed the description
+USERCHANGED = 1 << 4 # the user changed
 
 def geteffectflag(relation):
     """ From an obs-marker relation, compute what changed between the
@@ -323,6 +324,10 @@
         if changectx.description() != source.description():
             effects |= DESCCHANGED
 
+        # Check if user has changed
+        if changectx.user() != source.user():
+            effects |= USERCHANGED
+
     return effects
 
 def getobsoleted(repo, tr):